Fawkes API
Fawkes Development Version
|
Config list content. More...
#include <>>
Public Member Functions | |
ConfigListContent () | |
Constructor. More... | |
ConfigListContent (unsigned int component_id, unsigned int msg_id, void *payload, size_t payload_size) | |
Message content constructor. More... | |
virtual | ~ConfigListContent () |
Destructor. More... | |
void | append (Configuration::ValueIterator *i) |
Append from iterator. More... | |
virtual void | serialize () |
Serialize message content. More... | |
void | reset_iterator () |
Reset iterator. More... | |
bool | has_next () |
Check if more list elements are available. More... | |
config_list_entity_header_t * | next (size_t *size) |
Get next plugin from list. More... | |
![]() | |
FawkesNetworkMessageContent () | |
Constructor. More... | |
virtual | ~FawkesNetworkMessageContent () |
Virtual empty destructor. More... | |
virtual void * | payload () |
Return pointer to payload. More... | |
virtual size_t | payload_size () |
Return payload size. More... | |
Additional Inherited Members | |
![]() | |
void | copy_payload (size_t offset, const void *buf, size_t len) |
Copy payload into payload buffer to a specified offset. More... | |
![]() | |
void * | _payload |
Pointer to payload. More... | |
size_t | _payload_size |
Payloda size. More... | |
Config list content.
A complex dynamic message with an arbitrary number of config entities. Uses DynamicBuffer for the internal list of plugins and thus the buffer is limited to 4 GB in total.
Definition at line 35 of file net_list_content.h.
fawkes::ConfigListContent::ConfigListContent | ( | ) |
Constructor.
Definition at line 44 of file net_list_content.cpp.
References fawkes::config_list_msg_t::config_list.
fawkes::ConfigListContent::ConfigListContent | ( | unsigned int | component_id, |
unsigned int | msg_id, | ||
void * | payload, | ||
size_t | payload_size | ||
) |
Message content constructor.
This constructor is meant to be used with FawkesNetworkMessage::msgc().
component_id | component ID |
msg_id | message ID |
payload | message payload |
payload_size | total payload size |
Definition at line 57 of file net_list_content.cpp.
References fawkes::config_list_msg_t::config_list.
|
virtual |
Destructor.
Definition at line 72 of file net_list_content.cpp.
References fawkes::FawkesNetworkMessageContent::_payload, and fawkes::FawkesNetworkMessageContent::_payload_size.
void fawkes::ConfigListContent::append | ( | Configuration::ValueIterator * | i | ) |
Append from iterator.
Appends the value the iterator points to.
i | iterator |
Definition at line 98 of file net_list_content.cpp.
References fawkes::DynamicBuffer::append(), fawkes::config_list_entity_header_t::cp, fawkes::Configuration::ValueIterator::get_bool(), fawkes::Configuration::ValueIterator::get_bools(), fawkes::Configuration::ValueIterator::get_float(), fawkes::Configuration::ValueIterator::get_floats(), fawkes::Configuration::ValueIterator::get_int(), fawkes::Configuration::ValueIterator::get_ints(), fawkes::Configuration::ValueIterator::get_list_size(), fawkes::Configuration::ValueIterator::get_string(), fawkes::Configuration::ValueIterator::get_strings(), fawkes::Configuration::ValueIterator::get_uint(), fawkes::Configuration::ValueIterator::get_uints(), fawkes::Configuration::ValueIterator::is_bool(), fawkes::config_descriptor_t::is_default, fawkes::Configuration::ValueIterator::is_default(), fawkes::Configuration::ValueIterator::is_float(), fawkes::Configuration::ValueIterator::is_int(), fawkes::Configuration::ValueIterator::is_list(), fawkes::Configuration::ValueIterator::is_string(), fawkes::Configuration::ValueIterator::is_uint(), fawkes::config_descriptor_t::num_values, fawkes::Configuration::ValueIterator::path(), fawkes::config_descriptor_t::path, fawkes::config_string_value_t::s_length, and fawkes::config_list_entity_header_t::type.
Referenced by fawkes::ConfigNetworkHandler::loop().
bool fawkes::ConfigListContent::has_next | ( | ) |
Check if more list elements are available.
For incoming messages only.
Definition at line 217 of file net_list_content.cpp.
References fawkes::DynamicBuffer::has_next().
Referenced by fawkes::NetworkConfiguration::inbound_received().
config_list_entity_header_t * fawkes::ConfigListContent::next | ( | size_t * | size | ) |
Get next plugin from list.
size | upon return contains the size of the returned data element. |
Definition at line 230 of file net_list_content.cpp.
References fawkes::DynamicBuffer::next().
Referenced by fawkes::NetworkConfiguration::inbound_received().
void fawkes::ConfigListContent::reset_iterator | ( | ) |
Reset iterator.
For incoming messages only.
Definition at line 206 of file net_list_content.cpp.
References fawkes::DynamicBuffer::reset_iterator().
|
virtual |
Serialize message content.
Generate a single contiguous buffer. Make _payload point to this buffer and _payload_size contain the size of the buffer.
Implements fawkes::FawkesNetworkMessageContent.
Definition at line 193 of file net_list_content.cpp.
References fawkes::FawkesNetworkMessageContent::_payload, fawkes::FawkesNetworkMessageContent::_payload_size, fawkes::DynamicBuffer::buffer(), fawkes::DynamicBuffer::buffer_size(), and fawkes::FawkesNetworkMessageContent::copy_payload().