Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
prbt_hardware_support::AdapterOperationMode Class Reference

Publishes information on the active operation mode. Also offers a service for querying the operation mode. More...

#include <adapter_operation_mode.h>

Inheritance diagram for prbt_hardware_support::AdapterOperationMode:
Inheritance graph
[legend]

Public Member Functions

 AdapterOperationMode (ros::NodeHandle &nh)
 
virtual ~AdapterOperationMode ()=default
 

Protected Member Functions

void updateOperationMode (const OperationModes &mode)
 Stores the operation mode and publishes it, if it has changed. More...
 

Private Member Functions

bool getOperationMode (GetOperationMode::Request &req, GetOperationMode::Response &res)
 
void initOperationModeService ()
 Initializes the operation mode service. More...
 

Private Attributes

ros::NodeHandlenh_
 The node handle. More...
 
OperationModes op_mode_
 Store the current operation mode according to OperationModes.msg. More...
 
std::mutex op_mode_mutex_
 Protects read/write of the operation mode. More...
 
ros::Publisher operation_mode_pub_
 Informs about operation mode changes via topic. More...
 
ros::ServiceServer operation_mode_server_
 Server serving a service to ask whether a brake test is currently required. More...
 

Detailed Description

Publishes information on the active operation mode. Also offers a service for querying the operation mode.

Definition at line 33 of file adapter_operation_mode.h.

Constructor & Destructor Documentation

◆ AdapterOperationMode()

prbt_hardware_support::AdapterOperationMode::AdapterOperationMode ( ros::NodeHandle nh)

Definition at line 27 of file adapter_operation_mode.cpp.

◆ ~AdapterOperationMode()

virtual prbt_hardware_support::AdapterOperationMode::~AdapterOperationMode ( )
virtualdefault

Member Function Documentation

◆ getOperationMode()

bool prbt_hardware_support::AdapterOperationMode::getOperationMode ( GetOperationMode::Request &  req,
GetOperationMode::Response &  res 
)
private

Definition at line 61 of file adapter_operation_mode.cpp.

◆ initOperationModeService()

void prbt_hardware_support::AdapterOperationMode::initOperationModeService ( )
private

Initializes the operation mode service.

Definition at line 40 of file adapter_operation_mode.cpp.

◆ updateOperationMode()

void prbt_hardware_support::AdapterOperationMode::updateOperationMode ( const OperationModes &  mode)
protected

Stores the operation mode and publishes it, if it has changed.

Definition at line 46 of file adapter_operation_mode.cpp.

Member Data Documentation

◆ nh_

ros::NodeHandle& prbt_hardware_support::AdapterOperationMode::nh_
private

The node handle.

Definition at line 61 of file adapter_operation_mode.h.

◆ op_mode_

OperationModes prbt_hardware_support::AdapterOperationMode::op_mode_
private

Store the current operation mode according to OperationModes.msg.

Definition at line 55 of file adapter_operation_mode.h.

◆ op_mode_mutex_

std::mutex prbt_hardware_support::AdapterOperationMode::op_mode_mutex_
private

Protects read/write of the operation mode.

Definition at line 58 of file adapter_operation_mode.h.

◆ operation_mode_pub_

ros::Publisher prbt_hardware_support::AdapterOperationMode::operation_mode_pub_
private

Informs about operation mode changes via topic.

Definition at line 64 of file adapter_operation_mode.h.

◆ operation_mode_server_

ros::ServiceServer prbt_hardware_support::AdapterOperationMode::operation_mode_server_
private

Server serving a service to ask whether a brake test is currently required.

Definition at line 67 of file adapter_operation_mode.h.


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


prbt_hardware_support
Author(s):
autogenerated on Thu May 28 2020 03:13:50