CoLaParameterReader.h
Go to the documentation of this file.
1 // -- BEGIN LICENSE BLOCK ----------------------------------------------
20 // -- END LICENSE BLOCK ------------------------------------------------
21 
22 #pragma once
23 
24 #include "CoLaCommand.h"
25 #include <cstdint>
26 #include <string>
27 
28 namespace visionary {
29 
34 {
35 private:
38 
39 public:
42 
46  void rewind();
47 
51  int8_t readSInt();
52 
56  uint8_t readUSInt();
57 
61  int16_t readInt();
62 
66  uint16_t readUInt();
67 
71  int32_t readDInt();
72 
76  uint32_t readUDInt();
77 
81  float readReal();
82 
86  double readLReal();
87 
91  bool readBool();
92 
96  std::string readFlexString();
97 };
98 
99 } // namespace visionary
visionary::CoLaParameterReader::readInt
int16_t readInt()
Read a signed int (16 bit, range [-32768, 32767]) and advances position by 2 bytes.
Definition: CoLaParameterReader.cpp:54
visionary::CoLaParameterReader::CoLaParameterReader
CoLaParameterReader(CoLaCommand command)
Definition: CoLaParameterReader.cpp:27
visionary::CoLaParameterReader::readReal
float readReal()
Read a IEEE-754 single precision (32 bit) and advances position by 4 bytes.
Definition: CoLaParameterReader.cpp:86
visionary::CoLaParameterReader
Class for reading data from a CoLaCommand.
Definition: CoLaParameterReader.h:33
visionary
Definition: AuthenticationLegacy.h:25
visionary::CoLaCommand
Definition: CoLaCommand.h:32
visionary::CoLaParameterReader::m_command
CoLaCommand m_command
Definition: CoLaParameterReader.h:36
visionary::CoLaParameterReader::readSInt
int8_t readSInt()
Read a signed short int (8 bit, range [-128, 127]) and advances position by 1 byte.
Definition: CoLaParameterReader.cpp:40
visionary::CoLaParameterReader::rewind
void rewind()
Rewind the position to the first parameter.
Definition: CoLaParameterReader.cpp:35
visionary::CoLaParameterReader::readUSInt
uint8_t readUSInt()
Read a unsigned short int (8 bit, range [0, 255]) and advances position by 1 byte.
Definition: CoLaParameterReader.cpp:47
visionary::CoLaParameterReader::readBool
bool readBool()
Read a boolean and advance the position by 1 byte.
Definition: CoLaParameterReader.cpp:100
visionary::CoLaParameterReader::readUInt
uint16_t readUInt()
Read a unsigned int (16 bit, range [0, 65535]) and advances position by 2 bytes.
Definition: CoLaParameterReader.cpp:62
visionary::CoLaParameterReader::readDInt
int32_t readDInt()
Read a signed double int (32 bit) and advances position by 4 bytes.
Definition: CoLaParameterReader.cpp:70
CoLaCommand.h
visionary::CoLaParameterReader::~CoLaParameterReader
~CoLaParameterReader()
Definition: CoLaParameterReader.cpp:33
visionary::CoLaParameterReader::readLReal
double readLReal()
Read a IEEE-754 double precision (64 bit) and advances position by 8 bytes.
Definition: CoLaParameterReader.cpp:93
visionary::CoLaParameterReader::readFlexString
std::string readFlexString()
Read a flex string, and advance position according to string size.
Definition: CoLaParameterReader.cpp:105
visionary::CoLaParameterReader::readUDInt
uint32_t readUDInt()
Read a unsigned int (32 bit) and advances position by 4 bytes.
Definition: CoLaParameterReader.cpp:78
visionary::CoLaParameterReader::m_currentPosition
size_t m_currentPosition
Definition: CoLaParameterReader.h:37


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