Public Member Functions | Private Member Functions | Private Attributes | List of all members
swarmros::bridge::ParameterPublisher Class Referencefinal

An extension of ParameterTarget that publishes updates as custom messages. More...

#include <ParameterPublisher.h>

Inheritance diagram for swarmros::bridge::ParameterPublisher:
Inheritance graph
[legend]

Public Member Functions

 ParameterPublisher (ros::NodeHandle &nodeHandle, const std::string &suffix, const std::string &message, swarmio::services::keyvalue::Service &keyvalueService, const std::string &name, const std::string &parameter, bool isWritable)
 Construct a new ParameterPublisher object. More...
 
virtual void Set (const std::string &path, const swarmio::data::Variant &value) override
 Set the current value of the target. More...
 
- Public Member Functions inherited from swarmros::bridge::ParameterTarget
virtual bool CanRead (const std::string &name) const noexceptoverride
 Determines whether the value can be read. More...
 
virtual bool CanWrite (const std::string &name) const noexceptoverride
 Determines whether the value can be written. More...
 
virtual swarmio::data::Variant Get (const std::string &path) override
 Get the current value of the target parameter. More...
 
virtual swarmio::data::discovery::Field GetFieldDescriptor (const std::string &path) const override
 Get the data type of the target. More...
 
 ParameterTarget (ros::NodeHandle &nodeHandle, swarmio::services::keyvalue::Service &keyvalueService, const std::string &name, const std::string &parameter, bool isWritable)
 Construct a new ParameterTarget object. More...
 
virtual ~ParameterTarget ()
 Destructor. More...
 
- Public Member Functions inherited from swarmros::bridge::Pylon
virtual ~Pylon ()
 Add virtual destructor. More...
 
- Public Member Functions inherited from swarmio::services::keyvalue::Target
virtual void Set (const std::string &path, const data::Variant &value)=0
 Set the current value of the target. More...
 

Private Member Functions

void UpdateValue (const swarmio::data::Variant &value)
 Update the currently latched value. More...
 

Private Attributes

ros::Publisher _publisher
 Publisher. More...
 
const introspection::MessageSerializer_serializer
 Serializer. More...
 

Additional Inherited Members

- Protected Member Functions inherited from swarmros::bridge::Pylon
 Pylon ()
 Mark as abstract. More...
 

Detailed Description

An extension of ParameterTarget that publishes updates as custom messages.

Definition at line 13 of file ParameterPublisher.h.

Constructor & Destructor Documentation

ParameterPublisher::ParameterPublisher ( ros::NodeHandle nodeHandle,
const std::string &  suffix,
const std::string &  message,
swarmio::services::keyvalue::Service keyvalueService,
const std::string &  name,
const std::string &  parameter,
bool  isWritable 
)

Construct a new ParameterPublisher object.

Parameters
nodeHandleNode handle
suffixTopic suffix
messageMessage type
keyvalueServiceKey-value service
nameGlobal parameter name
parameterROS parameter name
isWritableTrue if set requests should be accepted

Definition at line 7 of file ParameterPublisher.cpp.

Member Function Documentation

void ParameterPublisher::Set ( const std::string &  path,
const swarmio::data::Variant &  value 
)
overridevirtual

Set the current value of the target.

Parameters
valueNew value

Reimplemented from swarmros::bridge::ParameterTarget.

Definition at line 22 of file ParameterPublisher.cpp.

void ParameterPublisher::UpdateValue ( const swarmio::data::Variant &  value)
private

Update the currently latched value.

Parameters
valueNew value

Definition at line 31 of file ParameterPublisher.cpp.

Member Data Documentation

ros::Publisher swarmros::bridge::ParameterPublisher::_publisher
private

Publisher.

Definition at line 21 of file ParameterPublisher.h.

const introspection::MessageSerializer* swarmros::bridge::ParameterPublisher::_serializer
private

Serializer.

Definition at line 27 of file ParameterPublisher.h.


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


swarmros
Author(s):
autogenerated on Fri Apr 3 2020 03:42:48