Fawkes API  Fawkes Development Version
ilist_content.h
1 
2 /***************************************************************************
3  * net_ilist_content.h - BlackBoard network: interface list content
4  *
5  * Created: Mon Mar 03 12:00:39 2008 (before thesis topic switch)
6  * Copyright 2006-2008 Tim Niemueller [www.niemueller.de]
7  *
8  ****************************************************************************/
9 
10 /* This program is free software; you can redistribute it and/or modify
11  * it under the terms of the GNU General Public License as published by
12  * the Free Software Foundation; either version 2 of the License, or
13  * (at your option) any later version. A runtime exception applies to
14  * this software (see LICENSE.GPL_WRE file mentioned below for details).
15  *
16  * This program is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19  * GNU Library General Public License for more details.
20  *
21  * Read the full text in the LICENSE.GPL_WRE file in the doc directory.
22  */
23 
24 #ifndef __BLACKBOARD_NET_ILIST_CONTENT_H_
25 #define __BLACKBOARD_NET_ILIST_CONTENT_H_
26 
27 #include <blackboard/net/messages.h>
28 #include <netcomm/fawkes/message_content.h>
29 #include <interface/interface_info.h>
30 
31 namespace fawkes {
32 
33 class DynamicBuffer;
34 
36 {
37  public:
39  BlackBoardInterfaceListContent(unsigned int component_id, unsigned int msg_id,
40  void *payload, size_t payload_size);
42 
43  void append_interface(const char *type, const char *id, const unsigned char *hash,
44  unsigned int serial, bool has_writer, unsigned int num_readers,
45  const fawkes::Time &time);
46  void append_interface(InterfaceInfo &info);
47 
48  virtual void serialize();
49 
50  void reset_iterator();
51  bool has_next();
52  bb_iinfo_msg_t * next(size_t *size);
53 
54  private:
55  DynamicBuffer *interface_list;
56  bb_ilist_msg_t msg;
57 };
58 
59 } // end namespace fawkes
60 
61 #endif
bool has_next()
Check if more list elements are available.
Fawkes library namespace.
bb_iinfo_msg_t * next(size_t *size)
Get next plugin from list.
A class for handling time.
Definition: time.h:91
Message to transport a list of interfaces.
Definition: messages.h:67
Fawkes network message content.
Message for interface info.
Definition: messages.h:86
virtual void * payload()
Return pointer to payload.
void append_interface(const char *type, const char *id, const unsigned char *hash, unsigned int serial, bool has_writer, unsigned int num_readers, const fawkes::Time &time)
Append interface info.
Dynamically growing buffer.
virtual size_t payload_size()
Return payload size.
virtual ~BlackBoardInterfaceListContent()
Destructor.
BlackBoard interface list content.
Definition: ilist_content.h:35
virtual void serialize()
Serialize message content.
Interface info.