| Visioscan Set SDK Libraries 1.3.5 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 "BaseEnumeration.h"
4#include "BaseDataRecorder.h"
5#include "AvailableResolution.h"
6#include "SoftwareVersion.h"
7#include "ContaminationStatus.h"
8#include "ConfigurationResult.h"
9#ifdef STARFLEETTOOLBOX_EXPORTS
10#define BASESENSOR __declspec(dllexport)
11#else
12#define BASESENSOR __declspec(dllimport)
13#endif
14
15
16#ifdef LEUZE
17#pragma message("---------------------------------------------------------------------------------- Leuze compilation --------------------------------------------------------------------------")
18#endif
23 class BASESENSOR BaseSensor abstract
24{
25 public:
29 BaseSensor();
30
35 BaseSensor(BaseCommunication* comm);
36
40 ~BaseSensor();
41
46 BaseCommunication* GetCommunication();
47
52 void SetCommunication(BaseCommunication* pCom);
53
58 BaseDataRecorder* GetDataRecorder();
59
64 void SetDataRecorder(BaseDataRecorder* pDataRecorder);
65
70 virtual CommunicationStatus Initialize() = 0;
71
77 virtual void Close() = 0;
78
84 virtual RawData RetrieveRawData() = 0;
85
90 virtual uint16_t GetPlatformVersion() = 0;
91
96 vector<AvailableResolution> GetAvailableResolutions();
97
98 static vector<AvailableResolution> GetAvailableResolutions(PRODUCT_IDENTIFICATION productIdentifier);
99
104 virtual SoftwareVersion GetVersion() = 0;
105
110 virtual string GetDeviceName() = 0;
111
116 virtual long GetRuntimeHours() = 0;
117
122 virtual int GetTemperature() = 0;
123
128 virtual ConfigurationResult SetDeviceName(string pName) = 0;
129
134 virtual ContaminationStatus GetContaminationStatus() = 0;
135 protected:
136 MethodCompatibility GetMethodCompatibility(Method method);
137 char ComputeChecksum(string pTocompute);
138 string ComputeBinaryCommand(string pToCompute);
139#ifdef LEUZE
140 // RAW commands headers
141 string HEADER = { 0x02 , 0x4C, (char)0x45,(char)0x55, 0x5A, 0x45 }; //Start of text
142#else
143 // RAW commands headers
144 string HEADER = { 0x02 , 0x02, (char)0xBE,(char)0xA0, 0x12, 0x34 }; //Start of text
145#endif
146
147 string CHECKSUM = { 0x03 }; // Computed end of text
148 string cRN = { 0x63, 0x52, 0x4E }; //Command read by name
149 string cWN = { 0x63, 0x57, 0x4E }; //Command write by name
150 string cRA = { 0x63, 0x52, 0x41 }; //Response read command
151 string cWA = { 0x63, 0x57, 0x41 }; //Response write command
152 string SPC = { 0x20 }; //Space
153
154 // RAW commands
155 string SendMDI = { 0x53 ,0x65 ,0x6E ,0x64 ,0x4D ,0x44 ,0x49 };
156 string StopMDI = { 0x53 ,0x74 ,0x6F ,0x70 ,0x4D ,0x44 ,0x49 };
157
158 string GetIP = { 0x47, 0x65, 0x74, 0x49, 0x50 };
159 string GetGW = { 0x47 ,0x65 ,0x74 ,0x47 ,0x57 };
160 string GetMask = { 0x47 ,0x65 ,0x74 ,0x4D ,0x61 ,0x73 ,0x6B };
161 string GetDHCP = { 0x47 ,0x65 ,0x74 ,0x44 ,0x48 ,0x43 ,0x50 };
162 string GetProto = { 0x47 ,0x65 ,0x74 ,0x50 ,0x72 ,0x6F ,0x74 ,0x6F };
163 string GetPort = { 0x47 ,0x65 ,0x74 ,0x50 ,0x6F ,0x72 ,0x74 };
164 string GetPType = { 0x47 ,0x65 ,0x74 ,0x50 ,0x54 ,0x79 ,0x70, 0x65 };
165 string GetResol = { 0x47 ,0x65 ,0x74 ,0x52 ,0x65 ,0x73 ,0x6F, 0x6C };
166 string GetDir = { 0x47 ,0x65 ,0x74 ,0x44 ,0x69 ,0x72 };
167 string GetRange = { 0x47 ,0x65 ,0x74 ,0x52, 0x61, 0x6E, 0x67, 0x65 };
168 string GetSkip = { 0x47 ,0x65 ,0x74 ,0x53, 0x6B, 0x69, 0x70 };
169 string GetCont = { 0x47 ,0x65 ,0x74 ,0x43, 0x6F, 0x6E, 0x74 };
170 string GetStat = { 0x47 ,0x65 ,0x74 ,0x53, 0x74, 0x61, 0x74 };
171 string GetVer = { 0x47 ,0x65 ,0x74 ,0x56, 0x65, 0x72 };
172 string GetPLVerBin = { 0x47, 0x65, 0x74, 0x50, 0x4C, 0x56, 0x65, 0x72 };
173 string GetTem = { 0x47 ,0x65 ,0x74 ,0x54, 0x65, 0x6D };
174 string GetELog = { 0x47 ,0x65 ,0x74 ,0x45, 0x4C, 0x6F, 0x67 };
175 string GetLED = { 0x47 ,0x65 ,0x74 ,0x4C, 0x45, 0x44 };
176 string GetLamp = { 0x47 ,0x65 ,0x74 ,0x4C, 0x61, 0x6D, 0x70 };
177 string GetEthCfg = { 0x47 ,0x65 ,0x74 ,0x45 ,0x74 ,0x68, 0x43, 0x66, 0x67 };
178 string GetHours = { 0x47 ,0x65 ,0x74 ,0x48 ,0x6F ,0x75, 0x72, 0x73 };
179 string GetName = { 0x47 ,0x65 ,0x74 ,0x4E ,0x61 ,0x6D, 0x65 };
180 string GetFilter = { 0x47 ,0x65 ,0x74 ,0x46 ,0x69 ,0x6C, 0x74, 0x65 , 0x72 };
181 string GetWCalib = { 0x47 ,0x65 ,0x74, 0x57, 0x43, 0x61, 0x6C, 0x69, 0x62 };
182 string GetWinStat = { 0x47, 0x65, 0x74, 0x57, 0x69, 0x6E, 0x53, 0x74, 0x61, 0x74 };
183
184 string GetECode = { 0x47 ,0x65 ,0x74 ,0x45 ,0x43 ,0x6F, 0x64, 0x65 };
185
186 string SetIP = { 0x53, 0x65, 0x74, 0x49, 0x50 };
187 string SetGW = { 0x53, 0x65, 0x74, 0x47, 0x57 };
188 string SetMask = { 0x53, 0x65, 0x74, 0x4D, 0x61, 0x73, 0x6B };
189 string SetDHCP = { 0x53, 0x65, 0x74, 0x44, 0x48, 0x43, 0x50 };
190 string SetProto = { 0x53, 0x65, 0x74, 0x50, 0x72, 0x6F, 0x74,0x6F };
191 string SetPort = { 0x53, 0x65, 0x74, 0x50, 0x6F, 0x72, 0x74 };
192 string SetPType = { 0x53, 0x65, 0x74, 0x50, 0x54, 0x79, 0x70, 0x65 };
193 string SetResol = { 0x53, 0x65, 0x74, 0x52,0x65, 0x73, 0x6F, 0x6C };
194 string SetDir = { 0x53, 0x65, 0x74, 0x44, 0x69, 0x72 };
195 string SetRange = { 0x53, 0x65, 0x74, 0x52, 0x61, 0x6E, 0x67, 0x65 };
196 string SetSkip = { 0x53, 0x65, 0x74, 0x53, 0x6B, 0x69, 0x70 };
197 string SetCont = { 0x53, 0x65, 0x74, 0x43, 0x6F, 0x6E, 0x74 };
198 string SetLED = { 0x53, 0x65, 0x74, 0x4C, 0x45, 0x44 };
199 string SetEthCfg = { 0x53 ,0x65 ,0x74 ,0x45 ,0x74 ,0x68, 0x43, 0x66, 0x67 };
200 string SetName = { 0x53 ,0x65 ,0x74 ,0x4E ,0x61 ,0x6D, 0x65 };
201 string SetFilter = { 0x53 ,0x65 ,0x74 ,0x46 ,0x69 ,0x6C, 0x74, 0x65 , 0x72 };
202 string SetWCalib = { 0x53 ,0x65 ,0x74, 0x57, 0x43, 0x61, 0x6C, 0x69, 0x62 };
203
204 string Reset = { 0x52, 0x65, 0x73, 0x65, 0x74 };
205 string Reboot = { 0x52, 0x65, 0x62, 0x6F, 0x6F, 0x74 };
206 protected:
207 SoftwareVersion __version;
208 private:
209 BaseCommunication* _comm;
210 BaseDataRecorder* _recorder = NULL;
211};
212
abstract::GetPlatformVersion
virtual uint16_t GetPlatformVersion()=0
Gets the platform version /summary> a uint16_t containing the version number
abstract::SetDataRecorder
void SetDataRecorder(BaseDataRecorder *pDataRecorder)
Sets the data recorder.
abstract::GetDataRecorder
BaseDataRecorder * GetDataRecorder()
Returns the data recorder.
abstract::GetContaminationStatus
virtual ContaminationStatus GetContaminationStatus()=0
Gets the contamination status.
abstract::GetMethodCompatibility
MethodCompatibility GetMethodCompatibility(Method method)
abstract::__version
SoftwareVersion __version
Definition BaseSensor.h:207
abstract::GetDeviceName
virtual string GetDeviceName()=0
Gets the sensor's name.
abstract::GetAvailableResolutions
static vector< AvailableResolution > GetAvailableResolutions(PRODUCT_IDENTIFICATION productIdentifier)
abstract::SetDeviceName
virtual ConfigurationResult SetDeviceName(string pName)=0
Sets the sensor's name.
abstract::BaseSensor
BaseSensor(BaseCommunication *comm)
Copy constructor (sets the communication layer)
abstract::SetCommunication
void SetCommunication(BaseCommunication *pCom)
Sets the communication layer.
abstract::BaseSensor
BaseSensor()
Base constructor.
abstract::Initialize
virtual CommunicationStatus Initialize()=0
Pure virtual definition of a function that will initialise the extend class (connection,...
abstract::ComputeChecksum
char ComputeChecksum(string pTocompute)
abstract::RetrieveRawData
virtual RawData RetrieveRawData()=0
Pure virtual definition of a function that will help the caller to retrieve the data.
abstract::GetRuntimeHours
virtual long GetRuntimeHours()=0
Gets the sensor runtime hours.
abstract::GetCommunication
BaseCommunication * GetCommunication()
Returns the communication layer.
abstract::GetAvailableResolutions
vector< AvailableResolution > GetAvailableResolutions()
Gets available ensor resolutions.
abstract::GetVersion
virtual SoftwareVersion GetVersion()=0
Gets the sensor version data.
abstract::GetTemperature
virtual int GetTemperature()=0
Gets the temperature.
abstract::Close
virtual void Close()=0
Pure virtual method that closes all communication stops all threads and cleanup memory This method mu...
abstract::~BaseSensor
~BaseSensor()
Destructor.
abstract::ComputeBinaryCommand
string ComputeBinaryCommand(string pToCompute)
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