Classes | Public Types | Public Member Functions | Private Types | Private Member Functions | Private Attributes | Static Private Attributes
ScannerSickS300 Class Reference

#include <ScannerSickS300.h>

List of all members.

Classes

struct  ParamType
struct  ScanPolarType

Public Types

enum  { SCANNER_S300_READ_BUF_SIZE = 10000, READ_BUF_SIZE = 10000, WRITE_BUF_SIZE = 10000 }

Public Member Functions

bool getScan (std::vector< double > &vdDistanceM, std::vector< double > &vdAngleRAD, std::vector< double > &vdIntensityAU, unsigned int &iTimestamp, unsigned int &iTimeNow, const bool debug)
bool isInStandby ()
bool open (const char *pcPort, int iBaudRate, int iScanId)
void purgeScanBuf ()
void resetStartup ()
 ScannerSickS300 ()
void setRangeField (const int field, const ParamType &param)
void startScanner ()
void stopScanner ()
 ~ScannerSickS300 ()

Private Types

typedef std::map< int, ParamTypePARAM_MAP

Private Member Functions

void convertScanToPolar (const PARAM_MAP::const_iterator param, std::vector< int > viScanRaw, std::vector< ScanPolarType > &vecScanPolar)

Private Attributes

int m_actualBufferSize
bool m_bInStandby
double m_dBaudMult
int m_iPosReadBuf2
PARAM_MAP m_Params
unsigned char m_ReadBuf [READ_BUF_SIZE+10]
unsigned char m_ReadBuf2 [READ_BUF_SIZE+10]
SerialIO m_SerialIO
unsigned int m_uiSumReadBytes
std::vector< int > m_viScanRaw
TelegramParser tp_

Static Private Attributes

static const double c_dPi = 3.14159265358979323846
static unsigned char m_iScanId = 7

Detailed Description

Driver class for the laser scanner SICK S300 Professional. This driver only supports use with 500KBaud in cont. mode

if the scanner is in standby, the measurements are 0x4004 according to the Sick Support

Definition at line 40 of file ScannerSickS300.h.


Member Typedef Documentation

typedef std::map<int, ParamType> ScannerSickS300::PARAM_MAP [private]

Definition at line 107 of file ScannerSickS300.h.


Member Enumeration Documentation

anonymous enum
Enumerator:
SCANNER_S300_READ_BUF_SIZE 
READ_BUF_SIZE 
WRITE_BUF_SIZE 

Definition at line 61 of file ScannerSickS300.h.


Constructor & Destructor Documentation

Definition at line 80 of file ScannerSickS300.cpp.

Definition at line 96 of file ScannerSickS300.cpp.


Member Function Documentation

void ScannerSickS300::convertScanToPolar ( const PARAM_MAP::const_iterator  param,
std::vector< int >  viScanRaw,
std::vector< ScanPolarType > &  vecScanPolar 
) [private]

Definition at line 219 of file ScannerSickS300.cpp.

bool ScannerSickS300::getScan ( std::vector< double > &  vdDistanceM,
std::vector< double > &  vdAngleRAD,
std::vector< double > &  vdIntensityAU,
unsigned int &  iTimestamp,
unsigned int &  iTimeNow,
const bool  debug 
)

Definition at line 160 of file ScannerSickS300.cpp.

bool ScannerSickS300::isInStandby ( ) [inline]

Definition at line 93 of file ScannerSickS300.h.

bool ScannerSickS300::open ( const char *  pcPort,
int  iBaudRate,
int  iScanId = 7 
)

Opens serial port.

Parameters:
pcPortused "COMx" or "/dev/tty1"
iBaudRatebaud rate
iScanIdthe scanner id in the data header (7 by default)

Definition at line 103 of file ScannerSickS300.cpp.

Definition at line 135 of file ScannerSickS300.cpp.

Definition at line 143 of file ScannerSickS300.cpp.

void ScannerSickS300::setRangeField ( const int  field,
const ParamType param 
) [inline]

Definition at line 99 of file ScannerSickS300.h.

Definition at line 149 of file ScannerSickS300.cpp.

Definition at line 155 of file ScannerSickS300.cpp.


Member Data Documentation

const double ScannerSickS300::c_dPi = 3.14159265358979323846 [static, private]

Definition at line 104 of file ScannerSickS300.h.

Definition at line 118 of file ScannerSickS300.h.

Definition at line 119 of file ScannerSickS300.h.

double ScannerSickS300::m_dBaudMult [private]

Definition at line 109 of file ScannerSickS300.h.

Definition at line 116 of file ScannerSickS300.h.

unsigned char ScannerSickS300::m_iScanId = 7 [static, private]

Definition at line 117 of file ScannerSickS300.h.

Definition at line 108 of file ScannerSickS300.h.

unsigned char ScannerSickS300::m_ReadBuf[READ_BUF_SIZE+10] [private]

Definition at line 112 of file ScannerSickS300.h.

unsigned char ScannerSickS300::m_ReadBuf2[READ_BUF_SIZE+10] [private]

Definition at line 113 of file ScannerSickS300.h.

Definition at line 122 of file ScannerSickS300.h.

unsigned int ScannerSickS300::m_uiSumReadBytes [private]

Definition at line 114 of file ScannerSickS300.h.

std::vector<int> ScannerSickS300::m_viScanRaw [private]

Definition at line 115 of file ScannerSickS300.h.

Definition at line 123 of file ScannerSickS300.h.


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


cob_sick_s300
Author(s): Florian Weisshardt
autogenerated on Sat Jun 8 2019 21:02:23