Wiselib
|
A message sent by a sensor in the BGU clustering algorithm. More...
#include <TopologyMessage.h>
Inherits wiselib::Message.
Classes | |
struct | serializable_topology_record_t |
struct | topology_message_header_t |
Public Types | |
typedef list_iterator < topology_record_t > | iterator |
Public Member Functions | |
TopologyMessage (nodeid_t sender) | |
Construct an empty message. | |
TopologyMessage (uint8_t *buffer, uint32_t buffer_length) | |
De-serialize a message from a received buffer. | |
~TopologyMessage () | |
error_code_t | serialize (uint8_t *buffer, uint32_t buffer_size) |
Convert this message to a byte buffer. | |
size_t | serializationBufferSize () |
error_code_t | applyTo (wiselib::MessageDestination *dest) |
Allow a MessageDestination to handle this message. | |
error_code_t | addTopologyRecord (const topology_record_t &record) |
Add some topology information to this message. | |
iterator | begin () |
The following two methods enable iterating over the topology information stored in the message. | |
iterator | end () |
nodeid_t | senderId () |
void | convert (serializable_topology_record_t, topology_record_t *) |
void | convert (topology_record_t, serializable_topology_record_t *) |
A message sent by a sensor in the BGU clustering algorithm.
This message contains topology information as known to some node at some time.
TopologyMessage::TopologyMessage | ( | nodeid_t | sender | ) |
Construct an empty message.
sender | the nodeid of the sending node |
De-serialize a message from a received buffer.
buffer | a buffer that was created by the serialize method. |
buffer_length | the length of the buffer |
TopologyMessage::~TopologyMessage | ( | ) |
error_code_t TopologyMessage::addTopologyRecord | ( | const topology_record_t & | record | ) |
Add some topology information to this message.
record | the information to add |
error_code_t TopologyMessage::applyTo | ( | wiselib::MessageDestination * | dest | ) | [virtual] |
Allow a MessageDestination to handle this message.
We work this way to make it possible to decouple the messages from the destinations.
dest | the message destination |
Implements wiselib::Message.
TopologyMessage::iterator TopologyMessage::begin | ( | ) |
The following two methods enable iterating over the topology information stored in the message.
void TopologyMessage::convert | ( | serializable_topology_record_t | in, |
topology_record_t * | out | ||
) |
void TopologyMessage::convert | ( | topology_record_t | in, |
serializable_topology_record_t * | out | ||
) |
TopologyMessage::iterator TopologyMessage::end | ( | ) |
nodeid_t TopologyMessage::senderId | ( | ) |
size_t TopologyMessage::serializationBufferSize | ( | ) |
error_code_t TopologyMessage::serialize | ( | uint8_t * | buffer, |
uint32_t | buffer_size | ||
) | [virtual] |
Convert this message to a byte buffer.
buffer | the buffer where the result is stored |
buffer_size | the size of the buffer. |
Implements wiselib::Message.