43 if (!writer.
writeString(
"getRemoteProtocolVersion")) {
57 if (!helper_proto.read(connection)) {
67 if(!
yarp().canWrite()) {
68 yError(
" Missing server method FakeBatteryService::getRemoteProtocolVersion");
73 return helper.helper_proto;}
84 if (remproto.protocol_version != locproto.protocol_version)
86 yCError(SERVICE_LOG_COMPONENT) <<
"Invalid communication protocol.";
87 yCError(SERVICE_LOG_COMPONENT) <<
"Local Protocol Version: " << locproto.toString();
88 yCError(SERVICE_LOG_COMPONENT) <<
"Remote Protocol Version: " << remproto.toString();
161 static constexpr const char*
s_tag{
"setBatteryVoltage"};
165 static constexpr const char*
s_prototype{
"void FakeBatteryService::setBatteryVoltage(const double voltage)"};
222 static constexpr const char*
s_tag{
"setBatteryCurrent"};
226 static constexpr const char*
s_prototype{
"void FakeBatteryService::setBatteryCurrent(const double current)"};
283 static constexpr const char*
s_tag{
"setBatteryCharge"};
287 static constexpr const char*
s_prototype{
"void FakeBatteryService::setBatteryCharge(const double charge)"};
344 static constexpr const char*
s_tag{
"setBatteryStatus"};
348 static constexpr const char*
s_prototype{
"void FakeBatteryService::setBatteryStatus(const yarp::dev::IBattery::Battery_status status)"};
405 static constexpr const char*
s_tag{
"setBatteryInfo"};
409 static constexpr const char*
s_prototype{
"void FakeBatteryService::setBatteryInfo(const std::string& info)"};
466 static constexpr const char*
s_tag{
"setBatteryTemperature"};
470 static constexpr const char*
s_prototype{
"void FakeBatteryService::setBatteryTemperature(const double temperature)"};
524 static constexpr const char*
s_tag{
"getBatteryVoltage"};
528 static constexpr const char*
s_prototype{
"double FakeBatteryService::getBatteryVoltage()"};
582 static constexpr const char*
s_tag{
"getBatteryCurrent"};
586 static constexpr const char*
s_prototype{
"double FakeBatteryService::getBatteryCurrent()"};
640 static constexpr const char*
s_tag{
"getBatteryCharge"};
644 static constexpr const char*
s_prototype{
"double FakeBatteryService::getBatteryCharge()"};
698 static constexpr const char*
s_tag{
"getBatteryStatus"};
702 static constexpr const char*
s_prototype{
"yarp::dev::IBattery::Battery_status FakeBatteryService::getBatteryStatus()"};
756 static constexpr const char*
s_tag{
"getBatteryStatusString"};
760 static constexpr const char*
s_prototype{
"std::string FakeBatteryService::getBatteryStatusString()"};
814 static constexpr const char*
s_tag{
"getBatteryInfo"};
818 static constexpr const char*
s_prototype{
"std::string FakeBatteryService::getBatteryInfo()"};
872 static constexpr const char*
s_tag{
"getBatteryTemperature"};
876 static constexpr const char*
s_prototype{
"double FakeBatteryService::getBatteryTemperature()"};
907 return write(writer);
922 if (!writeTag(writer)) {
925 if (!writeArgs(writer)) {
949 if (!readTag(reader)) {
952 if (!readArgs(reader)) {
991 return write(writer);
1047 return write(writer);
1057 return read(reader);
1062 if (!writeTag(writer)) {
1065 if (!writeArgs(writer)) {
1089 if (!readTag(reader)) {
1092 if (!readArgs(reader)) {
1131 return write(writer);
1137 return read(reader);
1187 return write(writer);
1197 return read(reader);
1202 if (!writeTag(writer)) {
1205 if (!writeArgs(writer)) {
1229 if (!readTag(reader)) {
1232 if (!readArgs(reader)) {
1271 return write(writer);
1277 return read(reader);
1327 return write(writer);
1337 return read(reader);
1342 if (!writeTag(writer)) {
1345 if (!writeArgs(writer)) {
1369 if (!readTag(reader)) {
1372 if (!readArgs(reader)) {
1413 return write(writer);
1419 return read(reader);
1469 return write(writer);
1479 return read(reader);
1484 if (!writeTag(writer)) {
1487 if (!writeArgs(writer)) {
1511 if (!readTag(reader)) {
1514 if (!readArgs(reader)) {
1553 return write(writer);
1559 return read(reader);
1599 temperature{temperature}
1609 return write(writer);
1619 return read(reader);
1624 if (!writeTag(writer)) {
1627 if (!writeArgs(writer)) {
1651 if (!readTag(reader)) {
1654 if (!readArgs(reader)) {
1693 return write(writer);
1699 return read(reader);
1739 return write(writer);
1749 return read(reader);
1754 if (!writeTag(writer)) {
1757 if (!writeArgs(writer)) {
1778 if (!readTag(reader)) {
1781 if (!readArgs(reader)) {
1812 return write(writer);
1818 return read(reader);
1872 return write(writer);
1882 return read(reader);
1887 if (!writeTag(writer)) {
1890 if (!writeArgs(writer)) {
1911 if (!readTag(reader)) {
1914 if (!readArgs(reader)) {
1945 return write(writer);
1951 return read(reader);
2005 return write(writer);
2015 return read(reader);
2020 if (!writeTag(writer)) {
2023 if (!writeArgs(writer)) {
2044 if (!readTag(reader)) {
2047 if (!readArgs(reader)) {
2078 return write(writer);
2084 return read(reader);
2138 return write(writer);
2148 return read(reader);
2153 if (!writeTag(writer)) {
2156 if (!writeArgs(writer)) {
2177 if (!readTag(reader)) {
2180 if (!readArgs(reader)) {
2211 return write(writer);
2217 return read(reader);
2273 return write(writer);
2283 return read(reader);
2288 if (!writeTag(writer)) {
2291 if (!writeArgs(writer)) {
2312 if (!readTag(reader)) {
2315 if (!readArgs(reader)) {
2346 return write(writer);
2352 return read(reader);
2406 return write(writer);
2416 return read(reader);
2421 if (!writeTag(writer)) {
2424 if (!writeArgs(writer)) {
2445 if (!readTag(reader)) {
2448 if (!readArgs(reader)) {
2479 return write(writer);
2485 return read(reader);
2539 return write(writer);
2549 return read(reader);
2554 if (!writeTag(writer)) {
2557 if (!writeArgs(writer)) {
2578 if (!readTag(reader)) {
2581 if (!readArgs(reader)) {
2612 return write(writer);
2618 return read(reader);
2658 yarp().setOwner(*
this);
2663 if (!
yarp().canWrite()) {
2667 yarp().write(helper);
2672 if (!
yarp().canWrite()) {
2676 yarp().write(helper);
2681 if (!
yarp().canWrite()) {
2685 yarp().write(helper);
2690 if (!
yarp().canWrite()) {
2694 yarp().write(helper);
2699 if (!
yarp().canWrite()) {
2703 yarp().write(helper);
2708 if (!
yarp().canWrite()) {
2712 yarp().write(helper);
2717 if (!
yarp().canWrite()) {
2721 bool ok =
yarp().write(helper, helper);
2722 return ok ? helper.reply.return_helper :
double{};
2727 if (!
yarp().canWrite()) {
2731 bool ok =
yarp().write(helper, helper);
2732 return ok ? helper.reply.return_helper :
double{};
2737 if (!
yarp().canWrite()) {
2741 bool ok =
yarp().write(helper, helper);
2742 return ok ? helper.reply.return_helper :
double{};
2747 if (!
yarp().canWrite()) {
2751 bool ok =
yarp().write(helper, helper);
2757 if (!
yarp().canWrite()) {
2761 bool ok =
yarp().write(helper, helper);
2762 return ok ? helper.reply.return_helper : std::string{};
2767 if (!
yarp().canWrite()) {
2771 bool ok =
yarp().write(helper, helper);
2772 return ok ? helper.reply.return_helper : std::string{};
2777 if (!
yarp().canWrite()) {
2781 bool ok =
yarp().write(helper, helper);
2782 return ok ? helper.reply.return_helper :
double{};
2788 bool showAll = (functionName ==
"--all");
2789 std::vector<std::string> helpString;
2791 helpString.emplace_back(
"*** Available commands:");
2805 helpString.emplace_back(
"help");
2846 if (functionName ==
"help") {
2847 helpString.emplace_back(
"std::vector<std::string> help(const std::string& functionName = \"--all\")");
2848 helpString.emplace_back(
"Return list of available commands, or help message for a specific function");
2849 helpString.emplace_back(
"@param functionName name of command for which to get a detailed description. If none or '--all' is provided, print list of available commands");
2850 helpString.emplace_back(
"@return list of strings (one string per line)");
2853 if (helpString.empty()) {
2854 helpString.emplace_back(
"Command not found");
2862 constexpr size_t max_tag_len = 1;
2872 std::string tag = reader.
readTag(1);
2873 bool direct = (tag ==
"__direct__");
2877 while (tag_len <= max_tag_len && !reader.
isError()) {
2878 if(tag ==
"getRemoteProtocolVersion") {
2885 auto proto = getLocalProtocolVersion();
2891 if (!writer.
write(proto)) {
2905 yarp().callback(helper, *
this,
"__direct__");
2924 yarp().callback(helper, *
this,
"__direct__");
2943 yarp().callback(helper, *
this,
"__direct__");
2962 yarp().callback(helper, *
this,
"__direct__");
2981 yarp().callback(helper, *
this,
"__direct__");
3000 yarp().callback(helper, *
this,
"__direct__");
3117 if (tag ==
"help") {
3118 std::string functionName;
3120 functionName =
"--all";
3122 auto help_strings = help(functionName);
3128 if (!writer.
writeTag(
"many", 1, 0)) {
3134 for (
const auto& help_string : help_strings) {
3150 std::string next_tag = reader.
readTag(1);
3151 if (next_tag.empty()) {
3154 tag.append(
"_").append(next_tag);
3155 tag_len = std::count(tag.begin(), tag.end(),
'_') + 1;
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
bool writeArgs(const yarp::os::idl::WireWriter &writer) const
bool readArgs(yarp::os::idl::WireReader &reader)
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
~Command() override=default
bool readTag(yarp::os::idl::WireReader &reader)
bool writeTag(const yarp::os::idl::WireWriter &writer) const
~Reply() override=default
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
FakeBatteryService_getBatteryCharge_helper()=default
static constexpr const char * s_help
static constexpr size_t s_cmd_len
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
static constexpr size_t s_tag_len
static constexpr size_t s_reply_len
static constexpr const char * s_prototype
void call(FakeBatteryService *ptr)
static constexpr const char * s_tag
~Command() override=default
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
bool writeTag(const yarp::os::idl::WireWriter &writer) const
bool writeArgs(const yarp::os::idl::WireWriter &writer) const
bool readArgs(yarp::os::idl::WireReader &reader)
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
bool readTag(yarp::os::idl::WireReader &reader)
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
~Reply() override=default
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
FakeBatteryService_getBatteryCurrent_helper()=default
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
static constexpr const char * s_prototype
static constexpr const char * s_help
static constexpr size_t s_reply_len
static constexpr size_t s_tag_len
static constexpr size_t s_cmd_len
void call(FakeBatteryService *ptr)
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
static constexpr const char * s_tag
bool readTag(yarp::os::idl::WireReader &reader)
bool writeTag(const yarp::os::idl::WireWriter &writer) const
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
bool writeArgs(const yarp::os::idl::WireWriter &writer) const
~Command() override=default
bool readArgs(yarp::os::idl::WireReader &reader)
std::string return_helper
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
~Reply() override=default
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
static constexpr size_t s_reply_len
static constexpr const char * s_prototype
FakeBatteryService_getBatteryInfo_helper()=default
static constexpr const char * s_tag
static constexpr size_t s_tag_len
std::string(*)() funcptr_t
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
static constexpr size_t s_cmd_len
void call(FakeBatteryService *ptr)
static constexpr const char * s_help
bool writeTag(const yarp::os::idl::WireWriter &writer) const
bool readArgs(yarp::os::idl::WireReader &reader)
~Command() override=default
bool writeArgs(const yarp::os::idl::WireWriter &writer) const
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
bool readTag(yarp::os::idl::WireReader &reader)
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
~Reply() override=default
std::string return_helper
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
void call(FakeBatteryService *ptr)
static constexpr size_t s_reply_len
static constexpr size_t s_cmd_len
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
static constexpr const char * s_prototype
std::string(*)() funcptr_t
FakeBatteryService_getBatteryStatusString_helper()=default
static constexpr const char * s_tag
static constexpr size_t s_tag_len
static constexpr const char * s_help
bool readTag(yarp::os::idl::WireReader &reader)
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
bool writeTag(const yarp::os::idl::WireWriter &writer) const
bool readArgs(yarp::os::idl::WireReader &reader)
~Command() override=default
bool writeArgs(const yarp::os::idl::WireWriter &writer) const
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
yarp::dev::IBattery::Battery_status return_helper
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
~Reply() override=default
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
static constexpr const char * s_prototype
FakeBatteryService_getBatteryStatus_helper()=default
static constexpr size_t s_tag_len
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
static constexpr const char * s_help
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
static constexpr size_t s_reply_len
yarp::dev::IBattery::Battery_status(*)() funcptr_t
static constexpr const char * s_tag
void call(FakeBatteryService *ptr)
static constexpr size_t s_cmd_len
bool readArgs(yarp::os::idl::WireReader &reader)
bool writeArgs(const yarp::os::idl::WireWriter &writer) const
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
~Command() override=default
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
bool writeTag(const yarp::os::idl::WireWriter &writer) const
bool readTag(yarp::os::idl::WireReader &reader)
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
~Reply() override=default
void call(FakeBatteryService *ptr)
static constexpr const char * s_prototype
static constexpr const char * s_help
static constexpr const char * s_tag
static constexpr size_t s_cmd_len
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
static constexpr size_t s_reply_len
FakeBatteryService_getBatteryTemperature_helper()=default
static constexpr size_t s_tag_len
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
bool writeArgs(const yarp::os::idl::WireWriter &writer) const
~Command() override=default
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
bool writeTag(const yarp::os::idl::WireWriter &writer) const
bool readTag(yarp::os::idl::WireReader &reader)
bool readArgs(yarp::os::idl::WireReader &reader)
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
~Reply() override=default
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
FakeBatteryService_getBatteryVoltage_helper()=default
static constexpr const char * s_help
static constexpr const char * s_tag
static constexpr const char * s_prototype
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
static constexpr size_t s_tag_len
static constexpr size_t s_reply_len
static constexpr size_t s_cmd_len
void call(FakeBatteryService *ptr)
FakeBatteryService_getRemoteProtocolVersion_helper()=default
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
yarp::os::ApplicationNetworkProtocolVersion helper_proto
bool readArgs(yarp::os::idl::WireReader &reader)
bool writeArgs(const yarp::os::idl::WireWriter &writer) const
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
bool readTag(yarp::os::idl::WireReader &reader)
bool writeTag(const yarp::os::idl::WireWriter &writer) const
~Command() override=default
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
~Reply() override=default
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
static constexpr size_t s_reply_len
static constexpr size_t s_tag_len
void call(FakeBatteryService *ptr) const
static constexpr const char * s_prototype
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
FakeBatteryService_setBatteryCharge_helper()=default
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
void(*)(const double) funcptr_t
static constexpr const char * s_tag
static constexpr const char * s_help
static constexpr size_t s_cmd_len
bool writeArgs(const yarp::os::idl::WireWriter &writer) const
~Command() override=default
bool readTag(yarp::os::idl::WireReader &reader)
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
bool readArgs(yarp::os::idl::WireReader &reader)
bool writeTag(const yarp::os::idl::WireWriter &writer) const
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
~Reply() override=default
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
static constexpr const char * s_prototype
void call(FakeBatteryService *ptr) const
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
static constexpr const char * s_help
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
static constexpr size_t s_cmd_len
void(*)(const double) funcptr_t
FakeBatteryService_setBatteryCurrent_helper()=default
static constexpr size_t s_reply_len
static constexpr size_t s_tag_len
static constexpr const char * s_tag
bool writeTag(const yarp::os::idl::WireWriter &writer) const
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
bool readArgs(yarp::os::idl::WireReader &reader)
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
bool readTag(yarp::os::idl::WireReader &reader)
~Command() override=default
bool writeArgs(const yarp::os::idl::WireWriter &writer) const
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
~Reply() override=default
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
static constexpr const char * s_prototype
void(*)(const std::string &) funcptr_t
void call(FakeBatteryService *ptr) const
static constexpr size_t s_reply_len
static constexpr const char * s_tag
static constexpr const char * s_help
FakeBatteryService_setBatteryInfo_helper()=default
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
static constexpr size_t s_tag_len
static constexpr size_t s_cmd_len
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
bool writeTag(const yarp::os::idl::WireWriter &writer) const
bool readArgs(yarp::os::idl::WireReader &reader)
yarp::dev::IBattery::Battery_status status
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
bool readTag(yarp::os::idl::WireReader &reader)
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
~Command() override=default
bool writeArgs(const yarp::os::idl::WireWriter &writer) const
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
~Reply() override=default
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
static constexpr const char * s_help
static constexpr size_t s_tag_len
static constexpr size_t s_cmd_len
FakeBatteryService_setBatteryStatus_helper()=default
void call(FakeBatteryService *ptr) const
static constexpr const char * s_prototype
static constexpr size_t s_reply_len
static constexpr const char * s_tag
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
void(*)(const yarp::dev::IBattery::Battery_status) funcptr_t
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
bool writeTag(const yarp::os::idl::WireWriter &writer) const
bool readTag(yarp::os::idl::WireReader &reader)
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
bool writeArgs(const yarp::os::idl::WireWriter &writer) const
~Command() override=default
bool readArgs(yarp::os::idl::WireReader &reader)
~Reply() override=default
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
static constexpr const char * s_prototype
static constexpr const char * s_help
void(*)(const double) funcptr_t
void call(FakeBatteryService *ptr) const
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
static constexpr const char * s_tag
static constexpr size_t s_reply_len
FakeBatteryService_setBatteryTemperature_helper()=default
static constexpr size_t s_tag_len
static constexpr size_t s_cmd_len
bool readTag(yarp::os::idl::WireReader &reader)
bool readArgs(yarp::os::idl::WireReader &reader)
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
bool writeTag(const yarp::os::idl::WireWriter &writer) const
bool writeArgs(const yarp::os::idl::WireWriter &writer) const
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
~Command() override=default
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
~Reply() override=default
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
static constexpr const char * s_help
static constexpr const char * s_prototype
void call(FakeBatteryService *ptr) const
FakeBatteryService_setBatteryVoltage_helper()=default
static constexpr size_t s_cmd_len
void(*)(const double) funcptr_t
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
static constexpr size_t s_tag_len
static constexpr const char * s_tag
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
static constexpr size_t s_reply_len
virtual std::string getBatteryInfo()
virtual void setBatteryStatus(const yarp::dev::IBattery::Battery_status status)
virtual double getBatteryVoltage()
virtual void setBatteryInfo(const std::string &info)
virtual bool checkProtocolVersion()
virtual void setBatteryTemperature(const double temperature)
virtual double getBatteryCharge()
virtual yarp::dev::IBattery::Battery_status getBatteryStatus()
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
virtual void setBatteryCharge(const double charge)
virtual yarp::os::ApplicationNetworkProtocolVersion getLocalProtocolVersion()
virtual std::string getBatteryStatusString()
virtual yarp::os::ApplicationNetworkProtocolVersion getRemoteProtocolVersion()
virtual void setBatteryVoltage(const double voltage)
virtual double getBatteryCurrent()
virtual std::vector< std::string > help(const std::string &functionName="--all")
virtual void setBatteryCurrent(const double current)
virtual double getBatteryTemperature()
short int protocol_version
An interface for reading from a network connection.
An interface for writing to a network connection.
This is a base class for objects that can be both read from and be written to the YARP network.
bool write(PortWriter &writer)
Write a message to the associated port or reader.
yarp::os::WireLink & yarp()
Get YARP state associated with this object.
A "tamed" Portable, that promises to serialize itself in an IDL-friendly way.
IDL-friendly connection reader.
bool readVocab32(yarp::conf::vocab32_t &x)
bool readString(std::string &str, bool *is_vocab=nullptr)
std::string readTag(size_t len=static_cast< size_t >(-1))
bool readFloat64(yarp::conf::float64_t &x)
IDL-friendly connection writer.
bool writeVocab32(yarp::conf::vocab32_t x, bool skip_tag=false) const
bool write(const WirePortable &obj) const
bool writeListHeader(int len) const
bool writeTag(const char *tag, int split, int len) const
bool writeFloat64(yarp::conf::float64_t x, bool skip_tag=false) const
bool writeOnewayResponse() const
bool writeString(const std::string &str, bool skip_tag=false) const
bool writeListEnd() const
bool writeListBegin(int tag, size_t len) const
#define yCError(component,...)
#define YARP_LOG_COMPONENT(name,...)
The main, catch-all namespace for YARP.
#define YARP_VERSION_PATCH
#define YARP_VERSION_MAJOR
#define YARP_VERSION_MINOR