Public Member Functions | Private Attributes | List of all members
visionary::CoLaParameterReader Class Reference

Class for reading data from a CoLaCommand. More...

#include <CoLaParameterReader.h>

Public Member Functions

 CoLaParameterReader (CoLaCommand command)
 
bool readBool ()
 Read a boolean and advance the position by 1 byte. More...
 
int32_t readDInt ()
 Read a signed double int (32 bit) and advances position by 4 bytes. More...
 
std::string readFlexString ()
 Read a flex string, and advance position according to string size. More...
 
int16_t readInt ()
 Read a signed int (16 bit, range [-32768, 32767]) and advances position by 2 bytes. More...
 
double readLReal ()
 Read a IEEE-754 double precision (64 bit) and advances position by 8 bytes. More...
 
float readReal ()
 Read a IEEE-754 single precision (32 bit) and advances position by 4 bytes. More...
 
int8_t readSInt ()
 Read a signed short int (8 bit, range [-128, 127]) and advances position by 1 byte. More...
 
uint32_t readUDInt ()
 Read a unsigned int (32 bit) and advances position by 4 bytes. More...
 
uint16_t readUInt ()
 Read a unsigned int (16 bit, range [0, 65535]) and advances position by 2 bytes. More...
 
uint8_t readUSInt ()
 Read a unsigned short int (8 bit, range [0, 255]) and advances position by 1 byte. More...
 
void rewind ()
 Rewind the position to the first parameter. More...
 
 ~CoLaParameterReader ()
 

Private Attributes

CoLaCommand m_command
 
size_t m_currentPosition
 

Detailed Description

Class for reading data from a CoLaCommand.

Definition at line 33 of file CoLaParameterReader.h.

Constructor & Destructor Documentation

◆ CoLaParameterReader()

visionary::CoLaParameterReader::CoLaParameterReader ( CoLaCommand  command)

Definition at line 27 of file CoLaParameterReader.cpp.

◆ ~CoLaParameterReader()

visionary::CoLaParameterReader::~CoLaParameterReader ( )

Definition at line 33 of file CoLaParameterReader.cpp.

Member Function Documentation

◆ readBool()

bool visionary::CoLaParameterReader::readBool ( )

Read a boolean and advance the position by 1 byte.

Definition at line 100 of file CoLaParameterReader.cpp.

◆ readDInt()

int32_t visionary::CoLaParameterReader::readDInt ( )

Read a signed double int (32 bit) and advances position by 4 bytes.

Definition at line 70 of file CoLaParameterReader.cpp.

◆ readFlexString()

std::string visionary::CoLaParameterReader::readFlexString ( )

Read a flex string, and advance position according to string size.

Definition at line 105 of file CoLaParameterReader.cpp.

◆ readInt()

int16_t visionary::CoLaParameterReader::readInt ( )

Read a signed int (16 bit, range [-32768, 32767]) and advances position by 2 bytes.

Definition at line 54 of file CoLaParameterReader.cpp.

◆ readLReal()

double visionary::CoLaParameterReader::readLReal ( )

Read a IEEE-754 double precision (64 bit) and advances position by 8 bytes.

Definition at line 93 of file CoLaParameterReader.cpp.

◆ readReal()

float visionary::CoLaParameterReader::readReal ( )

Read a IEEE-754 single precision (32 bit) and advances position by 4 bytes.

Definition at line 86 of file CoLaParameterReader.cpp.

◆ readSInt()

int8_t visionary::CoLaParameterReader::readSInt ( )

Read a signed short int (8 bit, range [-128, 127]) and advances position by 1 byte.

Definition at line 40 of file CoLaParameterReader.cpp.

◆ readUDInt()

uint32_t visionary::CoLaParameterReader::readUDInt ( )

Read a unsigned int (32 bit) and advances position by 4 bytes.

Definition at line 78 of file CoLaParameterReader.cpp.

◆ readUInt()

uint16_t visionary::CoLaParameterReader::readUInt ( )

Read a unsigned int (16 bit, range [0, 65535]) and advances position by 2 bytes.

Definition at line 62 of file CoLaParameterReader.cpp.

◆ readUSInt()

uint8_t visionary::CoLaParameterReader::readUSInt ( )

Read a unsigned short int (8 bit, range [0, 255]) and advances position by 1 byte.

Definition at line 47 of file CoLaParameterReader.cpp.

◆ rewind()

void visionary::CoLaParameterReader::rewind ( )

Rewind the position to the first parameter.

Definition at line 35 of file CoLaParameterReader.cpp.

Member Data Documentation

◆ m_command

CoLaCommand visionary::CoLaParameterReader::m_command
private

Definition at line 36 of file CoLaParameterReader.h.

◆ m_currentPosition

size_t visionary::CoLaParameterReader::m_currentPosition
private

Definition at line 37 of file CoLaParameterReader.h.


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


sick_safevisionary_base
Author(s):
autogenerated on Sat Oct 21 2023 02:24:26