| Visioscan Set SDK Libraries 1.3.5 Visioscan Set SDK Help documentation file for C++ and C++/CLI |

Loading...
Searching...
No Matches
AgvSensor.h
1#pragma once
2#include<iostream>
3#include<sstream>
4#include "../StarfleetToolbox/BaseCommunication.h"
5#include "../StarfleetToolbox/BaseSensor.h"
6#include "../RawDataSensor/RawDataSensor.h"
7#include "../RawDataSensor/NetworkInformation.h"
8#include "../RawDataSensor/AngleRange.h"
9#include "../RawDataSensor/ContaminationThreshold.h"
10#include "../StarfleetToolbox/SoftwareVersion.h"
11#include "../StarfleetToolbox/BaseDataExtractor.h"
12#include "../RawDataSensor/RawDataError.h"
13#include "../RawDataSensor/SensorLeds.h"
14#include "../RawDataSensor/SensorLamps.h"
15#include "../StarfleetToolbox/ConfigurationResult.h"
16#include "../StarfleetToolbox/MethodNotSupportedException.h"
17#include "FieldName.h"
18#include "ObjectSize.h"
19#include "WarningSpot.h"
20#include "UncoverZone.h"
21#include "FieldData.h"
22#include "MultipleSampling.h"
23#include "HoldTime.h"
24#include "ActiveLevel.h"
25#include "OutputFunction.h"
26#include "AgvSensorLeds.h"
27#include "OnOffDelay.h"
28#include "DefaultValues.h"
29
30 using namespace std;
31
32#ifdef AGVSENSOR_EXPORTS
33#define AGVSENSOR __declspec(dllexport)
34#else
35#define AGVSENSOR __declspec(dllimport)
36#endif
37
38#define SECTORS_COUNT 264
39
40#define CHALLENGE_AND_KEY_SIZE 20 // Length definition
41
42
43 class AGVSENSOR AgvSensor : public BaseSensor
44{
45 public:
49 AgvSensor();
50
54 ~AgvSensor();
55
60 AgvSensor(BaseCommunication* comm);
61
65 CommunicationStatus Initialize();
66
67
73 void Close();
74
79 RawData RetrieveRawData();
80
84 void SendMdi();
85
89 void StopMdi();
90
95 PROTOCOL GetRawDataExchangeMode();
96
101 AngleRange GetAngleRange();
102
107 SCAN_PACKET_TYPE GetDataPacketType();
108
113 unsigned int GetImmunityLevel();
114
119 ContaminationThreshold GetContaminationThreshold();
120
125 ContaminationStatus GetContaminationStatus();
126
131 SoftwareVersion GetVersion();
132
137 long GetRuntimeHours();
138
143 int GetTemperature();
144
149 vector<RawDataError> GetErrorLog();
150
151 // Command settings management
152 // Data retrieve
157 NetworkInformation GetNetworkInformation();
158
163 string GetDeviceName();
164
170 ConfigurationResult SetRawDataExchangeMode(PROTOCOL pProtocol);
171
177 ConfigurationResult SetDataPacketType(SCAN_PACKET_TYPE pPacketType);
178
184 ConfigurationResult SetAngleRange(AngleRange pAngleRange);
185
191 ConfigurationResult SetImmunityLevel(int pImmunityLevel);
192
198 ConfigurationResult SetContaminationThreshold(ContaminationThreshold pContaminationThreshold);
199
205 ConfigurationResult SetNetworkInformation(NetworkInformation pNetwork);
206
211 ConfigurationResult SetDeviceName(string pName);
212
216 void ResetDevice();
217
221 void RebootDevice();
222
227 vector<unsigned int> GetWms();
228
234 FieldName GetFieldName(int fieldSetNumber);
235
240 ObjectSize GetObjectSize();
241
246 WarningSpot GetWarningSpot();
247
252 UncoverZone GetUncoverZoneSize();
253
260 FieldData GetField(uint8_t fieldNumber, NativeZoneTypeEnum zone);
261
266 uint8_t GetSelectedField();
267
268
273 OnOffDelay GetOnDelay();
274
275
280 OnOffDelay GetOffDelay();
281
286 ActiveLevel GetOutputActiveLevel();
287
292 ActiveLevel GetOutputStatus();
293
298 ActiveLevel GetInputStatus();
299
304 OutputFunction GetOutputFunction();
305
306 DefaultValues GetDefaultValues();
307
311 AgvSensorLeds GetSensorLeds();
312
317 SensorLamps GetSensorLamps();
318
324 ConfigurationResult SetFieldName(FieldName fieldName);
325
331 ConfigurationResult SetObjectSize(ObjectSize sizeToSet);
332
338 ConfigurationResult SetWarningSpot(WarningSpot spotToSet);
339
340 // <summary>
345 ConfigurationResult SetUncoverZoneSize(UncoverZone uncoverZoneToSet);
346
352 ConfigurationResult SetField(FieldData data);
353
359 ConfigurationResult SetMultipleSampling(MultipleSampling sampling);
360
366 ConfigurationResult SetHoldTime(HoldTime holdTime);
367
373 ConfigurationResult SetOnDelay(OnOffDelay onDelay);
374
380 ConfigurationResult SetOffDelay(OnOffDelay offDelay);
381
382
388 ConfigurationResult SetOutputActiveLevel(ActiveLevel activeLevel);
389
395 ConfigurationResult SetOutputFunction(OutputFunction function);
396
402 ConfigurationResult SetInputControlModeStatus(NativeInputControleModeStatus controlMode);
403
404
413 ConfigurationResult SetInputsValue(NativeActiveLevelEnum input1, NativeActiveLevelEnum input2, NativeActiveLevelEnum input3, NativeActiveLevelEnum input4);
414
420 ConfigurationResult SetSensorLeds(AgvSensorLeds leds);
421
426 ConfigurationResult StoreInFlash();
427
428
433 uint16_t GetPlatformVersion();
434
435
440 NativeInputControleModeStatus GetInputControlModeStatus();
441
443
451 void StartLearning(uint8_t fieldNumber, NativeZoneTypeEnum zone, uint16_t uncover, NativeObjSizeEnum objectSize);
452
456 void StopLearning();
457
461 void AbortLearning();
462
467 NativeFieldLearningStatus GetLearningStatus();
468
473 uint16_t GetLearningErrorCode();
474
479 NativeAbortStatus GetAbortStatus();
480
485 string RequestChallenge();
486
492 ConfigurationResult SendCypher(string cypher);
493
498 NativeZoneModeEnum GetZone1Mode();
499
505 ConfigurationResult SetZone1Mode(NativeZoneModeEnum mode);
506
507
511 void ResetAllFields();
512
513 private:
514 RawDataSensor* _rawData = NULL;
515
516 string GetWmsValueBin = { 0x47, 0x65, 0x74, 0x57, 0x6D, 0x73 };
517 string GetLedStatusBin = { 0x47, 0x65, 0x74, 0x4c, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73 };
518 string GetFieldNameBin = { 0x47, 0x65, 0x74, 0x46, 0x4e, 0x61, 0x6d, 0x65 };
519 string GetObjectSizeBin = { 0x47, 0x65, 0x74, 0x4f, 0x62, 0x6a, 0x53, 0x69, 0x7a, 0x65 };
520 string GetFieldBin = { 0x47, 0x65, 0x74, 0x46, 0x69, 0x65, 0x6c, 0x64 };
521 string GetFieldParameterBin = { 0x47, 0x65, 0x74, 0x46, 0x50, 0x61, 0x72, 0x61, 0x6d };
522 string GetMultipleSamplingBin = { 0x47, 0x65, 0x74, 0x4d, 0x75, 0x6c, 0x74, 0x69 };
523 string GetHoldTimeBin = { 0x47, 0x65, 0x74, 0x48, 0x54, 0x69, 0x6d, 0x65 };
524 string GetOutputActiveLevelBin = { 0x47, 0x65, 0x74, 0x4f, 0x4c, 0x65, 0x76, 0x65, 0x6c };
525 string GetOutputFunctionBin = { 0x47, 0x65, 0x74, 0x4f, 0x46, 0x75, 0x6e };
526 string GetUncoverBin = { 0x47, 0x65, 0x74, 0x55, 0x6E, 0x63, 0x6F, 0x76, 0x65, 0x72 };
527 string GetOutputStatusBin = { 0x47, 0x65, 0x74, 0x4F, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73 };
528 string GetInputStatusBin = { 0x47, 0x65, 0x74, 0x49, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73 };
529 string GetWarnSpotBin = { 0x47, 0x65, 0x74, 0x57, 0x61, 0x72, 0x6E, 0x53, 0x70, 0x6F, 0x74 };
530 string GetInputControlModeStatusBin = { 0x47, 0x65, 0x74, 0x49, 0x43, 0x4D, 0x6F, 0x64, 0x65 };
531 string GetSelectedFieldBin = { 0x47, 0x65, 0x74, 0x43, 0x46, 0x69, 0x65, 0x6C, 0x64 };
532 string GetOnDelayBin = { 0x47, 0x65, 0x74, 0x4F, 0x6E, 0x44, 0x65, 0x6C, 0x61, 0x79 };
533 string GetOffDelayBin = { 0x47, 0x65, 0x74, 0x4F, 0x66, 0x66, 0x44, 0x65, 0x6C, 0x61, 0x79 };
534 string GetDefaultValuesBin = { 0x47, 0x65, 0x74, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6C, 0x74, 0x56, 0x61, 0x6C, 0x75, 0x65, 0x73 };
535 string GetLearningErrorCodeBin = { 0x47, 0x65, 0x74, 0x45, 0x43, 0x6F, 0x64, 0x65 };
536 string GetZone1ModeBin = { 0x47, 0x65, 0x74, 0x5A, 0x6F, 0x6E, 0x65, 0x4D, 0x6F, 0x64, 0x65 };
537
538 string SetFieldNameBin = { 0x53, 0x65, 0x74, 0x46, 0x4e, 0x61, 0x6d, 0x65 };
539 string SetObjectSizeBin = { 0x53, 0x65, 0x74, 0x4f, 0x62, 0x6a, 0x53, 0x69, 0x7a, 0x65 };
540 string SetFieldBin = { 0x53, 0x65, 0x74, 0x46, 0x69, 0x65, 0x6c, 0x64 };
541 string SetFieldParameterBin = { 0x53, 0x65, 0x74, 0x46, 0x50, 0x61, 0x72, 0x61, 0x6d };
542 string SetMultipleSamplingBin = { 0x53, 0x65, 0x74, 0x4d, 0x75, 0x6c, 0x74, 0x69 };
543 string SetHoldTimeBin = { 0x53, 0x65, 0x74, 0x48, 0x54, 0x69, 0x6d, 0x65 };
544 string SetOutputActiveLevelBin = { 0x53, 0x65, 0x74, 0x4f, 0x4c, 0x65, 0x76, 0x65, 0x6c };
545 string SetOutputFunctionBin = { 0x53, 0x65, 0x74, 0x4f, 0x46, 0x75, 0x6e };
546 string SetStoreFlash = { 0x53, 0x65, 0x74, 0x53, 0x74, 0x6f, 0x72, 0x65 };
547 string SetUncoverBin = { 0x53, 0x65, 0x74, 0x55, 0x6E, 0x63, 0x6F, 0x76, 0x65, 0x72 };
548 string SetWarnSpotBin = { 0x53, 0x65, 0x74, 0x57, 0x61, 0x72, 0x6E, 0x53, 0x70, 0x6F, 0x74 };
549 string SetInputControlModeStatusBin = { 0x53, 0x65, 0x74, 0x49, 0x43, 0x4D, 0x6F, 0x64, 0x65 };
550 string SetInputStatusValueBin = { 0x53, 0x65, 0x74, 0x49, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73 };
551 string SetOnDelayBin = { 0x53, 0x65, 0x74, 0x4F, 0x6E, 0x44, 0x65, 0x6C, 0x61, 0x79 };
552 string SetOffDelayBin = { 0x53, 0x65, 0x74, 0x4F, 0x66, 0x66, 0x44, 0x65, 0x6C, 0x61, 0x79 };
553 string SetZone1ModeBin = { 0x53, 0x65, 0x74, 0x5A, 0x6F, 0x6E, 0x65, 0x4D, 0x6F, 0x64, 0x65 };
554
555 // Learning features
556 string StartLearningBin = { 0x53, 0x74, 0x61, 0x72, 0x74, 0x46, 0x4C, 0x65, 0x61, 0x72, 0x6E };
557 string StopLearningBin = { 0x53, 0x74, 0x6F, 0x70, 0x46, 0x4C, 0x65, 0x61, 0x72, 0x6E };
558 string GetLearningStatusBin = { 0x47, 0x65, 0x74, 0x46, 0x4C, 0x65, 0x61, 0x72, 0x6E, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73 };
559 string GetAbortStatusBin = { 0x47, 0x65, 0x74, 0x41, 0x62, 0x6F, 0x72, 0x74 };
560
561 // Challenge features
562 string GetChallengeBin = { 0x47, 0x65, 0x74, 0x43, 0x68, 0x61, 0x6C, 0x6C, 0x65, 0x6E, 0x67, 0x65 };
563 string SendCypherBin = { 0x53, 0x65, 0x74, 0x43, 0x79, 0x70, 0x68, 0x65, 0x72 };
564};
ActiveLevel
Definition ActiveLevel.h:12
AgvSensor
Definition AgvSensor.h:44
AgvSensorLeds
Definition AgvSensorLeds.h:11
DefaultValues
Definition DefaultValues.h:19
FieldData
Definition FieldData.h:14
FieldName
Definition FieldName.h:10
HoldTime
Definition HoldTime.h:10
MultipleSampling
Definition MultipleSampling.h:10
ObjectSize
Definition ObjectSize.h:13
OnOffDelay
Definition OnOffDelay.h:10
OutputFunction
Definition OutputFunction.h:12
UncoverZone
Definition UncoverZone.h:13
WarningSpot
Definition WarningSpot.h:13
AngleRange
Helper to encapsulate the Angle range data.
Definition AngleRange.h:13
ContaminationThreshold
Helper to encapsulate the contamination threshold.
Definition ContaminationThreshold.h:12
NetworkInformation
Helper to encapsulate the network information.
Definition NetworkInformation.h:15
RawDataSensor
Definition of the Raw data sensor services. This header will let the programmer to handle all the req...
Definition RawDataSensor.h:65
SensorLamps
Helper to encapsulate the sensor lamps state.
Definition SensorLamps.h:20
CommunicationStatus
Definition CommunicationStructures.h:24
ConfigurationResult
Helper to encapsulate the configuration result.
Definition ConfigurationResult.h:15
ContaminationStatus
Helper to encapsulate the contamination threshold.
Definition ContaminationStatus.h:12
RawData
The base class encapsulating sensor's RAW data.
Definition RawData.h:14
SoftwareVersion
Helper to encapsulate the software version.
Definition SoftwareVersion.h:21