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

Base class for connector plugins that manage robot state transitions. More...

#include <ConnectorBase.hpp>

Inheritance diagram for roboligo::ConnectorBase:
Collaboration diagram for roboligo::ConnectorBase:

Public Member Functions

 ConnectorBase ()=default
 Default constructor.
virtual bool exit (RobotState &robot_state)
 Exit and cleanup robot state.
virtual void initialize (const std::shared_ptr< rclcpp_lifecycle::LifecycleNode > parent_node, const std::string &plugin_name)
 Initialize the connector with a lifecycle node.
virtual bool set (RobotState &robot_state)
 Set initial robot state.
virtual bool update (RobotState &robot_state)
 Update robot state.
virtual ~ConnectorBase ()=default
 Virtual destructor.
Public Member Functions inherited from roboligo::PluginBase
std::shared_ptr< rclcpp_lifecycle::LifecycleNode > get_node () const
 Retrieves the parent lifecycle node.
const std::string & get_plugin_name () const
 Retrieves the plugin name.
virtual void on_initialize ()
 Called during plugin initialization. Override in derived classes for custom setup.
 PluginBase ()=default
 Default constructor.
virtual ~PluginBase ()=default
 Virtual destructor for proper cleanup of derived classes.

Protected Member Functions

virtual void on_exit (RobotState &robot_state)
 Hook called during exit operation.
virtual void on_set (RobotState &robot_state)
 Hook called during set operation.
virtual void on_update (RobotState &robot_state)
 Hook called during update operation.

Detailed Description

Base class for connector plugins that manage robot state transitions.

ConnectorBase provides a plugin interface for handling robot state initialization, updates, and cleanup. Derived classes should override the virtual methods to implement specific connector behavior.

Constructor & Destructor Documentation

◆ ConnectorBase()

roboligo::ConnectorBase::ConnectorBase ( )
default

Default constructor.

◆ ~ConnectorBase()

virtual roboligo::ConnectorBase::~ConnectorBase ( )
virtualdefault

Virtual destructor.

Member Function Documentation

◆ exit()

bool roboligo::ConnectorBase::exit ( RobotState & robot_state)
virtual

Exit and cleanup robot state.

Called during shutdown to finalize the robot state.

Parameters
robot_stateReference to the robot state to finalize.
Returns
true if exit operation succeeded, false otherwise.

◆ initialize()

void roboligo::ConnectorBase::initialize ( const std::shared_ptr< rclcpp_lifecycle::LifecycleNode > parent_node,
const std::string & plugin_name )
virtual

Initialize the connector with a lifecycle node.

Parameters
parent_nodeShared pointer to the lifecycle node that owns this plugin.
plugin_nameName identifier for this connector plugin.

Reimplemented from roboligo::PluginBase.

◆ on_exit()

virtual void roboligo::ConnectorBase::on_exit ( RobotState & robot_state)
inlineprotectedvirtual

Hook called during exit operation.

Override this method to implement custom cleanup behavior.

Parameters
robot_stateReference to the robot state.

◆ on_set()

virtual void roboligo::ConnectorBase::on_set ( RobotState & robot_state)
inlineprotectedvirtual

Hook called during set operation.

Override this method to implement custom set behavior.

Parameters
robot_stateReference to the robot state.

◆ on_update()

virtual void roboligo::ConnectorBase::on_update ( RobotState & robot_state)
inlineprotectedvirtual

Hook called during update operation.

Override this method to implement custom update behavior.

Parameters
robot_stateReference to the robot state.

◆ set()

bool roboligo::ConnectorBase::set ( RobotState & robot_state)
virtual

Set initial robot state.

Called during the configuration phase to establish the initial robot state.

Parameters
robot_stateReference to the robot state to configure.
Returns
true if set operation succeeded, false otherwise.

◆ update()

bool roboligo::ConnectorBase::update ( RobotState & robot_state)
virtual

Update robot state.

Called during the active phase to update the robot state.

Parameters
robot_stateReference to the robot state to update.
Returns
true if update operation succeeded, false otherwise.

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