| Visioscan Set SDK Libraries 1.0.28 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
28 using namespace std;
29
30#ifdef AGVSENSOR_EXPORTS
31#define AGVSENSOR __declspec(dllexport)
32#else
33#define AGVSENSOR __declspec(dllimport)
34#endif
35
36#define SECTORS_COUNT 264
37
38#define CHALLENGE_AND_KEY_SIZE 20 // Length definition
39
40
41 class AGVSENSOR AgvSensor : public BaseSensor
42{
43 public:
47 AgvSensor();
48
52 ~AgvSensor();
53
58 AgvSensor(BaseCommunication* comm);
59
63 CommunicationStatus Initialize();
64
65
71 void Close();
72
77 RawData RetrieveRawData();
78
82 void SendMdi();
83
87 void StopMdi();
88
93 PROTOCOL GetRawDataExchangeMode();
94
99 AngleRange GetAngleRange();
100
105 SCAN_PACKET_TYPE GetDataPacketType();
106
111 unsigned int GetImmunityLevel();
112
117 ContaminationThreshold GetContaminationThreshold();
118
123 ContaminationStatus GetContaminationStatus();
124
129 SoftwareVersion GetVersion();
130
135 long GetRuntimeHours();
136
141 int GetTemperature();
142
147 vector<RawDataError> GetErrorLog();
148
149 // Command settings management
150 // Data retrieve
155 NetworkInformation GetNetworkInformation();
156
161 string GetDeviceName();
162
168 ConfigurationResult SetRawDataExchangeMode(PROTOCOL pProtocol);
169
175 ConfigurationResult SetDataPacketType(SCAN_PACKET_TYPE pPacketType);
176
182 ConfigurationResult SetAngleRange(AngleRange pAngleRange);
183
189 ConfigurationResult SetImmunityLevel(int pImmunityLevel);
190
196 ConfigurationResult SetContaminationThreshold(ContaminationThreshold pContaminationThreshold);
197
203 ConfigurationResult SetNetworkInformation(NetworkInformation pNetwork);
204
209 ConfigurationResult SetDeviceName(string pName);
210
214 void ResetDevice();
215
219 void RebootDevice();
220
225 vector<unsigned int> GetWms();
226
232 FieldName GetFieldName(int fieldSetNumber);
233
238 ObjectSize GetObjectSize();
239
244 WarningSpot GetWarningSpot();
245
250 UncoverZone GetUncoverZoneSize();
251
258 FieldData GetField(uint8_t fieldNumber, NativeZoneTypeEnum zone);
259
264 uint8_t GetSelectedField();
265
270 MultipleSampling GetMultipleSampling();
271
276 HoldTime GetHoldTime();
277
278
283 ActiveLevel GetOutputActiveLevel();
284
289 ActiveLevel GetOutputStatus();
290
295 ActiveLevel GetInputStatus();
296
301 OutputFunction GetOutputFunction();
302
306 AgvSensorLeds GetSensorLeds();
307
312 SensorLamps GetSensorLamps();
313
319 ConfigurationResult SetFieldName(FieldName fieldName);
320
326 ConfigurationResult SetObjectSize(ObjectSize sizeToSet);
327
333 ConfigurationResult SetWarningSpot(WarningSpot spotToSet);
334
335 // <summary>
340 ConfigurationResult SetUncoverZoneSize(UncoverZone uncoverZoneToSet);
341
347 ConfigurationResult SetField(FieldData data);
348
354 ConfigurationResult SetMultipleSampling(MultipleSampling sampling);
355
361 ConfigurationResult SetHoldTime(HoldTime holdTime);
362
368 ConfigurationResult SetOutputActiveLevel(ActiveLevel activeLevel);
369
375 ConfigurationResult SetOutputFunction(OutputFunction function);
376
382 ConfigurationResult SetInputControlModeStatus(NativeInputControleModeStatus controlMode);
383
384
393 ConfigurationResult SetInputsValue(NativeActiveLevelEnum input1, NativeActiveLevelEnum input2, NativeActiveLevelEnum input3, NativeActiveLevelEnum input4);
394
400 ConfigurationResult SetSensorLeds(AgvSensorLeds leds);
401
406 ConfigurationResult StoreInFlash();
407
408
413 uint16_t GetPlatformVersion();
414
419 NativeInputControleModeStatus GetInputControlModeStatus();
420
422
430 void StartLearning(uint8_t fieldNumber, NativeZoneTypeEnum zone, uint16_t uncover, NativeObjSizeEnum objectSize);
431
435 void StopLearning();
436
440 void AbortLearning();
441
446 NativeFieldLearningStatus GetLearningStatus();
447
452 NativeAbortStatus GetAbortStatus();
453
458 string RequestChallenge();
459
465 ConfigurationResult SendCypher(string cypher);
466
467
471 void ResetAllFields();
472
473 private:
474 RawDataSensor* _rawData = NULL;
475
476 string GetWmsValueBin = { 0x47, 0x65, 0x74, 0x57, 0x6D, 0x73 };
477 string GetLedStatusBin = { 0x47, 0x65, 0x74, 0x4c, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73 };
478 string GetFieldNameBin = { 0x47, 0x65, 0x74, 0x46, 0x4e, 0x61, 0x6d, 0x65 };
479 string GetObjectSizeBin = { 0x47, 0x65, 0x74, 0x4f, 0x62, 0x6a, 0x53, 0x69, 0x7a, 0x65 };
480 string GetFieldBin = { 0x47, 0x65, 0x74, 0x46, 0x69, 0x65, 0x6c, 0x64 };
481 string GetFieldParameterBin = { 0x47, 0x65, 0x74, 0x46, 0x50, 0x61, 0x72, 0x61, 0x6d };
482 string GetMultipleSamplingBin = { 0x47, 0x65, 0x74, 0x4d, 0x75, 0x6c, 0x74, 0x69 };
483 string GetHoldTimeBin = { 0x47, 0x65, 0x74, 0x48, 0x54, 0x69, 0x6d, 0x65 };
484 string GetOutputActiveLevelBin = { 0x47, 0x65, 0x74, 0x4f, 0x4c, 0x65, 0x76, 0x65, 0x6c };
485 string GetOutputFunctionBin = { 0x47, 0x65, 0x74, 0x4f, 0x46, 0x75, 0x6e };
486 string GetUncoverBin = { 0x47, 0x65, 0x74, 0x55, 0x6E, 0x63, 0x6F, 0x76, 0x65, 0x72 };
487 string GetOutputStatusBin = { 0x47, 0x65, 0x74, 0x4F, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73 };
488 string GetInputStatusBin = { 0x47, 0x65, 0x74, 0x49, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73 };
489 string GetWarnSpotBin = { 0x47, 0x65, 0x74, 0x57, 0x61, 0x72, 0x6E, 0x53, 0x70, 0x6F, 0x74 };
490 string GetInputControlModeStatusBin = { 0x47, 0x65, 0x74, 0x49, 0x43, 0x4D, 0x6F, 0x64, 0x65 };
491 string GetSelectedFieldBin = { 0x47, 0x65, 0x74, 0x43, 0x46, 0x69, 0x65, 0x6C, 0x64 };
492
493 string SetFieldNameBin = { 0x53, 0x65, 0x74, 0x46, 0x4e, 0x61, 0x6d, 0x65 };
494 string SetObjectSizeBin = { 0x53, 0x65, 0x74, 0x4f, 0x62, 0x6a, 0x53, 0x69, 0x7a, 0x65 };
495 string SetFieldBin = { 0x53, 0x65, 0x74, 0x46, 0x69, 0x65, 0x6c, 0x64 };
496 string SetFieldParameterBin = { 0x53, 0x65, 0x74, 0x46, 0x50, 0x61, 0x72, 0x61, 0x6d };
497 string SetMultipleSamplingBin = { 0x53, 0x65, 0x74, 0x4d, 0x75, 0x6c, 0x74, 0x69 };
498 string SetHoldTimeBin = { 0x53, 0x65, 0x74, 0x48, 0x54, 0x69, 0x6d, 0x65 };
499 string SetOutputActiveLevelBin = { 0x53, 0x65, 0x74, 0x4f, 0x4c, 0x65, 0x76, 0x65, 0x6c };
500 string SetOutputFunctionBin = { 0x53, 0x65, 0x74, 0x4f, 0x46, 0x75, 0x6e };
501 string SetStoreFlash = { 0x53, 0x65, 0x74, 0x53, 0x74, 0x6f, 0x72, 0x65 };
502 string SetUncoverBin = { 0x53, 0x65, 0x74, 0x55, 0x6E, 0x63, 0x6F, 0x76, 0x65, 0x72 };
503 string SetWarnSpotBin = { 0x53, 0x65, 0x74, 0x57, 0x61, 0x72, 0x6E, 0x53, 0x70, 0x6F, 0x74 };
504 string SetInputControlModeStatusBin = { 0x53, 0x65, 0x74, 0x49, 0x43, 0x4D, 0x6F, 0x64, 0x65 };
505 string SetInputStatusValueBin = { 0x53, 0x65, 0x74, 0x49, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73 };
506
507 // Learning features
508 string StartLearningBin = { 0x53, 0x74, 0x61, 0x72, 0x74, 0x46, 0x4C, 0x65, 0x61, 0x72, 0x6E };
509 string StopLearningBin = { 0x53, 0x74, 0x6F, 0x70, 0x46, 0x4C, 0x65, 0x61, 0x72, 0x6E };
510 string GetLearningStatusBin = { 0x47, 0x65, 0x74, 0x46, 0x4C, 0x65, 0x61, 0x72, 0x6E, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73 };
511 string GetAbortStatusBin = { 0x47, 0x65, 0x74, 0x41, 0x62, 0x6F, 0x72, 0x74 };
512
513 // Challenge features
514 string GetChallengeBin = { 0x47, 0x65, 0x74, 0x43, 0x68, 0x61, 0x6C, 0x6C, 0x65, 0x6E, 0x67, 0x65 };
515 string SendCypherBin = { 0x53, 0x65, 0x74, 0x43, 0x79, 0x70, 0x68, 0x65, 0x72 };
516};
ActiveLevel
Definition ActiveLevel.h:12
AgvSensor
Definition AgvSensor.h:42
AgvSensorLeds
Definition AgvSensorLeds.h:11
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
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