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);
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
MT * msgge() const
Get correctly casted payload.
Fawkes library namespace.
unsigned int clid() const
Get client ID.
Representation of a message that is sent over the network.
MT * msgc() const
Get correctly parsed output.
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.
Base class for exceptions in Fawkes.
Message as stored in local queues.
void * payload
message payload
Reference counting base class.
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.
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.
size_t payload_size() const
Get payload size.