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

Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
RawDataSensor Class Reference

Definition of the Raw data sensor services. This header will let the programmer to handle all the requests that have to be sent to the hardware through the appropriate channel. More...

`#include <RawDataSensor.h>`

Inheritance diagram for RawDataSensor:

## Public Member Functions
| RawDataSensor ()
| Base constructor.
| ~RawDataSensor ()
| Destructor (disconects the data sensor)
| RawDataSensor (BaseCommunication *comm)
| Copy constructor: sets the basic communication object.
RawData | ExtractData (vector< string >pDataToExtract)
| Extracts the data from the datastream (Internal method, do not use as is)
bool | IsCommandAcknowledgment (string pDataToVerify)
| Check if data is a command acknowledgment.
bool | IsHeader (string pDataToVerify)
| Check if data is a HEADER.
bool | IsEndOfPacket (string pDataToVerify)
| Check if the data is an end of packet group.
bool | IsFirstPacket (string pDataToVerify)
| Check if the data is the first packet group.
int | GetPacketHeaderSizeToRead ()
| Returns a pointer on an array with a determined size.
int | CountToReadForLength (char *pHeaderBuffer)
| Indicates how much byte must be read in order to obtain packet len.
int | GetPacketLengthToRead (char *pLenHeaderBuffer, int pPacketType)
| Retrieve, in the pHeaderBuffer, the amount of data to read.
CommunicationStatus | Initialize ()
| Initializes the object to connect the sensor.
void | Close ()
| Method that closes all communication stops all threads and cleanup memory This method must be called when finishing usage of sensor.
RawData | RetrieveRawData ()
| Wait for Raw Data availability.
void | ResetDevice ()
| Resets the device.
void | RebootDevice ()
| Reboots the device.
NetworkInformation | GetNetworkInformation ()
| Gets whole data information.
PROTOCOL | GetRawDataExchangeMode ()
| Get the raw data exchange mode.
SCAN_PACKET_TYPE | GetDataPacketType ()
| Gets the data packed type.
SensorResolutionFrequencyEnum | GetAngularResolution ()
| Gets the angular resolution.
SCANNING_DIRECTION | GetScanningDirection ()
| SensorResolutionFrequencyEnum Gets the scanning direction.
AngleRange | GetAngleRange ()
| Gets the angle range.
unsigned int | GetSkipScan ()
| Gets the skip scan.
unsigned int | GetImmunityLevel ()
| Gets the immunity level.
ContaminationThreshold | GetContaminationThreshold ()
| Gets the contamination threshold.
ContaminationStatus | GetContaminationStatus ()
| Gets the contamination status.
SoftwareVersion | GetVersion ()
| Gets the sensor version data.
uint16_t | GetPlatformVersion ()
| Gets the platform version.
int | GetTemperature ()
| Gets the temperature.
vector< RawDataError > | GetErrorLog ()
| Gets the error log.
SensorLeds | GetSensorLeds ()
| Gets the sensor's leds status.
SensorLamps | GetSensorLamps ()
| Gets the sensor lamps status.
long | GetRuntimeHours ()
| Gets the sensor runtime hours.
string | GetDeviceName ()
| Gets the sensor's name.
FILTER_STATUS | GetFilterStatus ()
| Gets the sensor's filter status.
WINDOW_CALIBRATION | GetWindowCalibrationStatus ()
| Gets the window calibration status.
ConfigurationResult | SetNetworkInformation (NetworkInformation pNetwork)
| Set the overall network information except IP v4 and Port.
ConfigurationResult | SetRawDataExchangeMode (PROTOCOL pProtocol)
| Sets the RAW data exchange mode. Can be either TCP or UDP.
ConfigurationResult | SetDataPacketType (SCAN_PACKET_TYPE pPacketType)
| Sets the packet type returned in raw data. Can be either DISTANCE or DISTANCE_INTENSITY.
ConfigurationResult | SetAngularResolution (SensorResolutionFrequencyEnum pResolution)
| Sets the angle resolution. Can be either 80Hz or 40Hz.
ConfigurationResult | SetScanningDirection (SCANNING_DIRECTION pScanDirection)
| Sets the scanning direction. Can be either CLOCKWISE or COUNTER_CLOCKWISE.
ConfigurationResult | SetAngleRange (AngleRange pAngleRange)
| Sets the Angle range (start and stop)
ConfigurationResult | SetSkipScan (int pSkipScan)
| Sets the skip scan.
ConfigurationResult | SetImmunityLevel (int pImmunityLevel)
| Sets the sensor's immunity level.
ConfigurationResult | SetContaminationThreshold (ContaminationThreshold pContaminationThreshold)
| Sets the contamination level threshold for warning and error.
ConfigurationResult | SetSensorLeds (SensorLeds pLeds)
| Sets the sensors external leds status (ON or OFF)
ConfigurationResult | SetDeviceName (string pName)
| Sets the sensor's name.
ConfigurationResult | SetFilterStatus (FILTER_STATUS pFilterStatus)
| Sets the sensor's filter status.
ConfigurationResult | StartWindowCalibration ()
| Starts the window calibration.
void | SendMdi ()
| Request the sensor to start sending MDI data to host.
void | StopMdi ()
| Request the sensor to stop sending MDI data to host.

## Protected Member Functions
string | ExtractCommandResult (int MODE, string commandCode, string result)
| This method analyses and decompose the reply to a command comming from the sensor media. It also checks if the reply matches the command that was sent in order to ensure coherence of the data It decompose the reply into a data vector representing the requested data.

## Protected Attributes
string | GetImmu = { 0x47 ,0x65 ,0x74 ,0x49, 0x6D, 0x6D, 0x75 }
string | SetImmu = { 0x53, 0x65, 0x74, 0x49, 0x6D, 0x6D, 0x75 }

## Friends
class | AgvSensor

## Detailed Description

Definition of the Raw data sensor services. This header will let the programmer to handle all the requests that have to be sent to the hardware through the appropriate channel.

## Constructor & Destructor Documentation

## ◆ RawDataSensor() [1/2]

RawDataSensor::RawDataSensor | ( |  | ) |

Base constructor.

## ◆ ~RawDataSensor()

RawDataSensor::~RawDataSensor | ( |  | ) |

Destructor (disconects the data sensor)

Destructor.

## ◆ RawDataSensor() [2/2]

RawDataSensor::RawDataSensor | ( | BaseCommunication * | comm | ) |

Copy constructor: sets the basic communication object.

Parameters

  comm | The basic communication object

## Member Function Documentation

## ◆ Close()

void RawDataSensor::Close | ( |  | ) |

Method that closes all communication stops all threads and cleanup memory This method must be called when finishing usage of sensor.

## ◆ CountToReadForLength()

int RawDataSensor::CountToReadForLength | ( | char * | pHeaderBuffer | ) |

Indicates how much byte must be read in order to obtain packet len.

Returns
  An integer representing the amount of bytes to read

## ◆ ExtractCommandResult()

string RawDataSensor::ExtractCommandResult | ( | int | MODE,
|  | string | commandCode,
|  | string | result )
| protected

This method analyses and decompose the reply to a command comming from the sensor media. It also checks if the reply matches the command that was sent in order to ensure coherence of the data It decompose the reply into a data vector representing the requested data.

Parameters

  MODE | READ or WRITE mode
  commandCode | The sensor GCID command to be analysed
  result | A string representing the media stream returned from the sensor after command execution

Returns
  A char array

## ◆ ExtractData()

RawData RawDataSensor::ExtractData | ( | vector< string > | pDataToExtract | ) |

Extracts the data from the datastream (Internal method, do not use as is)

Parameters

  pDataToExtract | Datastream vector

Returns
  The encaspulated raw data

## ◆ GetAngleRange()

AngleRange RawDataSensor::GetAngleRange | ( |  | ) |

Gets the angle range.

Returns
  An encapsulation of angle range

## ◆ GetAngularResolution()

SensorResolutionFrequencyEnum RawDataSensor::GetAngularResolution | ( |  | ) |

Gets the angular resolution.

Returns
  An enum of angle resolution

## ◆ GetContaminationStatus()

ContaminationStatus RawDataSensor::GetContaminationStatus | ( |  | ) |

Gets the contamination status.

Returns
  An ContaminationStatus representing the contamination status

## ◆ GetContaminationThreshold()

ContaminationThreshold RawDataSensor::GetContaminationThreshold | ( |  | ) |

Gets the contamination threshold.

Returns
  An encapsulation of the contamination threshold

## ◆ GetDataPacketType()

SCAN_PACKET_TYPE RawDataSensor::GetDataPacketType | ( |  | ) |

Gets the data packed type.

Returns
  DISTANCE or DISTANCE_INTENSITY

## ◆ GetDeviceName()

string RawDataSensor::GetDeviceName | ( |  | ) |

Gets the sensor's name.

Returns
  A string representing the sensor's name

## ◆ GetErrorLog()

vector< RawDataError > RawDataSensor::GetErrorLog | ( |  | ) |

Gets the error log.

Returns
  An encapsulation representing the error log

## ◆ GetFilterStatus()

FILTER_STATUS RawDataSensor::GetFilterStatus | ( |  | ) |

Gets the sensor's filter status.

Returns
  0: OFF, 1: ON

## ◆ GetImmunityLevel()

unsigned int RawDataSensor::GetImmunityLevel | ( |  | ) |

Gets the immunity level.

Returns
  An integer representing the immunity level

## ◆ GetNetworkInformation()

NetworkInformation RawDataSensor::GetNetworkInformation | ( |  | ) |

Gets whole data information.

Returns
  An encapsulated way to group the network information

Retrieve version to ensure retro compatibility

## ◆ GetPacketHeaderSizeToRead()

int RawDataSensor::GetPacketHeaderSizeToRead | ( |  | ) |

Returns a pointer on an array with a determined size.

Returns
  A char array

## ◆ GetPacketLengthToRead()

int RawDataSensor::GetPacketLengthToRead | ( | char * | pLenHeaderBuffer,
|  | int | pPacketType )

Retrieve, in the pHeaderBuffer, the amount of data to read.

Parameters

  pHeaderBuffer |
  pPacketType | RAW data (2) or Command data (4) ?

Returns
  The amount of data to read

## ◆ GetPlatformVersion()

uint16_t RawDataSensor::GetPlatformVersion | ( |  | ) |

Gets the platform version.

Returns
  a uint16_t containing the version number

Gets the platform version

Returns
  a uint16_t containing the version number

## ◆ GetRawDataExchangeMode()

PROTOCOL RawDataSensor::GetRawDataExchangeMode | ( |  | ) |

Get the raw data exchange mode.

Returns
  TCP or UDP

## ◆ GetRuntimeHours()

long RawDataSensor::GetRuntimeHours | ( |  | ) |

Gets the sensor runtime hours.

Returns
  A long representing the sensor's runtime hours

## ◆ GetScanningDirection()

SCANNING_DIRECTION RawDataSensor::GetScanningDirection | ( |  | ) |

SensorResolutionFrequencyEnum Gets the scanning direction.

Gets the scanning direction.

Returns
  CLOCKWISE or COUNTER_CLOCKWISE

## ◆ GetSensorLamps()

SensorLamps RawDataSensor::GetSensorLamps | ( |  | ) |

Gets the sensor lamps status.

Returns
  An encapsulation of the sensor's internal lamps status

## ◆ GetSensorLeds()

SensorLeds RawDataSensor::GetSensorLeds | ( |  | ) |

Gets the sensor's leds status.

Returns
  An encapsulation representing the sensor's leds status

## ◆ GetSkipScan()

unsigned int RawDataSensor::GetSkipScan | ( |  | ) |

Gets the skip scan.

Returns
  An integer representing the skip scan

## ◆ GetTemperature()

int RawDataSensor::GetTemperature | ( |  | ) |

Gets the temperature.

Returns
  An integer representing the sensor's temperature

## ◆ GetVersion()

SoftwareVersion RawDataSensor::GetVersion | ( |  | ) |

Gets the sensor version data.

Returns
  An encapsulation representing the sensor version

## ◆ GetWindowCalibrationStatus()

WINDOW_CALIBRATION RawDataSensor::GetWindowCalibrationStatus | ( |  | ) |

Gets the window calibration status.

Returns
  PROCESSING, DONE or FAILED

## ◆ Initialize()

CommunicationStatus RawDataSensor::Initialize | ( |  | ) |

Initializes the object to connect the sensor.

## ◆ IsCommandAcknowledgment()

bool RawDataSensor::IsCommandAcknowledgment | ( | string | pDataToVerify | ) |

Check if data is a command acknowledgment.

Parameters

  pDataToVerify | The string to be checked

Returns
  true if verified

## ◆ IsEndOfPacket()

bool RawDataSensor::IsEndOfPacket | ( | string | pDataToVerify | ) |

Check if the data is an end of packet group.

Parameters

  pDataToVerify | The string to be checked

Returns
  true if verified

## ◆ IsFirstPacket()

bool RawDataSensor::IsFirstPacket | ( | string | pDataToVerify | ) |

Check if the data is the first packet group.

Parameters

  pDataToVerify | The string to be checked

Returns
  true if verified

## ◆ IsHeader()

bool RawDataSensor::IsHeader | ( | string | pDataToVerify | ) |

Check if data is a HEADER.

Parameters

  pDataToVerify | The string to be checked

Returns
  true if verified

## ◆ RebootDevice()

void RawDataSensor::RebootDevice | ( |  | ) |

Reboots the device.

## ◆ ResetDevice()

void RawDataSensor::ResetDevice | ( |  | ) |

Resets the device.

## ◆ RetrieveRawData()

RawData RawDataSensor::RetrieveRawData | ( |  | ) |

Wait for Raw Data availability.

Returns
  A pointer to the dequeued raw data

## ◆ SendMdi()

void RawDataSensor::SendMdi | ( |  | ) |

Request the sensor to start sending MDI data to host.

## ◆ SetAngleRange()

ConfigurationResult RawDataSensor::SetAngleRange | ( | AngleRange | pAngleRange | ) |

Sets the Angle range (start and stop)

Parameters

  pAngleRange | The encapsulation of the angle range to be set

Returns
  A configuration result encapsulation

## ◆ SetAngularResolution()

ConfigurationResult RawDataSensor::SetAngularResolution | ( | SensorResolutionFrequencyEnum | pResolution | ) |

Sets the angle resolution. Can be either 80Hz or 40Hz.

Parameters

  pResolution |

Returns
  A configuration result encapsulation

## ◆ SetContaminationThreshold()

ConfigurationResult RawDataSensor::SetContaminationThreshold | ( | ContaminationThreshold | pContaminationThreshold | ) |

Sets the contamination level threshold for warning and error.

Parameters

  pContaminationThreshold | The encapsulation of contamination leve threshold

Returns
  A configuration result encapsulation

## ◆ SetDataPacketType()

ConfigurationResult RawDataSensor::SetDataPacketType | ( | SCAN_PACKET_TYPE | pPacketType | ) |

Sets the packet type returned in raw data. Can be either DISTANCE or DISTANCE_INTENSITY.

Parameters

  pPacketType | The packet type to be set

Returns
  A configuration result encapsulation

## ◆ SetDeviceName()

ConfigurationResult RawDataSensor::SetDeviceName | ( | string | pName | ) |

Sets the sensor's name.

Returns
  A string representing the sensor's name

## ◆ SetFilterStatus()

ConfigurationResult RawDataSensor::SetFilterStatus | ( | FILTER_STATUS | pFilterStatus | ) |

Sets the sensor's filter status.

Parameters

  pFilterStatus | FILTER_ON or FILTER_OFF will enable / disable the filter

Returns

## ◆ SetImmunityLevel()

ConfigurationResult RawDataSensor::SetImmunityLevel | ( | int | pImmunityLevel | ) |

Sets the sensor's immunity level.

Parameters

  pImmunityLevel | The immunity level to be set

Returns
  A configuration result encapsulation

## ◆ SetNetworkInformation()

ConfigurationResult RawDataSensor::SetNetworkInformation | ( | NetworkInformation | pNetwork | ) |

Set the overall network information except IP v4 and Port.

Parameters

  pNetwork | An encapsulation of the network data

Returns
  A configuration result encapsulation

## ◆ SetRawDataExchangeMode()

ConfigurationResult RawDataSensor::SetRawDataExchangeMode | ( | PROTOCOL | pProtocol | ) |

Sets the RAW data exchange mode. Can be either TCP or UDP.

Parameters

  pProtocol | The exchange mode (TCP or UDP)

Returns
  A configuration result encapsulation

## ◆ SetScanningDirection()

ConfigurationResult RawDataSensor::SetScanningDirection | ( | SCANNING_DIRECTION | pScanDirection | ) |

Sets the scanning direction. Can be either CLOCKWISE or COUNTER_CLOCKWISE.

Parameters

  pScanDirection |

Returns
  A configuration result encapsulation

## ◆ SetSensorLeds()

ConfigurationResult RawDataSensor::SetSensorLeds | ( | SensorLeds | pLeds | ) |

Sets the sensors external leds status (ON or OFF)

Parameters

  pLeds | The encapsulation of the leds to be set

Returns
  A configuration result encapsulation

## ◆ SetSkipScan()

ConfigurationResult RawDataSensor::SetSkipScan | ( | int | pSkipScan | ) |

Sets the skip scan.

Parameters

  pSkipScan | The skip scan value to be set

Returns
  A configuration result encapsulation

## ◆ StartWindowCalibration()

ConfigurationResult RawDataSensor::StartWindowCalibration | ( |  | ) |

Starts the window calibration.

Returns

## ◆ StopMdi()

void RawDataSensor::StopMdi | ( |  | ) |

Request the sensor to stop sending MDI data to host.

## Friends And Related Symbol Documentation

## ◆ AgvSensor

friend class AgvSensor
| friend

## Member Data Documentation

## ◆ GetImmu

string RawDataSensor::GetImmu = { 0x47 ,0x65 ,0x74 ,0x49, 0x6D, 0x6D, 0x75 }
| protected

## ◆ SetImmu

string RawDataSensor::SetImmu = { 0x53, 0x65, 0x74, 0x49, 0x6D, 0x6D, 0x75 }
| protected

The documentation for this class was generated from the following files:

- RawDataSensor.h
- RawDataSensor.cpp