Visioscan Set SDK Libraries 1.0.14
Visioscan Set SDK Help documentation file for C++ and C++/CLI
 
Loading...
Searching...
No Matches
BaseSensor.h
1#pragma once
2#include "BaseCommunication.h"
3#include "BaseDataRecorder.h"
4#ifdef STARFLEETTOOLBOX_EXPORTS
5#define BASESENSOR __declspec(dllexport)
6#else
7#define BASESENSOR __declspec(dllimport)
8#endif
9
14class BASESENSOR BaseSensor abstract
15{
16public:
21
26 BaseSensor(BaseCommunication* comm);
27
32
37 BaseCommunication* GetCommunication();
38
43 void SetCommunication(BaseCommunication* pCom);
44
49 BaseDataRecorder* GetDataRecorder();
50
55 void SetDataRecorder(BaseDataRecorder* pDataRecorder);
56
61 virtual void Initialize() = 0;
62
68 virtual RawData RetrieveRawData() = 0;
69protected:
70 char ComputeChecksum(string pTocompute);
71 string ComputeBinaryCommand(string pToCompute);
72
73 // RAW data header
74 string RAWDATA_HEADER = { (char)0xBE,(char)0xA0, 0x12, 0x34 };
75
76 // RAW commands headers
77 string HEADER = { 0x02 , 0x02, (char)0xBE,(char)0xA0, 0x12, 0x34 }; //Start of text
78 string CHECKSUM = { 0x03 }; // Computed end of text
79 string cRN = { 0x63, 0x52, 0x4E }; //Command read by name
80 string cWN = { 0x63, 0x57, 0x4E }; //Command write by name
81 string cRA = { 0x63, 0x52, 0x41 }; //Response read command
82 string cWA = { 0x63, 0x57, 0x41 }; //Response write command
83 string SPC = { 0x20 }; //Space
84
85 // RAW commands
86 string SendMDI = { 0x53 ,0x65 ,0x6E ,0x64 ,0x4D ,0x44 ,0x49 };
87 string StopMDI = { 0x53 ,0x74 ,0x6F ,0x70 ,0x4D ,0x44 ,0x49 };
88
89 string GetIP = { 0x47, 0x65, 0x74, 0x49, 0x50 };
90 string GetGW = { 0x47 ,0x65 ,0x74 ,0x47 ,0x57 };
91 string GetMask = { 0x47 ,0x65 ,0x74 ,0x4D ,0x61 ,0x73 ,0x6B };
92 string GetDHCP = { 0x47 ,0x65 ,0x74 ,0x44 ,0x48 ,0x43 ,0x50 };
93 string GetProto = { 0x47 ,0x65 ,0x74 ,0x50 ,0x72 ,0x6F ,0x74 ,0x6F };
94 string GetPort = { 0x47 ,0x65 ,0x74 ,0x50 ,0x6F ,0x72 ,0x74 };
95 string GetPType = { 0x47 ,0x65 ,0x74 ,0x50 ,0x54 ,0x79 ,0x70, 0x65 };
96 string GetResol = { 0x47 ,0x65 ,0x74 ,0x52 ,0x65 ,0x73 ,0x6F, 0x6C };
97 string GetDir = { 0x47 ,0x65 ,0x74 ,0x44 ,0x69 ,0x72 };
98 string GetRange = { 0x47 ,0x65 ,0x74 ,0x52, 0x61, 0x6E, 0x67, 0x65 };
99 string GetSkip = { 0x47 ,0x65 ,0x74 ,0x53, 0x6B, 0x69, 0x70 };
100 string GetCont = { 0x47 ,0x65 ,0x74 ,0x43, 0x6F, 0x6E, 0x74 };
101 string GetStat = { 0x47 ,0x65 ,0x74 ,0x53, 0x74, 0x61, 0x74 };
102 string GetVer = { 0x47 ,0x65 ,0x74 ,0x56, 0x65, 0x72 };
103 string GetTem = { 0x47 ,0x65 ,0x74 ,0x54, 0x65, 0x6D };
104 string GetELog = { 0x47 ,0x65 ,0x74 ,0x45, 0x4C, 0x6F, 0x67 };
105 string GetLED = { 0x47 ,0x65 ,0x74 ,0x4C, 0x45, 0x44 };
106 string GetLamp = { 0x47 ,0x65 ,0x74 ,0x4C, 0x61, 0x6D, 0x70 };
107 string GetEthCfg = { 0x47 ,0x65 ,0x74 ,0x45 ,0x74 ,0x68, 0x43, 0x66, 0x67 };
108 string GetHours = { 0x47 ,0x65 ,0x74 ,0x48 ,0x6F ,0x75, 0x72, 0x73 };
109 string GetName = { 0x47 ,0x65 ,0x74 ,0x4E ,0x61 ,0x6D, 0x65 };
110 string GetFilter = { 0x47 ,0x65 ,0x74 ,0x46 ,0x69 ,0x6C, 0x74, 0x65 , 0x72 };
111 string GetWCalib = { 0x47 ,0x65 ,0x74, 0x57, 0x43, 0x61, 0x6C, 0x69, 0x62 };
112
113 string GetECode = { 0x47 ,0x65 ,0x74 ,0x45 ,0x43 ,0x6F, 0x64, 0x65 };
114
115 string SetIP = { 0x53, 0x65, 0x74, 0x49, 0x50 };
116 string SetGW = { 0x53, 0x65, 0x74, 0x47, 0x57 };
117 string SetMask = { 0x53, 0x65, 0x74, 0x4D, 0x61, 0x73, 0x6B };
118 string SetDHCP = { 0x53, 0x65, 0x74, 0x44, 0x48, 0x43, 0x50 };
119 string SetProto = { 0x53, 0x65, 0x74, 0x50, 0x72, 0x6F, 0x74,0x6F };
120 string SetPort = { 0x53, 0x65, 0x74, 0x50, 0x6F, 0x72, 0x74 };
121 string SetPType = { 0x53, 0x65, 0x74, 0x50, 0x54, 0x79, 0x70, 0x65 };
122 string SetResol = { 0x53, 0x65, 0x74, 0x52,0x65, 0x73, 0x6F, 0x6C };
123 string SetDir = { 0x53, 0x65, 0x74, 0x44, 0x69, 0x72 };
124 string SetRange = { 0x53, 0x65, 0x74, 0x52, 0x61, 0x6E, 0x67, 0x65 };
125 string SetSkip = { 0x53, 0x65, 0x74, 0x53, 0x6B, 0x69, 0x70 };
126 string SetCont = { 0x53, 0x65, 0x74, 0x43, 0x6F, 0x6E, 0x74 };
127 string SetLED = { 0x53, 0x65, 0x74, 0x4C, 0x45, 0x44 };
128 string SetEthCfg = { 0x53 ,0x65 ,0x74 ,0x45 ,0x74 ,0x68, 0x43, 0x66, 0x67 };
129 string SetName = { 0x53 ,0x65 ,0x74 ,0x4E ,0x61 ,0x6D, 0x65 };
130 string SetFilter = { 0x53 ,0x65 ,0x74 ,0x46 ,0x69 ,0x6C, 0x74, 0x65 , 0x72 };
131 string SetWCalib = { 0x53 ,0x65 ,0x74, 0x57, 0x43, 0x61, 0x6C, 0x69, 0x62 };
132
133 string Reset = { 0x52, 0x65, 0x73, 0x65, 0x74 };
134 string Reboot = { 0x52, 0x65, 0x62, 0x6F, 0x6F, 0x74 };
135
136private:
137 BaseCommunication* _comm;
138 BaseDataRecorder* _recorder = NULL;
139};
140
void SetDataRecorder(BaseDataRecorder *pDataRecorder)
Sets the data recorder.
BaseDataRecorder * GetDataRecorder()
Returns the data recorder.
virtual void Initialize()=0
Pure virtual definition of a function that will initialise the extend class (connection,...
BaseSensor(BaseCommunication *comm)
Copy constructor (sets the communication layer)
void SetCommunication(BaseCommunication *pCom)
Sets the communication layer.
BaseSensor()
Base constructor.
char ComputeChecksum(string pTocompute)
virtual RawData RetrieveRawData()=0
Pure virtual definition of a function that will help the caller to retrieve the data.
BaseCommunication * GetCommunication()
Returns the communication layer.
~BaseSensor()
Destructor.
string ComputeBinaryCommand(string pToCompute)
The base class encapsulating sensor's RAW data.
Definition RawData.h:14