Fawkes API
Fawkes Development Version
|
00001 00002 /*************************************************************************** 00003 * net_ilist_content.h - BlackBoard network: interface list content 00004 * 00005 * Created: Mon Mar 03 12:00:39 2008 (before thesis topic switch) 00006 * Copyright 2006-2008 Tim Niemueller [www.niemueller.de] 00007 * 00008 ****************************************************************************/ 00009 00010 /* This program is free software; you can redistribute it and/or modify 00011 * it under the terms of the GNU General Public License as published by 00012 * the Free Software Foundation; either version 2 of the License, or 00013 * (at your option) any later version. A runtime exception applies to 00014 * this software (see LICENSE.GPL_WRE file mentioned below for details). 00015 * 00016 * This program is distributed in the hope that it will be useful, 00017 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00018 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00019 * GNU Library General Public License for more details. 00020 * 00021 * Read the full text in the LICENSE.GPL_WRE file in the doc directory. 00022 */ 00023 00024 #ifndef __BLACKBOARD_NET_ILIST_CONTENT_H_ 00025 #define __BLACKBOARD_NET_ILIST_CONTENT_H_ 00026 00027 #include <blackboard/net/messages.h> 00028 #include <netcomm/fawkes/message_content.h> 00029 #include <interface/interface_info.h> 00030 00031 namespace fawkes { 00032 00033 class DynamicBuffer; 00034 00035 class BlackBoardInterfaceListContent : public FawkesNetworkMessageContent 00036 { 00037 public: 00038 BlackBoardInterfaceListContent(); 00039 BlackBoardInterfaceListContent(unsigned int component_id, unsigned int msg_id, 00040 void *payload, size_t payload_size); 00041 virtual ~BlackBoardInterfaceListContent(); 00042 00043 void append_interface(const char *type, const char *id, const unsigned char *hash, 00044 unsigned int serial, bool has_writer, unsigned int num_readers); 00045 void append_interface(InterfaceInfo &info); 00046 00047 virtual void serialize(); 00048 00049 void reset_iterator(); 00050 bool has_next(); 00051 bb_iinfo_msg_t * next(size_t *size); 00052 00053 private: 00054 DynamicBuffer *interface_list; 00055 bb_ilist_msg_t msg; 00056 }; 00057 00058 } // end namespace fawkes 00059 00060 #endif