6 #ifndef FLEXIV_RDK_DEVICE_HPP_
7 #define FLEXIV_RDK_DEVICE_HPP_
15 using DeviceParamDataTypes
16 = std::variant<int, double, std::string, std::vector<double>, std::vector<std::string>>;
37 std::vector<std::string>
list()
const;
44 bool exist(
const std::string& name)
const;
53 bool enabled(
const std::string& name)
const;
74 std::map<std::string, DeviceParamDataTypes>
params(
const std::string& name)
const;
83 void Enable(
const std::string& name);
106 const std::map<std::string, std::variant<bool, int, double>>& commands);
110 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.