Public Member Functions | Private Types | Private Member Functions | Private Attributes
rtt_dynamic_reconfigure::Server< ConfigType > Class Template Reference

#include <server.h>

Inheritance diagram for rtt_dynamic_reconfigure::Server< ConfigType >:
Inheritance graph
[legend]

List of all members.

Public Member Functions

void advertise (std::string ns=std::string())
void getConfigDefault (ConfigType &config) const
const ConfigType & getConfigDefault () const
ConfigType & getConfigDefault ()
void getConfigMax (ConfigType &max) const
const ConfigType & getConfigMax () const
ConfigType & getConfigMax ()
void getConfigMin (ConfigType &min) const
const ConfigType & getConfigMin () const
ConfigType & getConfigMin ()
dynamic_reconfigure::ConfigDescriptionPtr getDescriptionMessage ()
void refresh ()
 Server (const std::string &name, RTT::TaskContext *owner)
 Server (RTT::TaskContext *owner)
void setConfigDefault (const ConfigType &config)
void setConfigMax (const ConfigType &config)
void setConfigMin (const ConfigType &config)
void setNotificationCallback (RTT::OperationInterfacePart *impl)
void setUpdateCallback (RTT::OperationInterfacePart *impl)
void setUpdater (UpdaterType *updater)
void shutdown ()
void updateConfig (const ConfigType &config)
bool updated ()
UpdaterTypeupdater () const
virtual ~Server ()

Private Types

typedef boost::shared_ptr
< Server< ConfigType > > 
shared_ptr
typedef
dynamic_reconfigure_traits
< ConfigType > 
traits
typedef Updater< ConfigType > UpdaterType

Private Member Functions

void construct ()
void PublishDescription ()
bool setConfigCallback (dynamic_reconfigure::Reconfigure::Request &req, dynamic_reconfigure::Reconfigure::Response &rsp)
void updateConfigInternal (const ConfigType &config)
bool updatePropertiesDefaultImpl (const RTT::PropertyBag &source, uint32_t)

Private Attributes

ConfigType config_
ConfigType default_
ros::Publisher descr_pub_
bool initialized_
ConfigType max_
ConfigType min_
RTT::os::MutexRecursive mutex_
ros::NodeHandlenode_handle_
RTT::OperationCaller< void(uint32_t
level)> 
notify_callback_
ros::ServiceServer set_service_
RTT::OperationCaller< bool(const
RTT::PropertyBag &source,
uint32_t level)> 
update_callback_
RTT::Operation< bool(const
RTT::PropertyBag &source,
uint32_t level)> 
update_callback_default_impl_
ros::Publisher update_pub_
boost::shared_ptr< UpdaterTypeupdater_

Detailed Description

template<class ConfigType>
class rtt_dynamic_reconfigure::Server< ConfigType >

The Server<ConfigType> class implements a dynamic_reconfigure server as an RTT service. It provides a similar API than the pure cpp dynamic_reconfigure server implemented in the dynamic_reconfigure package.

Definition at line 169 of file server.h.


Member Typedef Documentation

template<class ConfigType >
typedef boost::shared_ptr< Server<ConfigType> > rtt_dynamic_reconfigure::Server< ConfigType >::shared_ptr [private]

Reimplemented from RTT::Service.

Definition at line 174 of file server.h.

template<class ConfigType >
typedef dynamic_reconfigure_traits<ConfigType> rtt_dynamic_reconfigure::Server< ConfigType >::traits [private]

Definition at line 173 of file server.h.

template<class ConfigType >
typedef Updater<ConfigType> rtt_dynamic_reconfigure::Server< ConfigType >::UpdaterType [private]

Definition at line 172 of file server.h.


Constructor & Destructor Documentation

template<class ConfigType >
rtt_dynamic_reconfigure::Server< ConfigType >::Server ( const std::string &  name,
RTT::TaskContext owner 
) [inline]

Construct a named rtt_dynamic_reconfigure server.

Parameters:
namename of the service instance
ownerpointer to the TaskContext instance owning this service/to be configured

Definition at line 201 of file server.h.

template<class ConfigType >
rtt_dynamic_reconfigure::Server< ConfigType >::Server ( RTT::TaskContext owner) [inline]

Construct an rtt_dynamic_reconfigure server named "reconfigure".

Parameters:
ownerpointer to the TaskContext instance owning this service/to be configured

Definition at line 214 of file server.h.

template<class ConfigType >
virtual rtt_dynamic_reconfigure::Server< ConfigType >::~Server ( ) [inline, virtual]

Destruct the rtt_dynamic_reconfigure server. This unadvertises the dynamic_reconfigure topics and services.

Definition at line 226 of file server.h.


Member Function Documentation

template<class ConfigType >
void rtt_dynamic_reconfigure::Server< ConfigType >::advertise ( std::string  ns = std::string()) [inline]

Advertise the dynamic_reconfigure topics and services at the master. Needs to be called explicitly after construction, e.g from the owner's configureHook().

Parameters:
nsThe ROS namespace this dynamic_reconfigure server should be advertised in. If empty, defaults to the name of the owning TaskContext.

Definition at line 367 of file server.h.

template<class ConfigType >
void rtt_dynamic_reconfigure::Server< ConfigType >::construct ( ) [inline, private]

Definition at line 505 of file server.h.

template<class ConfigType >
void rtt_dynamic_reconfigure::Server< ConfigType >::getConfigDefault ( ConfigType &  config) const [inline]

Get the default values of all configuration parameters

Parameters:
configthe ConfigType instance to be filled

Definition at line 293 of file server.h.

template<class ConfigType >
const ConfigType& rtt_dynamic_reconfigure::Server< ConfigType >::getConfigDefault ( ) const [inline]

Get the default values of all configuration parameters

Returns:
a const reference to the ConfigType instance holding the default values

Definition at line 303 of file server.h.

template<class ConfigType >
ConfigType& rtt_dynamic_reconfigure::Server< ConfigType >::getConfigDefault ( ) [inline]

Get the default values of all configuration parameters

Returns:
a reference to the ConfigType instance holding the default values

Definition at line 310 of file server.h.

template<class ConfigType >
void rtt_dynamic_reconfigure::Server< ConfigType >::getConfigMax ( ConfigType &  max) const [inline]

Get the maximum values of all configuration parameters

Parameters:
configthe ConfigType instance to be filled

Definition at line 245 of file server.h.

template<class ConfigType >
const ConfigType& rtt_dynamic_reconfigure::Server< ConfigType >::getConfigMax ( ) const [inline]

Get the maximum values of all configuration parameters

Returns:
a const reference to the ConfigType instance holding the maximum values

Definition at line 255 of file server.h.

template<class ConfigType >
ConfigType& rtt_dynamic_reconfigure::Server< ConfigType >::getConfigMax ( ) [inline]

Get the maximum values of all configuration parameters

Returns:
a reference to the ConfigType instance holding the maximum values

Definition at line 262 of file server.h.

template<class ConfigType >
void rtt_dynamic_reconfigure::Server< ConfigType >::getConfigMin ( ConfigType &  min) const [inline]

Get the minimum values of all configuration parameters

Parameters:
configthe ConfigType instance to be filled

Definition at line 269 of file server.h.

template<class ConfigType >
const ConfigType& rtt_dynamic_reconfigure::Server< ConfigType >::getConfigMin ( ) const [inline]

Get the minimum values of all configuration parameters

Returns:
a const reference to the ConfigType instance holding the minimum values

Definition at line 279 of file server.h.

template<class ConfigType >
ConfigType& rtt_dynamic_reconfigure::Server< ConfigType >::getConfigMin ( ) [inline]

Get the minimum values of all configuration parameters

Returns:
a reference to the ConfigType instance holding the minimum values

Definition at line 286 of file server.h.

template<class ConfigType >
dynamic_reconfigure::ConfigDescriptionPtr rtt_dynamic_reconfigure::Server< ConfigType >::getDescriptionMessage ( ) [inline]

Construct a new instance of the description message including the current values of the minimum, maximum and default values.

Returns:
a dynamic_reconfigure::ConfigDescriptionPtr instance holding the decription message

Definition at line 350 of file server.h.

template<class ConfigType >
void rtt_dynamic_reconfigure::Server< ConfigType >::PublishDescription ( ) [inline, private]

Definition at line 542 of file server.h.

template<class ConfigType >
void rtt_dynamic_reconfigure::Server< ConfigType >::refresh ( ) [inline]

Refresh the config description, minimum and maximum values, get and publish the current config from the default values and the TaskContext's properties. Call this function whenever properties have been added or removed or the minimum, maximum or default values have been changed.

Definition at line 423 of file server.h.

template<class ConfigType >
bool rtt_dynamic_reconfigure::Server< ConfigType >::setConfigCallback ( dynamic_reconfigure::Reconfigure::Request &  req,
dynamic_reconfigure::Reconfigure::Response &  rsp 
) [inline, private]

Definition at line 547 of file server.h.

template<class ConfigType >
void rtt_dynamic_reconfigure::Server< ConfigType >::setConfigDefault ( const ConfigType &  config) [inline]

Set the default values of all configuration parameters and republish the description

Returns:
a const reference to the ConfigType instance holding the default values

Definition at line 339 of file server.h.

template<class ConfigType >
void rtt_dynamic_reconfigure::Server< ConfigType >::setConfigMax ( const ConfigType &  config) [inline]

Set the maximum values of all configuration parameters and republish the description

Returns:
a const reference to the ConfigType instance holding the maximum values

Definition at line 317 of file server.h.

template<class ConfigType >
void rtt_dynamic_reconfigure::Server< ConfigType >::setConfigMin ( const ConfigType &  config) [inline]

Set the minimum values of all configuration parameters and republish the description

Returns:
a const reference to the ConfigType instance holding the minimum values

Definition at line 328 of file server.h.

template<class ConfigType >
void rtt_dynamic_reconfigure::Server< ConfigType >::setNotificationCallback ( RTT::OperationInterfacePart impl) [inline]

Sets the notification callback that notifies a TaskContext that its properties have been updated

Parameters:
implan Operation with the signature void()

Definition at line 499 of file server.h.

template<class ConfigType >
void rtt_dynamic_reconfigure::Server< ConfigType >::setUpdateCallback ( RTT::OperationInterfacePart impl) [inline]

Sets the property update callback (defaults to RTT::updateProperties(*(getOwner()->properties()), ...))

Parameters:
implan Operation with the signature bool(const RTT::PropertyBag &)

Definition at line 489 of file server.h.

template<class ConfigType >
void rtt_dynamic_reconfigure::Server< ConfigType >::setUpdater ( UpdaterType updater) [inline]

Sets the Updater instance to use to update config from properties or vice-versa.

Parameters:
updatera pointer to an instance of Updater<ConfigType>

Definition at line 479 of file server.h.

template<class ConfigType >
void rtt_dynamic_reconfigure::Server< ConfigType >::shutdown ( ) [inline]

Unadvertise the dynamic_reconfigure topics and services at the master. This is the contrary of the advertise() member function.

Definition at line 397 of file server.h.

template<class ConfigType >
void rtt_dynamic_reconfigure::Server< ConfigType >::updateConfig ( const ConfigType &  config) [inline]

Update the config from an instance of ConfigType

Parameters:
configthe ConfigType instance

Definition at line 235 of file server.h.

template<class ConfigType >
void rtt_dynamic_reconfigure::Server< ConfigType >::updateConfigInternal ( const ConfigType &  config) [inline, private]

Definition at line 567 of file server.h.

template<class ConfigType >
bool rtt_dynamic_reconfigure::Server< ConfigType >::updated ( ) [inline]

Inform the server that some properties have been updated.

This will republish the parameter values and updates the UI.

Definition at line 411 of file server.h.

template<class ConfigType >
bool rtt_dynamic_reconfigure::Server< ConfigType >::updatePropertiesDefaultImpl ( const RTT::PropertyBag source,
uint32_t   
) [inline, private]

Definition at line 580 of file server.h.

template<class ConfigType >
UpdaterType* rtt_dynamic_reconfigure::Server< ConfigType >::updater ( ) const [inline]

Retrieve/construct the Updater instance of this rtt_dynamic_reconfigure server.

Returns:
a pointer to an instance of Updater<ConfigType>

Definition at line 468 of file server.h.


Member Data Documentation

template<class ConfigType >
ConfigType rtt_dynamic_reconfigure::Server< ConfigType >::config_ [private]

Definition at line 182 of file server.h.

template<class ConfigType >
ConfigType rtt_dynamic_reconfigure::Server< ConfigType >::default_ [private]

Definition at line 185 of file server.h.

template<class ConfigType >
ros::Publisher rtt_dynamic_reconfigure::Server< ConfigType >::descr_pub_ [private]

Definition at line 180 of file server.h.

template<class ConfigType >
bool rtt_dynamic_reconfigure::Server< ConfigType >::initialized_ [private]

Definition at line 188 of file server.h.

template<class ConfigType >
ConfigType rtt_dynamic_reconfigure::Server< ConfigType >::max_ [private]

Definition at line 184 of file server.h.

template<class ConfigType >
ConfigType rtt_dynamic_reconfigure::Server< ConfigType >::min_ [private]

Definition at line 183 of file server.h.

template<class ConfigType >
RTT::os::MutexRecursive rtt_dynamic_reconfigure::Server< ConfigType >::mutex_ [private]

Definition at line 176 of file server.h.

template<class ConfigType >
ros::NodeHandle* rtt_dynamic_reconfigure::Server< ConfigType >::node_handle_ [private]

Definition at line 177 of file server.h.

template<class ConfigType >
RTT::OperationCaller<void(uint32_t level)> rtt_dynamic_reconfigure::Server< ConfigType >::notify_callback_ [private]

Definition at line 191 of file server.h.

template<class ConfigType >
ros::ServiceServer rtt_dynamic_reconfigure::Server< ConfigType >::set_service_ [private]

Definition at line 178 of file server.h.

template<class ConfigType >
RTT::OperationCaller<bool(const RTT::PropertyBag &source, uint32_t level)> rtt_dynamic_reconfigure::Server< ConfigType >::update_callback_ [private]

Definition at line 190 of file server.h.

template<class ConfigType >
RTT::Operation<bool(const RTT::PropertyBag &source, uint32_t level)> rtt_dynamic_reconfigure::Server< ConfigType >::update_callback_default_impl_ [private]

Definition at line 192 of file server.h.

template<class ConfigType >
ros::Publisher rtt_dynamic_reconfigure::Server< ConfigType >::update_pub_ [private]

Definition at line 179 of file server.h.

template<class ConfigType >
boost::shared_ptr<UpdaterType> rtt_dynamic_reconfigure::Server< ConfigType >::updater_ [mutable, private]

Definition at line 187 of file server.h.


The documentation for this class was generated from the following file:


rtt_dynamic_reconfigure
Author(s): Johannes Meyer
autogenerated on Wed Sep 16 2015 06:59:29