1 #ifndef KINEMATICS_RV2AJ_DRIVER_HPP 2 #define KINEMATICS_RV2AJ_DRIVER_HPP 5 #include <std_msgs/String.h> 6 #include "HLR/RV2AJDriverClear.h" 7 #include "HLR/RV2AJDriverContinue.h" 8 #include "HLR/RV2AJDriverMB4.h" 9 #include "HLR/RV2AJDriverPause.h" 10 #include "HLR/RV2AJDriverQueueAdd.h" 11 #include "HLR/RV2AJDriverQueueCount.h" 13 #include <condition_variable> 66 bool cont(HLR::RV2AJDriverContinue::Request& req,
67 HLR::RV2AJDriverContinue::Response& res);
75 bool pause(HLR::RV2AJDriverPause::Request& req,
76 HLR::RV2AJDriverPause::Response& res);
84 bool clear(HLR::RV2AJDriverClear::Request& req,
85 HLR::RV2AJDriverClear::Response& res);
93 bool queue_count(HLR::RV2AJDriverQueueCount::Request& req,
94 HLR::RV2AJDriverQueueCount::Response& res);
102 bool queue_add(HLR::RV2AJDriverQueueAdd::Request& req,
103 HLR::RV2AJDriverQueueAdd::Response& res);
118 std::string to_mb4()
const;
155 ros::Publisher pub_mb4;
158 ros::ServiceServer srv_continue;
161 ros::ServiceServer srv_pause;
164 ros::ServiceServer srv_clear;
167 ros::ServiceServer srv_queue_count;
170 ros::ServiceServer srv_queue_add;
176 State worker_state = State::cont;
179 std::mutex worker_state_m;
182 std::queue<Command> commands;
185 std::mutex commands_m;
188 std::condition_variable commands_cv;
Driver for the Mitsubishi RV2-AJ.
Definition: Driver.hpp:25
bool queue_add(HLR::RV2AJDriverQueueAdd::Request &req, HLR::RV2AJDriverQueueAdd::Response &res)
Add requested command to the queue if compliant.
virtual ~Driver()
Destructor.
bool pause(HLR::RV2AJDriverPause::Request &req, HLR::RV2AJDriverPause::Response &res)
Pause processing events in queue.
bool clear(HLR::RV2AJDriverClear::Request &req, HLR::RV2AJDriverClear::Response &res)
Clears all to-be processed events in queue.
bool cont(HLR::RV2AJDriverContinue::Request &req, HLR::RV2AJDriverContinue::Response &res)
Continue processing events in queue.
bool queue_count(HLR::RV2AJDriverQueueCount::Request &req, HLR::RV2AJDriverQueueCount::Response &res)
Returns the number of elements currently inside the queue.
Driver & operator=(const Driver &d)=delete
Copy assignment operator, deleted.