WMPTopicManager.h
Go to the documentation of this file.
00001 /*------------------------------------------------------------------------
00002  *---------------------           ros_rt_wmp              --------------------
00003  *------------------------------------------------------------------------
00004  *                                                         V0.1B  15/09/11
00005  *
00006  *
00007  *  File: ./src/WMPTopicManager.h
00008  *  Authors: Danilo Tardioli
00009  *  ----------------------------------------------------------------------
00010  *  Copyright (C) 2000-2011, Universidad de Zaragoza, SPAIN
00011  *
00012  *  Contact Addresses: Danilo Tardioli                   dantard@unizar.es
00013  *
00014  *  RT-WMP is free software; you can  redistribute it and/or  modify it
00015  *  under the terms of the GNU General Public License  as published by the
00016  *  Free Software Foundation;  either  version 2, or (at  your option) any
00017  *  later version.
00018  *
00019  *  RT-WMP  is distributed  in the  hope  that  it will be   useful, but
00020  *  WITHOUT  ANY  WARRANTY;     without  even the   implied   warranty  of
00021  *  MERCHANTABILITY  or  FITNESS FOR A  PARTICULAR PURPOSE.    See the GNU
00022  *  General Public License for more details.
00023  *
00024  *  You should have received  a  copy of  the  GNU General Public  License
00025  *  distributed with RT-WMP;  see file COPYING.   If not,  write to the
00026  *  Free Software  Foundation,  59 Temple Place  -  Suite 330,  Boston, MA
00027  *  02111-1307, USA.
00028  *
00029  *  As a  special exception, if you  link this  unit  with other  files to
00030  *  produce an   executable,   this unit  does  not  by  itself cause  the
00031  *  resulting executable to be covered by the  GNU General Public License.
00032  *  This exception does  not however invalidate  any other reasons why the
00033  *  executable file might be covered by the GNU Public License.
00034  *
00035  *----------------------------------------------------------------------*/
00036 
00037 #ifndef WMPTOPICMANAGER_H_
00038 #define WMPTOPICMANAGER_H_
00039 
00040 #include "TopicManager.h"
00041 #include <ros_rt_wmp_msgs/WMPControl.h>
00042 #include <ros_rt_wmp_msgs/WMPInfo.h>
00043 #include <ros_rt_wmp_msgs/WMPFrames.h>
00044 
00045 template<class T> class WMPTopicManager: public TopicManager<T> {
00046 public:
00047         WMPTopicManager(ros::NodeHandle * n, int port, std::string name,
00048                         std::string src, bool broadcast) :
00049                         TopicManager<T>(n, port, name, src, 0, broadcast) {
00050                 n->deleteParam(TopicManager<T>::param_dest);
00051         }
00052 
00053         virtual void fillDestination(const boost::shared_ptr<T const> & message) {
00054                 Manager::dests = message->header.dest;
00055         }
00056 
00057         virtual int getPriority(const boost::shared_ptr<T const> & message) {
00058                 return message->header.priority;
00059         }
00060         std::string getSubTopic(T & pm) {
00061                 return pm.header.sub_topic;
00062         }
00063 };
00064 
00065 
00066 #endif /* WMPMANAGER_H_ */


ros_rt_wmp
Author(s): Danilo Tardioli, dantard@unizar.es
autogenerated on Mon Oct 6 2014 08:27:11