19#include <carma_planning_msgs/msg/plugin.hpp>
20#include <carma_planning_msgs/srv/get_plugin_api.hpp>
21#include <carma_planning_msgs/srv/plugin_list.hpp>
22#include <carma_planning_msgs/srv/plugin_activation.hpp>
23#include <ros2_lifecycle_manager/lifecycle_manager_interface.hpp>
24#include <unordered_set>
33#include <carma_driver_msgs/msg/driver_status.hpp>
34#include <carma_msgs/msg/system_alert.hpp>
35#include <gtest/gtest_prod.h>
60 DriverManager(
const std::vector<std::string>& critical_driver_names,
61 const std::vector<std::string>& camera_entries,
62 const long driver_timeout);
68 void update_driver_status(
const carma_driver_msgs::msg::DriverStatus::SharedPtr msg,
long current_time);
78 void evaluate_sensor(
int &sensor_input,
bool available,
long current_time,
long timestamp,
long driver_timeout);
83 carma_msgs::msg::SystemAlert
handle_spin(
long time_now,
long start_up_timestamp,
long startup_duration);
94 std::shared_ptr<EntryManager>
em_;
101 FRIEND_TEST(DriverManagerTest, testCarTruckHandleSpinFatalUnknown);
The DriverManager serves as a component to manage CARMA required ROS1 Drivers.
void update_driver_status(const carma_driver_msgs::msg::DriverStatus::SharedPtr msg, long current_time)
Update driver status.
std::string are_critical_drivers_operational(long current_time)
Check if all critical drivers are operational.
FRIEND_TEST(DriverManagerTest, testCarTruckHandleSpinFatalUnknown)
std::vector< std::string > camera_entries_
carma_msgs::msg::SystemAlert handle_spin(long time_now, long start_up_timestamp, long startup_duration)
Handle the spin and publisher.
std::shared_ptr< EntryManager > em_
Entry manager to keep track of detected plugins.
std::vector< std::string > critical_drivers_
void evaluate_sensor(int &sensor_input, bool available, long current_time, long timestamp, long driver_timeout)
Evaluate if the sensor is available.
DriverManager()
Default constructor for DriverManager with driver_timeout_ = 1000ms.