|
Fawkes API
Fawkes Development Version
|
Config list content. More...
#include <>>

Public Member Functions | |
| ConfigListContent () | |
| Constructor. | |
| ConfigListContent (unsigned int component_id, unsigned int msg_id, void *payload, size_t payload_size) | |
| Message content constructor. | |
| virtual | ~ConfigListContent () |
| Destructor. | |
| void | append_float (const char *path, float f, bool def_val=false) |
| Append float value. | |
| void | append_int (const char *path, int i, bool def_val=false) |
| Append integer value. | |
| void | append_uint (const char *path, unsigned int u, bool def_val=false) |
| Append unsigned integer value. | |
| void | append_bool (const char *path, bool b, bool def_val=false) |
| Append boolean value. | |
| void | append_string (const char *path, const char *s, bool def_val=false) |
| Append string value. | |
| void | append_comment (const char *path, const char *s, bool def_val=false) |
| Append comment. | |
| void | append (Configuration::ValueIterator *i) |
| Append from iterator. | |
| virtual void | serialize () |
| Serialize message content. | |
| void | reset_iterator () |
| Reset iterator. | |
| bool | has_next () |
| Check if more list elements are available. | |
| config_list_entity_header_t * | next (size_t *size) |
| Get next plugin from list. | |
Public Member Functions inherited from fawkes::FawkesNetworkMessageContent | |
| FawkesNetworkMessageContent () | |
| Constructor. | |
| virtual | ~FawkesNetworkMessageContent () |
| Virtual empty destructor. | |
| virtual void * | payload () |
| Return pointer to payload. | |
| virtual size_t | payload_size () |
| Return payload size. | |
Additional Inherited Members | |
Protected Member Functions inherited from fawkes::FawkesNetworkMessageContent | |
| void | copy_payload (size_t offset, const void *buf, size_t len) |
| Copy payload into payload buffer to a specified offset. | |
Protected Attributes inherited from fawkes::FawkesNetworkMessageContent | |
| void * | _payload |
| Pointer to payload. | |
| size_t | _payload_size |
| Payloda size. | |
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 88 of file net_list_content.cpp.
References append_bool(), append_comment(), append_float(), append_int(), append_string(), append_uint(), fawkes::Configuration::ValueIterator::get_bool(), fawkes::Configuration::ValueIterator::get_comment(), fawkes::Configuration::ValueIterator::get_float(), fawkes::Configuration::ValueIterator::get_int(), fawkes::Configuration::ValueIterator::get_string(), fawkes::Configuration::ValueIterator::get_uint(), fawkes::Configuration::ValueIterator::is_bool(), fawkes::Configuration::ValueIterator::is_default(), fawkes::Configuration::ValueIterator::is_float(), fawkes::Configuration::ValueIterator::is_int(), fawkes::Configuration::ValueIterator::is_string(), fawkes::Configuration::ValueIterator::is_uint(), and fawkes::Configuration::ValueIterator::path().
Referenced by fawkes::ConfigNetworkHandler::loop().
| void fawkes::ConfigListContent::append_bool | ( | const char * | path, |
| bool | b, | ||
| bool | def_val = false |
||
| ) |
Append boolean value.
| path | of value |
| b | boolean value |
| def_val | true if this is a default value, false otherwise |
Definition at line 170 of file net_list_content.cpp.
References fawkes::DynamicBuffer::append(), fawkes::config_list_bool_entity_t::b, fawkes::config_list_entity_header_t::cp, fawkes::config_list_bool_entity_t::header, fawkes::config_descriptor_t::is_default, fawkes::config_descriptor_t::path, and fawkes::config_list_entity_header_t::type.
Referenced by append().
| void fawkes::ConfigListContent::append_comment | ( | const char * | path, |
| const char * | s, | ||
| bool | def_val = false |
||
| ) |
Append comment.
| path | of value |
| s | comment |
| def_val | true if this is a default value, false otherwise |
Definition at line 209 of file net_list_content.cpp.
References fawkes::DynamicBuffer::append(), fawkes::config_list_entity_header_t::cp, fawkes::config_list_comment_entity_t::header, fawkes::config_descriptor_t::is_default, fawkes::config_descriptor_t::path, fawkes::config_list_comment_entity_t::s, fawkes::config_list_comment_entity_t::s_length, and fawkes::config_list_entity_header_t::type.
Referenced by append().
| void fawkes::ConfigListContent::append_float | ( | const char * | path, |
| float | f, | ||
| bool | def_val = false |
||
| ) |
Append float value.
| path | of value |
| f | float value |
| def_val | true if this is a default value, false otherwise |
Definition at line 116 of file net_list_content.cpp.
References fawkes::DynamicBuffer::append(), fawkes::config_list_entity_header_t::cp, fawkes::config_list_float_entity_t::f, fawkes::config_list_float_entity_t::header, fawkes::config_descriptor_t::is_default, fawkes::config_descriptor_t::path, and fawkes::config_list_entity_header_t::type.
Referenced by append().
| void fawkes::ConfigListContent::append_int | ( | const char * | path, |
| int | i, | ||
| bool | def_val = false |
||
| ) |
Append integer value.
| path | of value |
| i | integer value |
| def_val | true if this is a default value, false otherwise |
Definition at line 134 of file net_list_content.cpp.
References fawkes::DynamicBuffer::append(), fawkes::config_list_entity_header_t::cp, fawkes::config_list_int_entity_t::header, fawkes::config_list_int_entity_t::i, fawkes::config_descriptor_t::is_default, fawkes::config_descriptor_t::path, and fawkes::config_list_entity_header_t::type.
Referenced by append().
| void fawkes::ConfigListContent::append_string | ( | const char * | path, |
| const char * | s, | ||
| bool | def_val = false |
||
| ) |
Append string value.
| path | of value |
| s | string value |
| def_val | true if this is a default value, false otherwise |
Definition at line 188 of file net_list_content.cpp.
References fawkes::DynamicBuffer::append(), fawkes::config_list_entity_header_t::cp, fawkes::config_list_string_entity_t::header, fawkes::config_descriptor_t::is_default, fawkes::config_descriptor_t::path, fawkes::config_list_string_entity_t::s, fawkes::config_list_string_entity_t::s_length, and fawkes::config_list_entity_header_t::type.
Referenced by append().
| void fawkes::ConfigListContent::append_uint | ( | const char * | path, |
| unsigned int | u, | ||
| bool | def_val = false |
||
| ) |
Append unsigned integer value.
| path | of value |
| u | unsigned integer value |
| def_val | true if this is a default value, false otherwise |
Definition at line 152 of file net_list_content.cpp.
References fawkes::DynamicBuffer::append(), fawkes::config_list_entity_header_t::cp, fawkes::config_list_uint_entity_t::header, fawkes::config_descriptor_t::is_default, fawkes::config_descriptor_t::path, fawkes::config_list_entity_header_t::type, and fawkes::config_list_uint_entity_t::u.
Referenced by append().
| bool fawkes::ConfigListContent::has_next | ( | ) |
Check if more list elements are available.
For incoming messages only.
Definition at line 249 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 262 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 238 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 225 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().