Public Member Functions | Private Attributes | List of all members
sick_scan::SickGenericParser Class Reference

#include <sick_generic_parser.h>

Inheritance diagram for sick_scan::SickGenericParser:
Inheritance graph
[legend]

Public Member Functions

int checkForDistAndRSSI (std::vector< char * > &fields, int expected_number_of_data, int &distNum, int &rssiNum, std::vector< float > &distVal, std::vector< float > &rssiVal, int &distMask)
 check for DIST and RSSI-entries in the datagram. Helper routine for parser More...
 
void checkScanTiming (float time_increment, float scan_time, float angle_increment, float tol)
 
float get_range_max (void)
 Getting maximum range. More...
 
float get_range_min (void)
 Getting minimum range. More...
 
ScannerBasicParamgetCurrentParamPtr ()
 Gets Pointer to parameter object. More...
 
std::string getScannerType (void)
 getting scannertype More...
 
int lookUpForAllowedScanner (std::string scannerName)
 checks the given scannerName/scannerType of validity More...
 
virtual int parse_datagram (char *datagram, size_t datagram_length, SickScanConfig &config, sensor_msgs::LaserScan &msg, int &numEchos, int &echoMask)
 Parsing Ascii datagram. More...
 
void set_range_max (float max)
 Setting maximum range. More...
 
void set_range_min (float min)
 Setting minimum range. More...
 
void set_time_increment (float time)
 setting time increment between shots More...
 
void setCurrentParamPtr (ScannerBasicParam *_ptr)
 Set pointer to corresponding parameter object to the parser. More...
 
void setScannerType (std::string s)
 setting scannertype More...
 
 SickGenericParser (std::string scannerType)
 Construction of parser object. More...
 
virtual ~SickGenericParser ()
 Destructor of parser. More...
 
- Public Member Functions inherited from sick_scan::AbstractParser
 AbstractParser ()
 
virtual ~AbstractParser ()
 

Private Attributes

std::vector< std::string > allowedScannerNames
 
std::vector< ScannerBasicParambasicParams
 
ScannerBasicParamcurrentParamSet
 
float override_range_max_
 
float override_range_min_
 
float override_time_increment_
 
std::string scannerType
 

Detailed Description

Definition at line 155 of file sick_generic_parser.h.

Constructor & Destructor Documentation

sick_scan::SickGenericParser::SickGenericParser ( std::string  _scanType)

Construction of parser object.

Parameters
_scanTypeType of the Laserscanner

Definition at line 395 of file sick_generic_parser.cpp.

sick_scan::SickGenericParser::~SickGenericParser ( )
virtual

Destructor of parser.

See also
Constructor SickGenericParser

Definition at line 687 of file sick_generic_parser.cpp.

Member Function Documentation

int sick_scan::SickGenericParser::checkForDistAndRSSI ( std::vector< char * > &  fields,
int  expected_number_of_data,
int &  distNum,
int &  rssiNum,
std::vector< float > &  distVal,
std::vector< float > &  rssiVal,
int &  distMask 
)

check for DIST and RSSI-entries in the datagram. Helper routine for parser

Parameters
fieldsString entries holding the information
expected_number_of_dataWarning, if the number of found entries does not correspond to this entries
distNumNumber of found DIST-entries
rssiNumNumber of found RSSI-entries
distValparsed istance values
rssiValparsed RSSI-values
distMaskBit-Masking holds the information of found DIST-entries (e.g. DIST1 -> Bit 0, DIST2 -> BIT 1 and so on)
Returns
Errorcode
See also
parse_datagram

Definition at line 704 of file sick_generic_parser.cpp.

void sick_scan::SickGenericParser::checkScanTiming ( float  time_increment,
float  scan_time,
float  angle_increment,
float  tol 
)

Definition at line 793 of file sick_generic_parser.cpp.

float sick_scan::SickGenericParser::get_range_max ( void  )

Getting maximum range.

Returns
range in [m]
See also
set_range_max

Definition at line 1179 of file sick_generic_parser.cpp.

float sick_scan::SickGenericParser::get_range_min ( void  )

Getting minimum range.

Returns
range in [m]
See also
set_range_min

Definition at line 1189 of file sick_generic_parser.cpp.

ScannerBasicParam * sick_scan::SickGenericParser::getCurrentParamPtr ( )

Gets Pointer to parameter object.

Returns
Pointer to parameter object holding information about protocol usage and scanner type specific parameter

Definition at line 659 of file sick_generic_parser.cpp.

std::string sick_scan::SickGenericParser::getScannerType ( void  )

getting scannertype

Returns
scannerType

Definition at line 1220 of file sick_generic_parser.cpp.

int sick_scan::SickGenericParser::lookUpForAllowedScanner ( std::string  scannerName)

checks the given scannerName/scannerType of validity

Parameters
scannerNameas string (e.g. "tim_5xx")
Returns
index of found scanner. -1 corresponds to "not found"

Definition at line 669 of file sick_generic_parser.cpp.

int sick_scan::SickGenericParser::parse_datagram ( char *  datagram,
size_t  datagram_length,
SickScanConfig &  config,
sensor_msgs::LaserScan &  msg,
int &  numEchos,
int &  echoMask 
)
virtual

Parsing Ascii datagram.

Parameters
datagramPointer to datagram data
datagram_lengthNumber of bytes in datagram
configPointer to Configdata
msgHolds result of Parsing
numEchosNumber of DIST-blocks found in message
echoMaskMask corresponding to DIST-block-identifier
Returns
set_range_max

Implements sick_scan::AbstractParser.

Definition at line 823 of file sick_generic_parser.cpp.

void sick_scan::SickGenericParser::set_range_max ( float  max)

Setting maximum range.

Parameters
maxrange in [m]
See also
set_range_min

Definition at line 1168 of file sick_generic_parser.cpp.

void sick_scan::SickGenericParser::set_range_min ( float  min)

Setting minimum range.

Parameters
minrange in [m]
See also
set_range_max

Definition at line 1158 of file sick_generic_parser.cpp.

void sick_scan::SickGenericParser::set_time_increment ( float  time)

setting time increment between shots

Parameters
timeincrement

Definition at line 1199 of file sick_generic_parser.cpp.

void sick_scan::SickGenericParser::setCurrentParamPtr ( ScannerBasicParam _ptr)

Set pointer to corresponding parameter object to the parser.

Parameters
_ptrto parameter object
See also
getCurrentParamPtr

Definition at line 166 of file sick_generic_parser.cpp.

void sick_scan::SickGenericParser::setScannerType ( std::string  _scannerType)

setting scannertype

Parameters
_scannerType
See also
getScannerType

Definition at line 1210 of file sick_generic_parser.cpp.

Member Data Documentation

std::vector<std::string> sick_scan::SickGenericParser::allowedScannerNames
private

Definition at line 197 of file sick_generic_parser.h.

std::vector<ScannerBasicParam> sick_scan::SickGenericParser::basicParams
private

Definition at line 198 of file sick_generic_parser.h.

ScannerBasicParam* sick_scan::SickGenericParser::currentParamSet
private

Definition at line 199 of file sick_generic_parser.h.

float sick_scan::SickGenericParser::override_range_max_
private

Definition at line 194 of file sick_generic_parser.h.

float sick_scan::SickGenericParser::override_range_min_
private

Definition at line 194 of file sick_generic_parser.h.

float sick_scan::SickGenericParser::override_time_increment_
private

Definition at line 195 of file sick_generic_parser.h.

std::string sick_scan::SickGenericParser::scannerType
private

Definition at line 196 of file sick_generic_parser.h.


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


sick_scan
Author(s): Michael Lehning , Jochen Sprickerhof , Martin Günther
autogenerated on Wed May 5 2021 03:05:49