00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef __CONFIG_NET_LIST_CONTENT_H_
00025 #define __CONFIG_NET_LIST_CONTENT_H_
00026
00027 #include <config/net_messages.h>
00028 #include <config/config.h>
00029 #include <netcomm/fawkes/message_content.h>
00030
00031 namespace fawkes {
00032
00033 class DynamicBuffer;
00034
00035 class ConfigListContent : public FawkesNetworkMessageContent
00036 {
00037 public:
00038 ConfigListContent();
00039 ConfigListContent(unsigned int component_id, unsigned int msg_id,
00040 void *payload, size_t payload_size);
00041 virtual ~ConfigListContent();
00042
00043 void append_float(const char *path, float f, bool def_val = false);
00044 void append_int(const char *path, int i, bool def_val = false);
00045 void append_uint(const char *path, unsigned int u, bool def_val = false);
00046 void append_bool(const char *path, bool b, bool def_val = false);
00047 void append_string(const char *path, const char *s, bool def_val = false);
00048 void append_comment(const char *path, const char *s, bool def_val = false);
00049 void append(Configuration::ValueIterator *i);
00050
00051 virtual void serialize();
00052
00053 void reset_iterator();
00054 bool has_next();
00055 config_list_entity_header_t * next(size_t *size);
00056
00057 private:
00058 DynamicBuffer *config_list;
00059 config_list_msg_t msg;
00060 };
00061
00062 }
00063
00064 #endif