roboligo
Loading...
Searching...
No Matches
roboligo::Commander Class Reference

Base class for commanding robotic operations through message publishing. More...

#include <Commander.hpp>

Inheritance diagram for roboligo::Commander:
Collaboration diagram for roboligo::Commander:

Public Member Functions

 Commander (std::string new_name, std::string new_value)
 Constructor for Commander.
void init (std::string new_name, std::string new_value)
 Initialize the commander with name and value.
bool is_stamped (void)
 Check if timestamp stamping is enabled.
void set_stamp (bool stamped)
 Enable or disable timestamp stamping for messages.
virtual ~Commander ()=default
 Virtual destructor.
Public Member Functions inherited from roboligo::Linker
interfaces::modes get_mode ()
 Gets the current mode of the linker.
std::string get_name ()
 Gets the linker name.
std::string get_topic ()
 Gets the topic name.
bool is_available (void)
 Checks if the linker is available.
bool is_configured (void)
 Checks if the linker is configured.
 Linker ()
 Default constructor.
void set_available (bool new_state)
 Sets the availability state.
void set_configured (bool new_state)
 Sets the configuration state.
void set_interface (std::string name_, std::string topic_name_)
 Configures the interface with name and topic.
void set_mode (interfaces::modes new_mode)
 Sets the linker mode.
void set_name (std::string new_name)
 Sets the linker name.
void set_service (std::string new_name)
 Sets the service name.
void set_topic (std::string new_name)
 Sets the topic name.
virtual ~Linker ()=default
 Virtual destructor.

Protected Member Functions

void initialize (std::string new_name, std::string new_topic)
 Protected initialization method.

Protected Attributes

bool use_stamp_ {true}
 Flag indicating whether to include timestamps in published messages.
Protected Attributes inherited from roboligo::Linker
bool available_ {false}
 Availability flag.
bool configured_ {false}
 Configuration state flag.
interfaces::modes mode_
 Current operating mode.

Additional Inherited Members

Public Attributes inherited from roboligo::Linker
std::shared_ptr< interfaces::Interfaceinterface
 Shared pointer to the interface object.
std::string name {"linker"}
 Linker identifier name.
std::string topic_name {"/interface"}
 Associated topic name.

Detailed Description

Base class for commanding robotic operations through message publishing.

Inherits from Linker to provide ROS communication functionality. Manages stamped message publishing with optional timestamp inclusion.

Constructor & Destructor Documentation

◆ Commander()

roboligo::Commander::Commander ( std::string new_name,
std::string new_value )

Constructor for Commander.

Parameters
new_nameThe name identifier for the commander instance.
new_valueThe initial value or topic associated with the commander.

◆ ~Commander()

virtual roboligo::Commander::~Commander ( )
virtualdefault

Virtual destructor.

Member Function Documentation

◆ init()

void roboligo::Commander::init ( std::string new_name,
std::string new_value )

Initialize the commander with name and value.

Parameters
new_nameThe name identifier for the commander instance.
new_valueThe initial value or topic associated with the commander.

◆ initialize()

void roboligo::Commander::initialize ( std::string new_name,
std::string new_topic )
protected

Protected initialization method.

Parameters
new_nameThe name identifier for the commander instance.
new_topicThe ROS topic for publishing messages.

◆ is_stamped()

bool roboligo::Commander::is_stamped ( void )

Check if timestamp stamping is enabled.

Returns
True if stamping is enabled, false otherwise.

◆ set_stamp()

void roboligo::Commander::set_stamp ( bool stamped)

Enable or disable timestamp stamping for messages.

Parameters
stampedTrue to include timestamps, false otherwise.

Member Data Documentation

◆ use_stamp_

bool roboligo::Commander::use_stamp_ {true}
protected

Flag indicating whether to include timestamps in published messages.


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