Public Member Functions | Private Types | Private Member Functions | Private Attributes | Friends | List of all members
rtt_dynamic_reconfigure::Server< ConfigType > Class Template Reference

#include <server.h>

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

Public Member Functions

void advertise (std::string ns=std::string())
 
const ConfigType & getConfig () const
 
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 ()
 
- Public Member Functions inherited from RTT::Service
bool addLocalOperation (base::OperationBase &op)
 
Operation< Signature > & addOperation (Operation< Signature > &op)
 
Operation< Func > & addOperation (const std::string name, Func *func, ExecutionThread et=ClientThread)
 
Operation< typename internal::GetSignature< Func >::Signature > & addOperation (const std::string name, Func func, Class *obj, ExecutionThread et=ClientThread)
 
Operation< typename internal::GetSignatureDS< Func >::Signature > & addOperationDS (const std::string &name, Func func, internal::DataSource< boost::shared_ptr< ObjT > > *sp, ExecutionThread et=ClientThread)
 
Operation< Signature > & addOperationDS (internal::DataSource< boost::shared_ptr< ObjT > > *sp, Operation< Signature > &op)
 
virtual bool addService (shared_ptr obj)
 
Operation< Signature > & addSynchronousOperation (Operation< Signature > &op)
 
Operation< typename internal::GetSignature< Func >::Signature > & addSynchronousOperation (const std::string name, Func func, Class *obj, ExecutionThread et=ClientThread)
 
void clear ()
 
internal::OperationCallerC create (std::string name, ExecutionEngine *caller)
 
const std::string & doc () const
 
void doc (const std::string &description)
 
boost::shared_ptr< base::DisposableInterfacegetLocalOperation (std::string name)
 
const std::string & getName () const
 
OperationInterfacePartgetOperation (std::string name)
 
base::DataSourceBase::shared_ptr getOperation (std::string name, const std::vector< base::DataSourceBase::shared_ptr > &args, ExecutionEngine *caller) const
 
std::vector< std::string > getOperationNames () const
 
TaskContextgetOwner () const
 
ExecutionEnginegetOwnerExecutionEngine () const
 
shared_ptr getParent () const
 
virtual ProviderNames getProviderNames () const
 
shared_ptr getService (const std::string &service_name)
 
bool hasOperation (const std::string &name) const
 
bool hasService (const std::string &service_name)
 
Service::shared_ptr provides (const std::string &service_name)
 
Service::shared_ptr provides ()
 
void removeOperation (const std::string &name)
 
virtual void removeService (std::string const &service_name)
 
bool resetOperation (std::string name, base::OperationBase *impl)
 
 Service (const std::string &name, TaskContext *owner=0)
 
void setName (const std::string &name)
 
bool setOperationThread (std::string const &name, ExecutionThread et)
 
void setOwner (TaskContext *new_owner)
 
void setParent (shared_ptr new_parent)
 
virtual ~Service ()
 
- Public Member Functions inherited from RTT::OperationInterface
void add (const std::string &name, OperationInterfacePart *part)
 
void clear ()
 
Descriptions getArgumentList (const std::string &name) const
 
int getArity (const std::string &name) const
 
int getCollectArity (const std::string &name) const
 
std::string getDescription (const std::string &name) const
 
std::vector< std::string > getNames () const
 
OperationInterfacePartgetPart (const std::string &name)
 
std::string getResultType (const std::string &name) const
 
bool hasMember (const std::string &name) const
 
bool isSynchronous (const std::string &name) const
 
base::DataSourceBase::shared_ptr produce (const std::string &name, const Arguments &args, ExecutionEngine *caller) const
 
base::DataSourceBase::shared_ptr produceCollect (const std::string &name, const Arguments &args, internal::DataSource< bool >::shared_ptr blocking) const
 
base::DataSourceBase::shared_ptr produceHandle (const std::string &name) const
 
base::DataSourceBase::shared_ptr produceSend (const std::string &name, const Arguments &args, ExecutionEngine *caller) const
 
void remove (const std::string &name)
 
- Public Member Functions inherited from RTT::ConfigurationInterface
bool addAttribute (const std::string &name, T &attr)
 
Attribute< T > & addAttribute (const std::string &name, Attribute< T > &attr)
 
bool addAttribute (base::AttributeBase &a)
 
bool addConstant (const std::string &name, const T &cnst)
 
Constant< T > & addConstant (const std::string &name, Constant< T > &cnst)
 
bool addConstant (base::AttributeBase &c)
 
Property< T > & addProperty (const std::string &name, Property< T > &prop)
 
bool addProperty (base::PropertyBase &pb)
 
Property< T > & addProperty (const std::string &name, T &prop)
 
void clear ()
 
 ConfigurationInterface ()
 
ConfigurationInterfacecopy (std::map< const base::DataSourceBase *, base::DataSourceBase * > &repl, bool instantiate) const
 
base::AttributeBasegetAttribute (const std::string &name) const
 
AttributeNames getAttributeNames () const
 
base::AttributeBasegetConstant (const std::string &name) const
 
base::PropertyBasegetProperty (const std::string &name) const
 
base::AttributeBasegetValue (const std::string &name) const
 
AttributeObjects const & getValues () const
 
bool hasAttribute (const std::string &name) const
 
bool hasProperty (const std::string &name) const
 
void loadValues (AttributeObjects const &new_values)
 
PropertyBagproperties ()
 
void removeAttribute (const std::string &name)
 
bool removeProperty (base::PropertyBase &p)
 
bool removeValue (const std::string &name)
 
bool setValue (base::AttributeBase *ab)
 
 ~ConfigurationInterface ()
 
- Public Member Functions inherited from RTT::DataFlowInterface
base::InputPortInterfaceaddEventPort (const std::string &name, base::InputPortInterface &port, SlotFunction callback=SlotFunction())
 
base::InputPortInterfaceaddEventPort (base::InputPortInterface &port, SlotFunction callback=SlotFunction())
 
base::InputPortInterfaceaddLocalEventPort (base::InputPortInterface &port, SlotFunction callback=SlotFunction())
 
base::PortInterfaceaddLocalPort (base::PortInterface &port)
 
base::PortInterfaceaddPort (const std::string &name, base::PortInterface &port)
 
base::PortInterfaceaddPort (base::PortInterface &port)
 
void clear ()
 
 DataFlowInterface (Service *parent=0)
 
void dataOnPort (base::PortInterface *port)
 
TaskContextgetOwner () const
 
base::PortInterfacegetPort (const std::string &name) const
 
std::string getPortDescription (const std::string &name) const
 
PortNames getPortNames () const
 
Ports getPorts () const
 
Type * getPortType (const std::string &name)
 
ServicegetService () const
 
void removeLocalPort (const std::string &name)
 
void removePort (const std::string &name)
 
bool setPortDescription (const std::string &name, const std::string description)
 
 ~DataFlowInterface ()
 

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 &bag, 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< NotifyCallbackSignaturenotify_callback_
 
ros::ServiceServer set_service_
 
RTT::OperationCaller< UpdateCallbackSignatureupdate_callback_
 
RTT::OperationCaller< UpdateCallbackConstSignatureupdate_callback_const_
 
RTT::Operation< UpdateCallbackConstSignatureupdate_callback_default_impl_
 
ros::Publisher update_pub_
 
boost::shared_ptr< UpdaterTypeupdater_
 

Friends

class DynamicReconfigureTestComponent
 

Additional Inherited Members

- Public Types inherited from RTT::Service
typedef OperationInterface Factory
 
typedef std::vector< std::string > ProviderNames
 
typedef boost::shared_ptr< const Serviceshared_constptr
 
typedef boost::shared_ptr< Serviceshared_ptr
 
- Public Types inherited from RTT::OperationInterface
typedef std::vector< base::DataSourceBase::shared_ptrArguments
 
typedef std::vector< ArgumentDescriptionDescriptions
 
- Public Types inherited from RTT::ConfigurationInterface
typedef std::vector< std::string > AttributeNames
 
typedef std::vector< base::AttributeBase * > AttributeObjects
 
- Public Types inherited from RTT::DataFlowInterface
typedef std::vector< std::string > PortNames
 
typedef std::vector< base::PortInterface * > Ports
 
typedef boost::function< void(base::PortInterface *)> SlotFunction
 
- Static Public Member Functions inherited from RTT::Service
static Service::shared_ptr Create (const std::string &name, TaskContext *owner=0)
 
- Protected Types inherited from RTT::Service
typedef std::vector< base::OperationBase * > OperationList
 
typedef std::map< std::string, shared_ptrServices
 
typedef std::map< std::string, base::OperationBase * > SimpleOperations
 
- Protected Types inherited from RTT::OperationInterface
typedef std::map< std::string, OperationInterfacePart * > map_t
 
- Protected Types inherited from RTT::ConfigurationInterface
typedef std::vector< base::AttributeBase * > map_t
 
- Protected Member Functions inherited from RTT::Service
bool testOperation (base::OperationBase &op)
 
- Protected Member Functions inherited from RTT::ConfigurationInterface
bool chkPtr (const std::string &where, const std::string &name, const void *ptr)
 
- Protected Member Functions inherited from RTT::DataFlowInterface
bool chkPtr (const std::string &where, const std::string &name, const void *ptr)
 
ServicecreatePortObject (const std::string &name)
 
- Protected Attributes inherited from RTT::Service
std::string mdescription
 
std::string mname
 
TaskContextmowner
 
OperationList ownedoperations
 
shared_ptr parent
 
Services services
 
SimpleOperations simpleoperations
 
- Protected Attributes inherited from RTT::OperationInterface
map_t data
 
- Protected Attributes inherited from RTT::ConfigurationInterface
PropertyBag bag
 
map_t values
 
- Protected Attributes inherited from RTT::DataFlowInterface
Ports mports
 
Servicemservice
 

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 65 of file server.h.

Member Typedef Documentation

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

Definition at line 188 of file server.h.

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

Definition at line 187 of file server.h.

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

Definition at line 186 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 216 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 229 of file server.h.

template<class ConfigType >
virtual rtt_dynamic_reconfigure::Server< ConfigType >::~Server ( )
inlinevirtual

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

Definition at line 241 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 389 of file server.h.

template<class ConfigType >
void rtt_dynamic_reconfigure::Server< ConfigType >::construct ( )
inlineprivate

Definition at line 584 of file server.h.

template<class ConfigType >
const ConfigType& rtt_dynamic_reconfigure::Server< ConfigType >::getConfig ( ) const
inline

Get the current configuration parameters

Returns
a const reference to the ConfigType instance holding the current values

Definition at line 250 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 315 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 325 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 332 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 267 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 277 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 284 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 291 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 301 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 308 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 372 of file server.h.

template<class ConfigType >
void rtt_dynamic_reconfigure::Server< ConfigType >::PublishDescription ( )
inlineprivate

Definition at line 627 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 445 of file server.h.

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

Definition at line 633 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 361 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 339 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 350 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 578 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 568 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 558 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 419 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 257 of file server.h.

template<class ConfigType >
void rtt_dynamic_reconfigure::Server< ConfigType >::updateConfigInternal ( const ConfigType &  config)
inlineprivate

Definition at line 660 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 433 of file server.h.

template<class ConfigType >
bool rtt_dynamic_reconfigure::Server< ConfigType >::updatePropertiesDefaultImpl ( const RTT::PropertyBag bag,
uint32_t   
)
inlineprivate

Definition at line 673 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 547 of file server.h.

Friends And Related Function Documentation

template<class ConfigType >
friend class DynamicReconfigureTestComponent
friend

Definition at line 632 of file server.h.

Member Data Documentation

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

Definition at line 196 of file server.h.

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

Definition at line 199 of file server.h.

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

Definition at line 194 of file server.h.

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

Definition at line 202 of file server.h.

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

Definition at line 198 of file server.h.

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

Definition at line 197 of file server.h.

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

Definition at line 190 of file server.h.

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

Definition at line 191 of file server.h.

template<class ConfigType >
RTT::OperationCaller<NotifyCallbackSignature> rtt_dynamic_reconfigure::Server< ConfigType >::notify_callback_
private

Definition at line 207 of file server.h.

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

Definition at line 192 of file server.h.

template<class ConfigType >
RTT::OperationCaller<UpdateCallbackSignature> rtt_dynamic_reconfigure::Server< ConfigType >::update_callback_
private

Definition at line 204 of file server.h.

template<class ConfigType >
RTT::OperationCaller<UpdateCallbackConstSignature> rtt_dynamic_reconfigure::Server< ConfigType >::update_callback_const_
private

Definition at line 205 of file server.h.

template<class ConfigType >
RTT::Operation<UpdateCallbackConstSignature> rtt_dynamic_reconfigure::Server< ConfigType >::update_callback_default_impl_
private

Definition at line 206 of file server.h.

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

Definition at line 193 of file server.h.

template<class ConfigType >
boost::shared_ptr<UpdaterType> rtt_dynamic_reconfigure::Server< ConfigType >::updater_
mutableprivate

Definition at line 201 of file server.h.


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


rtt_dynamic_reconfigure
Author(s): Johannes Meyer
autogenerated on Sat Jun 8 2019 18:05:06