Builder for constructing CoLaCommands. More...
#include <CoLaParameterWriter.h>
Public Member Functions | |
const CoLaCommand | build () |
CoLaParameterWriter (CoLaCommandType::Enum type, const char *name) | |
Construct a new CoLaParameterWriter. More... | |
CoLaParameterWriter & | operator<< (const bool boolean) |
Add a boolean as a byte, with 0 representing false, and 1 representing true. More... | |
CoLaParameterWriter & | operator<< (const char *str) |
Add a string parameter, must be null-terminated. More... | |
CoLaParameterWriter & | operator<< (const double lReal) |
Add a IEEE-754 double precision (64-bit). More... | |
CoLaParameterWriter & | operator<< (const float real) |
Add a IEEE-754 single precision (32-bit). More... | |
CoLaParameterWriter & | operator<< (const int16_t integer) |
Add a signed int (16-bit). More... | |
CoLaParameterWriter & | operator<< (const int32_t dInt) |
Add an signed double int (32-bit). More... | |
CoLaParameterWriter & | operator<< (const int8_t sInt) |
Add a signed short (8-bit, range [-128, 127]). More... | |
CoLaParameterWriter & | operator<< (const uint16_t uInt) |
Add a unsigned int (16-bit, range [0, 65535]). More... | |
CoLaParameterWriter & | operator<< (const uint32_t uDInt) |
Add an unsigned double int (32-bit, range [0, 4294967295]). More... | |
CoLaParameterWriter & | operator<< (const uint8_t uSInt) |
Add a unsigned short (8-bit, range [0, 255]). More... | |
CoLaParameterWriter & | parameterBool (const bool boolean) |
Add a boolean as a byte, with 0 representing false, and 1 representing true. More... | |
CoLaParameterWriter & | parameterDInt (const int32_t dInt) |
Add an signed double int (32-bit). More... | |
CoLaParameterWriter & | parameterFlexString (const std::string &str) |
Add a string as a flex string. More... | |
CoLaParameterWriter & | parameterInt (const int16_t integer) |
Add a signed int (16-bit). More... | |
CoLaParameterWriter & | parameterLReal (const double lReal) |
Add a IEEE-754 double precision (64-bit). More... | |
CoLaParameterWriter & | parameterPasswordMD5 (const std::string &str) |
Add the given password as a UDInt, using MD5 hashing. More... | |
CoLaParameterWriter & | parameterReal (const float real) |
Add a IEEE-754 single precision (32-bit). More... | |
CoLaParameterWriter & | parameterSInt (const int8_t sInt) |
Add a signed short (8-bit, range [-128, 127]). More... | |
CoLaParameterWriter & | parameterUDInt (const uint32_t uDInt) |
Add an unsigned double int (32-bit, range [0, 4294967295]). More... | |
CoLaParameterWriter & | parameterUInt (const uint16_t uInt) |
Add a unsigned int (16-bit, range [0, 65535]). More... | |
CoLaParameterWriter & | parameterUSInt (const uint8_t uSInt) |
Add a unsigned short (8-bit, range [0, 255]). More... | |
~CoLaParameterWriter () | |
Private Member Functions | |
void | writeHeader (CoLaCommandType::Enum type, const char *name) |
Private Attributes | |
std::vector< uint8_t > | m_buffer |
const char * | m_name |
CoLaCommandType::Enum | m_type |
Builder for constructing CoLaCommands.
Definition at line 19 of file CoLaParameterWriter.h.
visionary::CoLaParameterWriter::CoLaParameterWriter | ( | CoLaCommandType::Enum | type, |
const char * | name | ||
) |
Construct a new CoLaParameterWriter.
type | Type of command. |
name | The command, e.g. for methods this should be the "communication name" from the CID. |
Definition at line 17 of file CoLaParameterWriter.cpp.
|
default |
const CoLaCommand visionary::CoLaParameterWriter::build | ( | ) |
Definition at line 181 of file CoLaParameterWriter.cpp.
CoLaParameterWriter & visionary::CoLaParameterWriter::operator<< | ( | const bool | boolean | ) |
Add a boolean as a byte, with 0 representing false, and 1 representing true.
boolean | Boolean to add. |
Definition at line 176 of file CoLaParameterWriter.cpp.
CoLaParameterWriter & visionary::CoLaParameterWriter::operator<< | ( | const char * | str | ) |
Add a string parameter, must be null-terminated.
str | String to add. |
Definition at line 130 of file CoLaParameterWriter.cpp.
CoLaParameterWriter & visionary::CoLaParameterWriter::operator<< | ( | const double | lReal | ) |
Add a IEEE-754 double precision (64-bit).
lReal | Long real to add. |
Definition at line 171 of file CoLaParameterWriter.cpp.
CoLaParameterWriter & visionary::CoLaParameterWriter::operator<< | ( | const float | real | ) |
Add a IEEE-754 single precision (32-bit).
real | Real to add. |
Definition at line 166 of file CoLaParameterWriter.cpp.
CoLaParameterWriter & visionary::CoLaParameterWriter::operator<< | ( | const int16_t | integer | ) |
Add a signed int (16-bit).
integer | Int to add. |
Definition at line 146 of file CoLaParameterWriter.cpp.
CoLaParameterWriter & visionary::CoLaParameterWriter::operator<< | ( | const int32_t | dInt | ) |
Add an signed double int (32-bit).
dInt | dInt to add. |
Definition at line 156 of file CoLaParameterWriter.cpp.
CoLaParameterWriter & visionary::CoLaParameterWriter::operator<< | ( | const int8_t | sInt | ) |
Add a signed short (8-bit, range [-128, 127]).
sInt | SInt to add |
Definition at line 136 of file CoLaParameterWriter.cpp.
CoLaParameterWriter & visionary::CoLaParameterWriter::operator<< | ( | const uint16_t | uInt | ) |
Add a unsigned int (16-bit, range [0, 65535]).
uInt | UInt to add. |
Definition at line 151 of file CoLaParameterWriter.cpp.
CoLaParameterWriter & visionary::CoLaParameterWriter::operator<< | ( | const uint32_t | uDInt | ) |
Add an unsigned double int (32-bit, range [0, 4294967295]).
uDInt | UDInt to add. |
Definition at line 161 of file CoLaParameterWriter.cpp.
CoLaParameterWriter & visionary::CoLaParameterWriter::operator<< | ( | const uint8_t | uSInt | ) |
Add a unsigned short (8-bit, range [0, 255]).
uSInt | USInt to add. |
Definition at line 141 of file CoLaParameterWriter.cpp.
CoLaParameterWriter & visionary::CoLaParameterWriter::parameterBool | ( | const bool | boolean | ) |
Add a boolean as a byte, with 0 representing false, and 1 representing true.
boolean | Boolean to add. |
Definition at line 90 of file CoLaParameterWriter.cpp.
CoLaParameterWriter & visionary::CoLaParameterWriter::parameterDInt | ( | const int32_t | dInt | ) |
Add an signed double int (32-bit).
dInt | dInt to add. |
Definition at line 54 of file CoLaParameterWriter.cpp.
CoLaParameterWriter & visionary::CoLaParameterWriter::parameterFlexString | ( | const std::string & | str | ) |
Add a string as a flex string.
str | String to add. |
Definition at line 115 of file CoLaParameterWriter.cpp.
CoLaParameterWriter & visionary::CoLaParameterWriter::parameterInt | ( | const int16_t | integer | ) |
Add a signed int (16-bit).
integer | Int to add. |
Definition at line 36 of file CoLaParameterWriter.cpp.
CoLaParameterWriter & visionary::CoLaParameterWriter::parameterLReal | ( | const double | lReal | ) |
Add a IEEE-754 double precision (64-bit).
lReal | Long real to add. |
Definition at line 81 of file CoLaParameterWriter.cpp.
CoLaParameterWriter & visionary::CoLaParameterWriter::parameterPasswordMD5 | ( | const std::string & | str | ) |
Add the given password as a UDInt, using MD5 hashing.
str | String to hash and add as parameter. |
Definition at line 96 of file CoLaParameterWriter.cpp.
CoLaParameterWriter & visionary::CoLaParameterWriter::parameterReal | ( | const float | real | ) |
Add a IEEE-754 single precision (32-bit).
real | Real to add. |
Definition at line 72 of file CoLaParameterWriter.cpp.
CoLaParameterWriter & visionary::CoLaParameterWriter::parameterSInt | ( | const int8_t | sInt | ) |
Add a signed short (8-bit, range [-128, 127]).
sInt | SInt to add |
Definition at line 24 of file CoLaParameterWriter.cpp.
CoLaParameterWriter & visionary::CoLaParameterWriter::parameterUDInt | ( | const uint32_t | uDInt | ) |
Add an unsigned double int (32-bit, range [0, 4294967295]).
uDInt | UDInt to add. |
Definition at line 63 of file CoLaParameterWriter.cpp.
CoLaParameterWriter & visionary::CoLaParameterWriter::parameterUInt | ( | const uint16_t | uInt | ) |
Add a unsigned int (16-bit, range [0, 65535]).
uInt | UInt to add. |
Definition at line 45 of file CoLaParameterWriter.cpp.
CoLaParameterWriter & visionary::CoLaParameterWriter::parameterUSInt | ( | const uint8_t | uSInt | ) |
Add a unsigned short (8-bit, range [0, 255]).
uSInt | USInt to add. |
Definition at line 30 of file CoLaParameterWriter.cpp.
|
private |
Definition at line 189 of file CoLaParameterWriter.cpp.
|
private |
Definition at line 24 of file CoLaParameterWriter.h.
|
private |
Definition at line 23 of file CoLaParameterWriter.h.
|
private |
Definition at line 22 of file CoLaParameterWriter.h.