OpenLCP  0.2.0
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
RDM::Message Struct Reference

The Message struct. More...

#include <message.h>

Public Member Functions

 Message ()
 Message::Message.
 
 Message (const Message &obj)
 Message::Message. More...
 
 Message (const std::vector< uint8_t > &data)
 Message::Message. More...
 
void read (const std::vector< uint8_t > &data)
 Message::read. More...
 
void write (std::vector< uint8_t > &data) const
 Message::write. More...
 
void nak (uint16_t reason)
 Message::nak. More...
 
const std::vector< uint8_t > * data () const
 Message::data. More...
 
uint8_t length () const
 Message::length. More...
 
uint16_t checksum () const
 Message::checksum. More...
 
bool requiredLength (const size_t length, MsgPtr response) const
 Message::requiredLength. More...
 
template<typename T >
void appendData (const T &val)
 appendData More...
 

Static Public Member Functions

template<typename T >
static T readType (const std::vector< uint8_t > &vect, size_t start)
 readType More...
 
template<typename T >
static void writeType (std::vector< uint8_t > &data, T val)
 writeType More...
 

Public Attributes

UID source
 source UID
 
UID destination
 destination UID
 
uint8_t transaction
 transaction number
 
union {
   uint8_t   portID
 destination port
 
   uint8_t   responseType
 type of response
 
}; 
 
uint8_t messageCount
 message count number
 
uint16_t subDevice
 destination subdevice
 
uint8_t commandClass
 message command class
 
PID parameterId
 PID.
 
union {
   uint8_t   failure_mode
 
   struct {
      bool   short_message: 1
 undersized buffer
 
      bool   length_mismatch: 1
 message longer than adervertised
 
      bool   checksum_fail: 1
 message did not match checksum
 
      bool   incorrect_sc: 1
 invalid StartCode
 
      bool   incorrect_sub_sc: 1
 invalid sub-StartCode
 
      bool   do_not_send: 1
 message does not require transmission
 
   } 
 
}; 
 

Detailed Description

The Message struct.

Constructor & Destructor Documentation

◆ Message() [1/2]

RDM::Message::Message ( const Message obj)

Message::Message.

Parameters
obj
Here is the call graph for this function:

◆ Message() [2/2]

RDM::Message::Message ( const std::vector< uint8_t > &  data)

Message::Message.

Parameters
data
Here is the call graph for this function:

Member Function Documentation

◆ appendData()

template<typename T >
void RDM::Message::appendData ( const T &  val)
inline

appendData

Parameters
val
Here is the caller graph for this function:

◆ checksum()

uint16_t RDM::Message::checksum ( ) const

Message::checksum.

Returns
Here is the call graph for this function:
Here is the caller graph for this function:

◆ data()

const std::vector< uint8_t > * RDM::Message::data ( ) const

Message::data.

Returns
Here is the caller graph for this function:

◆ length()

uint8_t RDM::Message::length ( ) const

Message::length.

Returns
Here is the caller graph for this function:

◆ nak()

void RDM::Message::nak ( uint16_t  reason)

Message::nak.

Parameters
reason
Here is the call graph for this function:

◆ read()

void RDM::Message::read ( const std::vector< uint8_t > &  data)

Message::read.

Parameters
data
Here is the call graph for this function:
Here is the caller graph for this function:

◆ readType()

template<typename T >
static T RDM::Message::readType ( const std::vector< uint8_t > &  vect,
size_t  start 
)
inlinestatic

readType

Parameters
vect
start
Returns
Here is the call graph for this function:

◆ requiredLength()

bool RDM::Message::requiredLength ( const size_t  length,
MsgPtr  response 
) const

Message::requiredLength.

Parameters
length
response
Returns
Here is the call graph for this function:

◆ write()

void RDM::Message::write ( std::vector< uint8_t > &  data) const

Message::write.

Parameters
data
Here is the call graph for this function:
Here is the caller graph for this function:

◆ writeType()

template<typename T >
static void RDM::Message::writeType ( std::vector< uint8_t > &  data,
val 
)
inlinestatic

writeType

Parameters
data
val
Here is the call graph for this function:
Here is the caller graph for this function:

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