Fawkes API
Fawkes Development Version
|
24 #ifndef _NETCOMM_FAWKES_MESSAGE_H_
25 #define _NETCOMM_FAWKES_MESSAGE_H_
27 #include <core/exceptions/software.h>
28 #include <core/utils/refcount.h>
41 unsigned short int cid;
82 unsigned short int cid,
83 unsigned short int msg_id,
88 unsigned short int msg_id,
92 unsigned short int cid,
93 unsigned short int msg_id,
96 unsigned short int msg_id,
104 unsigned int clid()
const;
105 unsigned short int cid()
const;
106 unsigned short int msgid()
const;
118 template <
typename MT>
137 template <
typename MT>
157 template <
typename MT>
167 throw Exception(
"Unknown exception caught while parsing complex network message");
181 void init_cid_msgid(
unsigned short int cid,
unsigned short int msg_id);
fawkes_message_header_t header
message header
MT * msgge() const
Get correctly casted payload.
The given message size exceeds the limit.
FawkesNetworkMessageTooBigException(size_t message_size)
Constructor.
unsigned short int cid() const
Get component ID.
void pack()
Pack data for sending.
MT * msgc() const
Get correctly parsed output.
void set_component_id(unsigned short int cid)
Set component ID.
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.
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.
Reference counting base class.
void set(fawkes_message_t &msg)
Set from message.
Representation of a message that is sent over the network.
Message as stored in local queues.
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.