libcluon  0.0.148
cluon Namespace Reference

Namespaces

 time
 

Classes

class  EnvelopeConverter
 
class  FromJSONVisitor
 
class  FromLCMVisitor
 
class  FromMsgPackVisitor
 
class  FromProtoVisitor
 
class  GenericMessage
 
class  IndexEntry
 
class  LCMToGenericMessage
 
class  MessageParser
 
class  MetaMessage
 
class  MetaMessageToCPPTransformator
 
class  MetaMessageToProtoTransformator
 
class  NotifyingPipeline
 
class  OD4Session
 
class  Player
 
class  SharedMemory
 
class  TCPConnection
 
class  TCPServer
 
class  TerminateHandler
 
class  ToCSVVisitor
 
class  ToJSONVisitor
 
class  ToLCMVisitor
 
class  ToMsgPackVisitor
 
class  ToODVDVisitor
 
class  ToProtoVisitor
 
class  UDPReceiver
 
class  UDPSender
 
class  UseUInt32ValueAsHashKey
 

Enumerations

enum  JSONConstants : uint16_t {
  JSONConstants::IS_FALSE = 0, JSONConstants::IS_TRUE = 1, JSONConstants::NUMBER = 2, JSONConstants::STRING = 3,
  JSONConstants::OBJECT = 4, JSONConstants::UNDEFINED = 99
}
 
enum  MsgPackConstants : uint16_t {
  MsgPackConstants::IS_FALSE = 0xC2, MsgPackConstants::IS_TRUE = 0xC3, MsgPackConstants::FLOAT = 0xCA, MsgPackConstants::DOUBLE = 0xCB,
  MsgPackConstants::UINT8 = 0xCC, MsgPackConstants::UINT16 = 0xCD, MsgPackConstants::UINT32 = 0xCE, MsgPackConstants::UINT64 = 0xCF,
  MsgPackConstants::NEGFIXINT = 0xE0, MsgPackConstants::INT8 = 0xD0, MsgPackConstants::INT16 = 0xD1, MsgPackConstants::INT32 = 0xD2,
  MsgPackConstants::INT64 = 0xD3, MsgPackConstants::FIXSTR = 0xA0, MsgPackConstants::FIXSTR_END = 0xBF, MsgPackConstants::STR8 = 0xD9,
  MsgPackConstants::STR16 = 0xDA, MsgPackConstants::STR32 = 0xDB, MsgPackConstants::FIXMAP = 0x80, MsgPackConstants::FIXMAP_END = 0x8F,
  MsgPackConstants::MAP16 = 0xDE, MsgPackConstants::MAP32 = 0xDF, MsgPackConstants::UNKNOWN_FORMAT = 0xFF00, MsgPackConstants::BOOL_FORMAT = 0xFF01,
  MsgPackConstants::UINT_FORMAT = 0xFF02, MsgPackConstants::INT_FORMAT = 0xFF03, MsgPackConstants::FLOAT_FORMAT = 0xFF04, MsgPackConstants::STR_FORMAT = 0xFF05,
  MsgPackConstants::MAP_FORMAT = 0xFF06
}
 
enum  ProtoConstants : uint8_t { ProtoConstants::VARINT = 0, ProtoConstants::EIGHT_BYTES = 1, ProtoConstants::LENGTH_DELIMITED = 2, ProtoConstants::FOUR_BYTES = 5 }
 
enum  UDPPacketSizeConstraints : uint16_t { UDPPacketSizeConstraints::SIZE_IPv4_HEADER = 20, UDPPacketSizeConstraints::SIZE_UDP_HEADER = 8, UDPPacketSizeConstraints::MAX_SIZE_UDP_PACKET = 0xFFFF }
 

Functions

std::map< std::string, std::string > getCommandlineArguments (int32_t argc, char **argv) noexcept
 
std::string serializeEnvelope (cluon::data::Envelope &&envelope) noexcept
 
std::pair< bool, cluon::data::Envelope > extractEnvelope (std::istream &in) noexcept
 
template<typename T >
extractMessage (cluon::data::Envelope &&envelope) noexcept
 
std::string getIPv4FromHostname (const std::string &hostname) noexcept
 
else if ("CHARACTER"==f->name)
 
void cluon_handleExit ()
 
void cluon_handleSignal (int32_t)
 

Variables

 else
 
const char * headerFileTemplate
 
const char * proto2FileTemplate
 

Enumeration Type Documentation

◆ JSONConstants

enum cluon::JSONConstants : uint16_t
strong
Enumerator
IS_FALSE 
IS_TRUE 
NUMBER 
STRING 
OBJECT 
UNDEFINED 

◆ MsgPackConstants

enum cluon::MsgPackConstants : uint16_t
strong
Enumerator
IS_FALSE 
IS_TRUE 
FLOAT 
DOUBLE 
UINT8 
UINT16 
UINT32 
UINT64 
NEGFIXINT 
INT8 
INT16 
INT32 
INT64 
FIXSTR 
FIXSTR_END 
STR8 
STR16 
STR32 
FIXMAP 
FIXMAP_END 
MAP16 
MAP32 
UNKNOWN_FORMAT 
BOOL_FORMAT 
UINT_FORMAT 
INT_FORMAT 
FLOAT_FORMAT 
STR_FORMAT 
MAP_FORMAT 

◆ ProtoConstants

enum cluon::ProtoConstants : uint8_t
strong
Enumerator
VARINT 
EIGHT_BYTES 
LENGTH_DELIMITED 
FOUR_BYTES 

◆ UDPPacketSizeConstraints

enum cluon::UDPPacketSizeConstraints : uint16_t
strong
Enumerator
SIZE_IPv4_HEADER 
SIZE_UDP_HEADER 
MAX_SIZE_UDP_PACKET 

Function Documentation

◆ cluon_handleExit()

void cluon::cluon_handleExit ( )
inline

◆ cluon_handleSignal()

void cluon::cluon_handleSignal ( int32_t  )
inline

◆ extractEnvelope()

std::pair<bool, cluon::data::Envelope> cluon::extractEnvelope ( std::istream &  in)
inlinenoexcept

This method extracts an Envelope from the given istream that holds bytes in format:

0x0D 0xA4 LEN0 LEN1 LEN2 Proto-encoded cluon::data::Envelope

0xA4 LEN0 LEN1 LEN2 are little Endian.

Parameters
inStream to read from.
Returns
cluon::data::Envelope.

References cluon::FromProtoVisitor::decodeFrom(), and retVal.

Referenced by cluon::OD4Session::dataTrigger(), cluon::EnvelopeConverter::getJSONFromProtoEncodedEnvelope(), and cluon::Player::setPlayerListener().

◆ extractMessage()

template<typename T >
T cluon::extractMessage ( cluon::data::Envelope &&  envelope)
inlinenoexcept
Returns
Extract a given Envelope's payload into the desired type.

References cluon::FromProtoVisitor::decodeFrom().

◆ getCommandlineArguments()

std::map< std::string, std::string > cluon::getCommandlineArguments ( int32_t  argc,
char **  argv 
)
noexcept
Returns
Map for command line parameters passed as –key=value into key->values.

References retVal.

Referenced by cluon::UseUInt32ValueAsHashKey::operator()().

◆ getIPv4FromHostname()

std::string cluon::getIPv4FromHostname ( const std::string &  hostname)
noexcept
Returns
IPv4-formatted string for the given hostname or the empty string.

Referenced by cluon::TCPConnection::TCPConnection(), cluon::UDPReceiver::UDPReceiver(), and cluon::UDPSender::UDPSender().

◆ if()

else cluon::if ( "CHARACTER"  = = f->name)

◆ serializeEnvelope()

std::string cluon::serializeEnvelope ( cluon::data::Envelope &&  envelope)
inlinenoexcept

This method transforms a given Envelope to a string representation to be sent to an OpenDaVINCI session.

Parameters
envelopeEnvelope with payload to be sent.
Returns
String representation of the Envelope to be sent to OpenDaVINCI v4.

References cluon::ToProtoVisitor::encodedData().

Referenced by cluon::EnvelopeConverter::getProtoEncodedEnvelopeFromJSON(), and cluon::OD4Session::send().

Variable Documentation

◆ else

cluon::else
Initial value:
{
_fieldDefaultInitializerValue = f->token

◆ headerFileTemplate

const char* cluon::headerFileTemplate

◆ proto2FileTemplate

const char* cluon::proto2FileTemplate
Initial value:
= R"(
//
// THIS IS AN AUTO-GENERATED FILE. DO NOT MODIFY AS CHANGES MIGHT BE OVERWRITTEN!
//
{{%PROTO2_HEADER%}}
// Message identifier: {{%MESSAGE_IDENTIFIER%}}.
message {{%MESSAGE%}} {
{{#%FIELDS%}}
optional {{%TYPE%}} {{%NAME%}} = {{%FIELD_IDENTIFIER%}};
{{/%FIELDS%}}
}
)"