6 #ifndef FLEXIV_RDK_DEVICE_HPP_
7 #define FLEXIV_RDK_DEVICE_HPP_
12 namespace flexiv::rdk {
14 using DeviceParamDataTypes
15 = std::variant<int, double, std::string, std::vector<double>, std::vector<std::string>>;
36 std::vector<std::string>
list()
const;
43 bool exist(
const std::string& name)
const;
52 bool enabled(
const std::string& name)
const;
73 std::map<std::string, DeviceParamDataTypes>
params(
const std::string& name)
const;
82 void Enable(
const std::string& name);
105 const std::map<std::string, std::variant<bool, int, double>>& commands);
109 std::unique_ptr<Impl> pimpl_;
Interface to control the peripheral device(s) connected to the robot.
void Enable(const std::string &name)
[Blocking] Enable the specified device.
void Command(const std::string &name, const std::map< std::string, std::variant< bool, int, double >> &commands)
[Blocking] Send command(s) to the specified device.
std::vector< std::string > list() const
[Non-blocking] A list of all existing devices.
Device(const Robot &robot)
[Non-blocking] Instantiate the device control interface.
bool connected(const std::string &name) const
[Blocking] Whether the specified device is connected.
std::map< std::string, DeviceParamDataTypes > params(const std::string &name) const
[Blocking] Configuration parameters of the specified device.
void Disable(const std::string &name)
[Blocking] Disable the specified device.
bool enabled(const std::string &name) const
[Blocking] Whether the specified device is enabled.
bool exist(const std::string &name) const
[Non-blocking] Whether the specified device already exists.
Main interface to control the robot, containing several function categories and background services.