24 #include <core/exception.h> 25 #include <netcomm/fawkes/message.h> 26 #include <netcomm/fawkes/message_content.h> 27 #include <netinet/in.h> 48 :
Exception(
"Network message size too big")
51 append(
"Tried to create message of %l bytes, while only %l bytes allowed",
89 memset(&_msg, 0,
sizeof(_msg));
124 unsigned short int msg_id,
147 unsigned short int msg_id,
184 unsigned short int msg_id,
202 unsigned short int cid,
203 unsigned short int msg_id,
222 unsigned short int cid,
223 unsigned short int msg_id,
245 unsigned short int cid,
246 unsigned short int msg_id)
261 if (_content == NULL) {
394 if (_content != NULL) {
void * payload() const
Get payload buffer.
void set_content(FawkesNetworkMessageContent *content)
Set complex message content.
void set_client_id(unsigned int clid)
Set client ID.
virtual ~FawkesNetworkMessage()
Destructor.
unsigned short int cid() const
Get component ID.
fawkes_message_header_t header
message header
Fawkes library namespace.
unsigned int clid() const
Get client ID.
Fawkes network message content.
FawkesNetworkMessage()
Constructor.
void set_component_id(unsigned short int cid)
Set component ID.
void pack()
Pack data for sending.
void set_message_id(unsigned short int msg_id)
Set message type ID.
virtual void serialize()=0
Serialize message content.
Base class for exceptions in Fawkes.
Message as stored in local queues.
virtual void * payload()
Return pointer to payload.
void * payload
message payload
const fawkes_message_t & fmsg() const
Get message reference.
FawkesNetworkMessageTooBigException(size_t message_size)
Constructor.
void set_payload(void *payload, size_t payload_size)
Set payload.
virtual size_t payload_size()
Return payload size.
unsigned short int msgid() const
Get message type ID.
The given message size exceeds the limit.
void set(fawkes_message_t &msg)
Set from message.
MT * msg() const
Get correctly casted payload.
void append(const char *format,...)
Append messages to the message list.
size_t payload_size() const
Get payload size.