Generic sendCommand methods
This release adds a support for generic sendCommand
methods. From now, there are two ways how to send a command. You can send it
-
with a string format
std::string commandFormat = "setmotor %d %d %d"; // No response is expected. controller.sendFormattedCommand(commandFormat, 20, 20, 5); // A string response is expected. std::string response = controller.sendFormattedCommand<std::string>(commandFormat, 20, 20, 5);
-
or with any value that can be written to a stream (parameters are separated by space).
// No response is expected. controller.sendCommand("setmotor", 20, 20, 5); // An integer response is expected. int response = controller.sendCommand<int>("setmotor", 20, 20, 5);