| Visioscan Set SDK Libraries 1.0.28 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#include "AvailableResolution.h"
5#include "SoftwareVersion.h"
6#ifdef STARFLEETTOOLBOX_EXPORTS
7#define BASESENSOR __declspec(dllexport)
8#else
9#define BASESENSOR __declspec(dllimport)
10#endif
11
12
13#ifdef LEUZE
14#pragma message("---------------------------------------------------------------------------------- Leuze compilation --------------------------------------------------------------------------")
15#endif
20 class BASESENSOR BaseSensor abstract
21{
22 public:
26 BaseSensor();
27
32 BaseSensor(BaseCommunication* comm);
33
37 ~BaseSensor();
38
43 BaseCommunication* GetCommunication();
44
49 void SetCommunication(BaseCommunication* pCom);
50
55 BaseDataRecorder* GetDataRecorder();
56
61 void SetDataRecorder(BaseDataRecorder* pDataRecorder);
62
67 virtual CommunicationStatus Initialize() = 0;
68
74 virtual void Close() = 0;
75
81 virtual RawData RetrieveRawData() = 0;
82
87 vector<AvailableResolution> GetAvailableResolutions();
88
89 static vector<AvailableResolution> GetAvailableResolutions(PRODUCT_IDENTIFICATION productIdentifier);
90
95 virtual SoftwareVersion GetVersion() = 0;
96 protected:
97 char ComputeChecksum(string pTocompute);
98 string ComputeBinaryCommand(string pToCompute);
99#ifdef LEUZE
100 // RAW commands headers
101 string HEADER = { 0x02 , 0x4C, (char)0x45,(char)0x55, 0x5A, 0x45 }; //Start of text
102#else
103 // RAW commands headers
104 string HEADER = { 0x02 , 0x02, (char)0xBE,(char)0xA0, 0x12, 0x34 }; //Start of text
105#endif
106
107 string CHECKSUM = { 0x03 }; // Computed end of text
108 string cRN = { 0x63, 0x52, 0x4E }; //Command read by name
109 string cWN = { 0x63, 0x57, 0x4E }; //Command write by name
110 string cRA = { 0x63, 0x52, 0x41 }; //Response read command
111 string cWA = { 0x63, 0x57, 0x41 }; //Response write command
112 string SPC = { 0x20 }; //Space
113
114 // RAW commands
115 string SendMDI = { 0x53 ,0x65 ,0x6E ,0x64 ,0x4D ,0x44 ,0x49 };
116 string StopMDI = { 0x53 ,0x74 ,0x6F ,0x70 ,0x4D ,0x44 ,0x49 };
117
118 string GetIP = { 0x47, 0x65, 0x74, 0x49, 0x50 };
119 string GetGW = { 0x47 ,0x65 ,0x74 ,0x47 ,0x57 };
120 string GetMask = { 0x47 ,0x65 ,0x74 ,0x4D ,0x61 ,0x73 ,0x6B };
121 string GetDHCP = { 0x47 ,0x65 ,0x74 ,0x44 ,0x48 ,0x43 ,0x50 };
122 string GetProto = { 0x47 ,0x65 ,0x74 ,0x50 ,0x72 ,0x6F ,0x74 ,0x6F };
123 string GetPort = { 0x47 ,0x65 ,0x74 ,0x50 ,0x6F ,0x72 ,0x74 };
124 string GetPType = { 0x47 ,0x65 ,0x74 ,0x50 ,0x54 ,0x79 ,0x70, 0x65 };
125 string GetResol = { 0x47 ,0x65 ,0x74 ,0x52 ,0x65 ,0x73 ,0x6F, 0x6C };
126 string GetDir = { 0x47 ,0x65 ,0x74 ,0x44 ,0x69 ,0x72 };
127 string GetRange = { 0x47 ,0x65 ,0x74 ,0x52, 0x61, 0x6E, 0x67, 0x65 };
128 string GetSkip = { 0x47 ,0x65 ,0x74 ,0x53, 0x6B, 0x69, 0x70 };
129 string GetCont = { 0x47 ,0x65 ,0x74 ,0x43, 0x6F, 0x6E, 0x74 };
130 string GetStat = { 0x47 ,0x65 ,0x74 ,0x53, 0x74, 0x61, 0x74 };
131 string GetVer = { 0x47 ,0x65 ,0x74 ,0x56, 0x65, 0x72 };
132 string GetTem = { 0x47 ,0x65 ,0x74 ,0x54, 0x65, 0x6D };
133 string GetELog = { 0x47 ,0x65 ,0x74 ,0x45, 0x4C, 0x6F, 0x67 };
134 string GetLED = { 0x47 ,0x65 ,0x74 ,0x4C, 0x45, 0x44 };
135 string GetLamp = { 0x47 ,0x65 ,0x74 ,0x4C, 0x61, 0x6D, 0x70 };
136 string GetEthCfg = { 0x47 ,0x65 ,0x74 ,0x45 ,0x74 ,0x68, 0x43, 0x66, 0x67 };
137 string GetHours = { 0x47 ,0x65 ,0x74 ,0x48 ,0x6F ,0x75, 0x72, 0x73 };
138 string GetName = { 0x47 ,0x65 ,0x74 ,0x4E ,0x61 ,0x6D, 0x65 };
139 string GetFilter = { 0x47 ,0x65 ,0x74 ,0x46 ,0x69 ,0x6C, 0x74, 0x65 , 0x72 };
140 string GetWCalib = { 0x47 ,0x65 ,0x74, 0x57, 0x43, 0x61, 0x6C, 0x69, 0x62 };
141
142 string GetECode = { 0x47 ,0x65 ,0x74 ,0x45 ,0x43 ,0x6F, 0x64, 0x65 };
143
144 string SetIP = { 0x53, 0x65, 0x74, 0x49, 0x50 };
145 string SetGW = { 0x53, 0x65, 0x74, 0x47, 0x57 };
146 string SetMask = { 0x53, 0x65, 0x74, 0x4D, 0x61, 0x73, 0x6B };
147 string SetDHCP = { 0x53, 0x65, 0x74, 0x44, 0x48, 0x43, 0x50 };
148 string SetProto = { 0x53, 0x65, 0x74, 0x50, 0x72, 0x6F, 0x74,0x6F };
149 string SetPort = { 0x53, 0x65, 0x74, 0x50, 0x6F, 0x72, 0x74 };
150 string SetPType = { 0x53, 0x65, 0x74, 0x50, 0x54, 0x79, 0x70, 0x65 };
151 string SetResol = { 0x53, 0x65, 0x74, 0x52,0x65, 0x73, 0x6F, 0x6C };
152 string SetDir = { 0x53, 0x65, 0x74, 0x44, 0x69, 0x72 };
153 string SetRange = { 0x53, 0x65, 0x74, 0x52, 0x61, 0x6E, 0x67, 0x65 };
154 string SetSkip = { 0x53, 0x65, 0x74, 0x53, 0x6B, 0x69, 0x70 };
155 string SetCont = { 0x53, 0x65, 0x74, 0x43, 0x6F, 0x6E, 0x74 };
156 string SetLED = { 0x53, 0x65, 0x74, 0x4C, 0x45, 0x44 };
157 string SetEthCfg = { 0x53 ,0x65 ,0x74 ,0x45 ,0x74 ,0x68, 0x43, 0x66, 0x67 };
158 string SetName = { 0x53 ,0x65 ,0x74 ,0x4E ,0x61 ,0x6D, 0x65 };
159 string SetFilter = { 0x53 ,0x65 ,0x74 ,0x46 ,0x69 ,0x6C, 0x74, 0x65 , 0x72 };
160 string SetWCalib = { 0x53 ,0x65 ,0x74, 0x57, 0x43, 0x61, 0x6C, 0x69, 0x62 };
161
162 string Reset = { 0x52, 0x65, 0x73, 0x65, 0x74 };
163 string Reboot = { 0x52, 0x65, 0x62, 0x6F, 0x6F, 0x74 };
164
165 private:
166 BaseCommunication* _comm;
167 BaseDataRecorder* _recorder = NULL;
168};
169
abstract::SetDataRecorder
void SetDataRecorder(BaseDataRecorder *pDataRecorder)
Sets the data recorder.
abstract::GetDataRecorder
BaseDataRecorder * GetDataRecorder()
Returns the data recorder.
abstract::GetAvailableResolutions
static vector< AvailableResolution > GetAvailableResolutions(PRODUCT_IDENTIFICATION productIdentifier)
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::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::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
RawData
The base class encapsulating sensor's RAW data.
Definition RawData.h:14
SoftwareVersion
Helper to encapsulate the software version.
Definition SoftwareVersion.h:21