19 #ifndef ACCESS_CONTROL_ACCESS_CONTROL_H_
20 #define ACCESS_CONTROL_ACCESS_CONTROL_H_
22 #include <pluginlib/class_list_macros.h>
26 #include <ff_msgs/AccessControlStateStamped.h>
27 #include <ff_msgs/AckCompletedStatus.h>
28 #include <ff_msgs/AckStamped.h>
29 #include <ff_msgs/AckStatus.h>
30 #include <ff_msgs/CommandConstants.h>
31 #include <ff_msgs/CommandStamped.h>
51 std::string GenerateCookie();
53 void HandleCommand(ff_msgs::CommandStampedConstPtr
const& cmd);
55 void HandleGrabControl(ff_msgs::CommandStampedConstPtr
const& cmd);
57 void HandleRequestControl(ff_msgs::CommandStampedConstPtr
const& cmd);
59 void PublishAck(std::string
const& cmd_id,
60 std::string
const& message =
"",
61 uint8_t completed_status = ff_msgs::AckCompletedStatus::OK,
62 uint8_t status = ff_msgs::AckStatus::COMPLETED);
64 void PublishCommand(ff_msgs::CommandStampedConstPtr
const& cmd);
68 ff_msgs::AccessControlStateStamped state_;
69 ff_msgs::AckStamped ack_;
74 ros::Publisher cmd_ack_pub_, state_pub_, cmd_pub_, failed_cmd_pub_;
75 ros::Subscriber cmd_sub_;
77 std::string requestor_;
82 #endif // ACCESS_CONTROL_ACCESS_CONTROL_H_