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

#include <TelegramS300.h>

List of all members.

Classes

union  TELEGRAM_COMMON1
union  TELEGRAM_COMMON2
union  TELEGRAM_COMMON3
union  TELEGRAM_DISTANCE
union  TELEGRAM_S300_DIST_2B
union  TELEGRAM_TAIL

Public Member Functions

int getCompletePacketSize () const
int getField () const
bool isDist () const
bool parseHeader (const unsigned char *buffer, const size_t max_size, const uint8_t DEVICE_ADDR, const bool debug)
void readDistRaw (const unsigned char *buffer, std::vector< int > &res) const
 TelegramParser ()

Private Types

enum  TELEGRAM_COMMON_HS { JUNK_SIZE = 4 }
enum  TELEGRAM_COMMON_TYPES { IO = 0xAAAA, DISTANCE = 0xBBBB, REFLEXION = 0xCCCC }
enum  TELEGRAM_DIST_SECTOR {
  _1 = 0x1111, _2 = 0x2222, _3 = 0x3333, _4 = 0x4444,
  _5 = 0x5555
}

Static Private Member Functions

static bool check (const TELEGRAM_COMMON1 &tc, const uint8_t DEVICE_ADDR)
static unsigned int createCRC (uint8_t *ptrData, int Size)
static void ntoh (TELEGRAM_COMMON1 &tc)
static void ntoh (TELEGRAM_COMMON2 &tc)
static void ntoh (TELEGRAM_COMMON3 &tc)
static void ntoh (TELEGRAM_DISTANCE &tc)
static void ntoh (TELEGRAM_TAIL &tc)
static void print (const TELEGRAM_COMMON1 &tc)
static void print (const TELEGRAM_COMMON2 &tc)
static void print (const TELEGRAM_COMMON3 &tc)
static void print (const TELEGRAM_DISTANCE &tc)
static void print (const TELEGRAM_TAIL &tc)

Private Attributes

int last_offset_
TELEGRAM_COMMON1 tc1_
TELEGRAM_COMMON2 tc2_
TELEGRAM_COMMON3 tc3_
TELEGRAM_DISTANCE td_

Detailed Description

Definition at line 58 of file TelegramS300.h.


Member Enumeration Documentation

Enumerator:
JUNK_SIZE 

Definition at line 114 of file TelegramS300.h.

Enumerator:
IO 
DISTANCE 
REFLEXION 

Definition at line 115 of file TelegramS300.h.

Enumerator:
_1 
_2 
_3 
_4 
_5 

Definition at line 116 of file TelegramS300.h.


Constructor & Destructor Documentation

Definition at line 217 of file TelegramS300.h.


Member Function Documentation

static bool TelegramParser::check ( const TELEGRAM_COMMON1 tc,
const uint8_t  DEVICE_ADDR 
) [inline, static, private]

Definition at line 196 of file TelegramS300.h.

unsigned int TelegramParser::createCRC ( uint8_t *  ptrData,
int  Size 
) [static, private]

Definition at line 101 of file ScannerSickS300.cpp.

int TelegramParser::getCompletePacketSize ( ) const [inline]

Definition at line 309 of file TelegramS300.h.

int TelegramParser::getField ( ) const [inline]

Definition at line 298 of file TelegramS300.h.

bool TelegramParser::isDist ( ) const [inline]

Definition at line 297 of file TelegramS300.h.

static void TelegramParser::ntoh ( TELEGRAM_COMMON1 tc) [inline, static, private]

Definition at line 119 of file TelegramS300.h.

static void TelegramParser::ntoh ( TELEGRAM_COMMON2 tc) [inline, static, private]

Definition at line 125 of file TelegramS300.h.

static void TelegramParser::ntoh ( TELEGRAM_COMMON3 tc) [inline, static, private]

Definition at line 132 of file TelegramS300.h.

static void TelegramParser::ntoh ( TELEGRAM_DISTANCE tc) [inline, static, private]

Definition at line 136 of file TelegramS300.h.

static void TelegramParser::ntoh ( TELEGRAM_TAIL tc) [inline, static, private]

Definition at line 140 of file TelegramS300.h.

bool TelegramParser::parseHeader ( const unsigned char *  buffer,
const size_t  max_size,
const uint8_t  DEVICE_ADDR,
const bool  debug 
) [inline]

Definition at line 219 of file TelegramS300.h.

static void TelegramParser::print ( const TELEGRAM_COMMON1 tc) [inline, static, private]

Definition at line 145 of file TelegramS300.h.

static void TelegramParser::print ( const TELEGRAM_COMMON2 tc) [inline, static, private]

Definition at line 154 of file TelegramS300.h.

static void TelegramParser::print ( const TELEGRAM_COMMON3 tc) [inline, static, private]

Definition at line 161 of file TelegramS300.h.

static void TelegramParser::print ( const TELEGRAM_DISTANCE tc) [inline, static, private]

Definition at line 172 of file TelegramS300.h.

static void TelegramParser::print ( const TELEGRAM_TAIL tc) [inline, static, private]

Definition at line 186 of file TelegramS300.h.

void TelegramParser::readDistRaw ( const unsigned char *  buffer,
std::vector< int > &  res 
) const [inline]

Definition at line 313 of file TelegramS300.h.


Member Data Documentation

Definition at line 214 of file TelegramS300.h.

Definition at line 210 of file TelegramS300.h.

Definition at line 211 of file TelegramS300.h.

Definition at line 212 of file TelegramS300.h.

Definition at line 213 of file TelegramS300.h.


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


cob_sick_s300
Author(s): Florian Weisshardt
autogenerated on Thu Aug 27 2015 12:45:42