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

Manages the configuration and state of interface connections. More...

#include <Linker.hpp>

Inheritance diagram for roboligo::Linker:
Collaboration diagram for roboligo::Linker:

Public Member Functions

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.

Public Attributes

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.

Protected Attributes

bool available_ {false}
 Availability flag.
bool configured_ {false}
 Configuration state flag.
interfaces::modes mode_
 Current operating mode.

Detailed Description

Manages the configuration and state of interface connections.

Handles linking between components through topics and services, including mode management, availability, and configuration status.

Constructor & Destructor Documentation

◆ Linker()

roboligo::Linker::Linker ( )
inline

Default constructor.

◆ ~Linker()

virtual roboligo::Linker::~Linker ( )
virtualdefault

Virtual destructor.

Member Function Documentation

◆ get_mode()

interfaces::modes roboligo::Linker::get_mode ( )

Gets the current mode of the linker.

Returns
Current interface mode

◆ get_name()

std::string roboligo::Linker::get_name ( )

Gets the linker name.

Returns
Name string

◆ get_topic()

std::string roboligo::Linker::get_topic ( )

Gets the topic name.

Returns
Topic name string

◆ is_available()

bool roboligo::Linker::is_available ( void )

Checks if the linker is available.

Returns
True if available, false otherwise

◆ is_configured()

bool roboligo::Linker::is_configured ( void )

Checks if the linker is configured.

Returns
True if configured, false otherwise

◆ set_available()

void roboligo::Linker::set_available ( bool new_state)

Sets the availability state.

Parameters
new_stateAvailability state

◆ set_configured()

void roboligo::Linker::set_configured ( bool new_state)

Sets the configuration state.

Parameters
new_stateConfiguration state

◆ set_interface()

void roboligo::Linker::set_interface ( std::string name_,
std::string topic_name_ )

Configures the interface with name and topic.

Parameters
name_Interface name
topic_name_Topic name

◆ set_mode()

void roboligo::Linker::set_mode ( interfaces::modes new_mode)

Sets the linker mode.

Parameters
new_modeThe mode to set

◆ set_name()

void roboligo::Linker::set_name ( std::string new_name)

Sets the linker name.

Parameters
new_nameName to assign

◆ set_service()

void roboligo::Linker::set_service ( std::string new_name)

Sets the service name.

Parameters
new_nameService name to assign

◆ set_topic()

void roboligo::Linker::set_topic ( std::string new_name)

Sets the topic name.

Parameters
new_nameTopic name to assign

Member Data Documentation

◆ available_

bool roboligo::Linker::available_ {false}
protected

Availability flag.

◆ configured_

bool roboligo::Linker::configured_ {false}
protected

Configuration state flag.

◆ interface

std::shared_ptr<interfaces::Interface> roboligo::Linker::interface

Shared pointer to the interface object.

◆ mode_

interfaces::modes roboligo::Linker::mode_
protected

Current operating mode.

◆ name

std::string roboligo::Linker::name {"linker"}

Linker identifier name.

◆ topic_name

std::string roboligo::Linker::topic_name {"/interface"}

Associated topic name.


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