Fawkes API
Fawkes Development Version
|
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) {
fawkes_message_header_t header
message header
The given message size exceeds the limit.
virtual void serialize()=0
Serialize message content.
FawkesNetworkMessageTooBigException(size_t message_size)
Constructor.
unsigned short int cid() const
Get component ID.
void pack()
Pack data for sending.
void set_component_id(unsigned short int cid)
Set component ID.
virtual void * payload()
Return pointer to payload.
void set_payload(void *payload, size_t payload_size)
Set payload.
void set_message_id(unsigned short int msg_id)
Set message type ID.
MT * msg() const
Get correctly casted payload.
void append(const char *format,...)
Append messages to the message list.
Fawkes library namespace.
size_t payload_size() const
Get payload size.
void * payload
message payload
void * payload() const
Get payload buffer.
virtual ~FawkesNetworkMessage()
Destructor.
FawkesNetworkMessage()
Constructor.
const fawkes_message_t & fmsg() const
Get message reference.
void set(fawkes_message_t &msg)
Set from message.
Message as stored in local queues.
virtual size_t payload_size()
Return payload size.
void set_client_id(unsigned int clid)
Set client ID.
unsigned int clid() const
Get client ID.
void set_content(FawkesNetworkMessageContent *content)
Set complex message content.
unsigned short int msgid() const
Get message type ID.
Fawkes network message content.
Base class for exceptions in Fawkes.