Go to the documentation of this file.
49 namespace simple_message
56 namespace StandardMsgTypes
188 bool init(
int msgType,
int commType,
int replyCode,
200 bool init(
int msgType,
int commType,
int replyCode);
industrial::shared_types::shared_int message_type_
Message type(see StandardMsgType)
bool init(int msgType, int commType, int replyCode, industrial::byte_array::ByteArray &data)
Initializes a fully populated simple message.
industrial::byte_array::ByteArray data_
Message data portion.
static const unsigned int HEADER_SIZE
Size(in bytes) of message header (fixed)
static unsigned int getLengthSize()
Gets size of message length member in bytes (fixed)
~SimpleMessage(void)
Destructs a message.
industrial::byte_array::ByteArray & getData()
Returns a reference to the internal data member.
void setCommType(int commType)
Sets communications type.
int getMsgLength()
Gets message length (total size, HEADER + data)
int getReplyCode()
Gets reply code(see ReplyType)
int getCommType()
Gets message type(see CommType)
This class defines a simple messaging protocol for communicating with an industrial robot controller.
The byte array wraps a dynamic array of bytes (i.e. char).
industrial::shared_types::shared_int comm_type_
Communications type(see CommType)
CommTypes::CommType CommType
int getDataLength()
Gets length of message data portion.
void toByteArray(industrial::byte_array::ByteArray &msg)
Populates a raw byte array with the message. Any data stored in the passed in byte array is deleted.
void setReplyCode(int replyCode)
Sets reply code.
bool validateMessage()
performs logical checks to ensure that the message is fully defined and adheres to the message conven...
void setData(industrial::byte_array::ByteArray &data)
Sets data portion.
static const unsigned int LENGTH_SIZE
Size (in bytes) of message length parameter (fixed)
void setMessageType(int msgType)
Sets message type.
static unsigned int getHeaderSize()
Gets size of message header in bytes(fixed)
StandardMsgTypes::StandardMsgType StandardMsgType
int getMessageType()
Gets message type(see StandardMsgType)
ReplyTypes::ReplyType ReplyType
SimpleMessage()
Constructs an empty message.
unsigned int getBufferSize()
gets current buffer size
industrial::shared_types::shared_int reply_code_
Reply code(see ReplyType)
simple_message
Author(s): Shaun Edwards
autogenerated on Wed Mar 2 2022 00:24:53