Carma-platform v4.2.0
CARMA Platform is built on robot operating system (ROS) and utilizes open source software (OSS) that enables Cooperative Driving Automation (CDA) features to allow Automated Driving Systems to interact and cooperate with infrastructure and other vehicles through communication.
|
The SSCDriverManager serves as a component to manage ROS1 SSC Driver in CARMA which is primarily in ROS2. More...
#include <ssc_driver_manager.hpp>
Public Member Functions | |
SSCDriverManager () | |
Default constructor for SSCDriverManager with driver_timeout_ = 1000ms. More... | |
SSCDriverManager (const std::string &ssc_driver_name, const long driver_timeout) | |
Constructor for SSCDriverManager. More... | |
void | update_driver_status (const carma_driver_msgs::msg::DriverStatus::SharedPtr msg, long current_time) |
Update driver status. More... | |
bool | is_ssc_driver_operational (long current_time) |
Check if all critical drivers are operational. More... | |
carma_msgs::msg::SystemAlert | get_latest_system_alert (long time_now, long start_up_timestamp, long startup_duration) |
Handle the spin and publisher. More... | |
Protected Member Functions | |
FRIEND_TEST (DriverManagerTest, testCarTruckHandleSpinFatalUnknown) | |
Protected Attributes | |
std::string | ssc_driver_name_ = "" |
std::shared_ptr< Entry > | latest_ssc_status_entry_ = std::make_shared<Entry>() |
Latest SSC Status entry to keep track. More... | |
long | driver_timeout_ = 1000 |
bool | starting_up_ = true |
The SSCDriverManager serves as a component to manage ROS1 SSC Driver in CARMA which is primarily in ROS2.
Definition at line 45 of file ssc_driver_manager.hpp.
subsystem_controllers::SSCDriverManager::SSCDriverManager | ( | ) |
Default constructor for SSCDriverManager with driver_timeout_ = 1000ms.
Definition at line 29 of file ssc_driver_manager.cpp.
subsystem_controllers::SSCDriverManager::SSCDriverManager | ( | const std::string & | ssc_driver_name, |
const long | driver_timeout | ||
) |
Constructor for SSCDriverManager.
ssc_driver_name | The driver name which will be treated as required. A failure in this plugin will result in an exception |
driver_timeout | The timeout threshold for the driver |
Definition at line 31 of file ssc_driver_manager.cpp.
|
protected |
carma_msgs::msg::SystemAlert subsystem_controllers::SSCDriverManager::get_latest_system_alert | ( | long | time_now, |
long | start_up_timestamp, | ||
long | startup_duration | ||
) |
Handle the spin and publisher.
Definition at line 36 of file ssc_driver_manager.cpp.
References is_ssc_driver_operational(), arbitrator::SHUTDOWN, and starting_up_.
bool subsystem_controllers::SSCDriverManager::is_ssc_driver_operational | ( | long | current_time | ) |
Check if all critical drivers are operational.
Definition at line 78 of file ssc_driver_manager.cpp.
References driver_timeout_, latest_ssc_status_entry_, and ssc_driver_name_.
Referenced by get_latest_system_alert().
void subsystem_controllers::SSCDriverManager::update_driver_status | ( | const carma_driver_msgs::msg::DriverStatus::SharedPtr | msg, |
long | current_time | ||
) |
Update driver status.
Definition at line 62 of file ssc_driver_manager.cpp.
References latest_ssc_status_entry_, and ssc_driver_name_.
|
protected |
Definition at line 87 of file ssc_driver_manager.hpp.
Referenced by is_ssc_driver_operational().
|
protected |
Latest SSC Status entry to keep track.
Definition at line 84 of file ssc_driver_manager.hpp.
Referenced by is_ssc_driver_operational(), and update_driver_status().
|
protected |
Definition at line 81 of file ssc_driver_manager.hpp.
Referenced by is_ssc_driver_operational(), and update_driver_status().
|
protected |
Definition at line 89 of file ssc_driver_manager.hpp.
Referenced by get_latest_system_alert().