fawkes::ConfigListContent Class Reference
Config list content. More...
#include <config/net_list_content.h>

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. | |
Detailed Description
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.
Constructor & Destructor Documentation
| 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().
- Parameters:
-
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.
| fawkes::ConfigListContent::~ConfigListContent | ( | ) | [virtual] |
Destructor.
Definition at line 72 of file net_list_content.cpp.
References fawkes::FawkesNetworkMessageContent::_payload, and fawkes::FawkesNetworkMessageContent::_payload_size.
Member Function Documentation
| void fawkes::ConfigListContent::append | ( | Configuration::ValueIterator * | i | ) |
Append from iterator.
Appends the value the iterator points to.
- Parameters:
-
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.
- Parameters:
-
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.
- Parameters:
-
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.
- Parameters:
-
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.
- Parameters:
-
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.
- Parameters:
-
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.
- Parameters:
-
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.
- Returns:
- true if there are more elements available, false otherwise.
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.
- Parameters:
-
size upon return contains the size of the returned data element.
- Returns:
- next config entitiy from the list. The value is only of the type of the header. Check the message type and the size and cast the message to the correct entity.
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().
| void fawkes::ConfigListContent::serialize | ( | ) | [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().
The documentation for this class was generated from the following files:
- src/libs/config/net_list_content.h
- src/libs/config/net_list_content.cpp

