44 if (!writer.
writeString(
"getRemoteProtocolVersion")) {
58 if (!helper_proto.read(connection)) {
68 if(!
yarp().canWrite()) {
69 yError(
" Missing server method FakeBatteryService::getRemoteProtocolVersion");
74 return helper.helper_proto;}
85 if (remproto.protocol_version != locproto.protocol_version)
87 yCError(SERVICE_LOG_COMPONENT) <<
"Invalid communication protocol.";
88 yCError(SERVICE_LOG_COMPONENT) <<
"Local Protocol Version: " << locproto.toString();
89 yCError(SERVICE_LOG_COMPONENT) <<
"Remote Protocol Version: " << remproto.toString();
162 static constexpr const char*
s_tag{
"setBatteryVoltage"};
166 static constexpr const char*
s_prototype{
"void FakeBatteryService::setBatteryVoltage(const double voltage)"};
223 static constexpr const char*
s_tag{
"setBatteryCurrent"};
227 static constexpr const char*
s_prototype{
"void FakeBatteryService::setBatteryCurrent(const double current)"};
284 static constexpr const char*
s_tag{
"setBatteryCharge"};
288 static constexpr const char*
s_prototype{
"void FakeBatteryService::setBatteryCharge(const double charge)"};
345 static constexpr const char*
s_tag{
"setBatteryStatus"};
349 static constexpr const char*
s_prototype{
"void FakeBatteryService::setBatteryStatus(const yarp::dev::IBattery::Battery_status status)"};
406 static constexpr const char*
s_tag{
"setBatteryInfo"};
410 static constexpr const char*
s_prototype{
"void FakeBatteryService::setBatteryInfo(const std::string& info)"};
467 static constexpr const char*
s_tag{
"setBatteryTemperature"};
471 static constexpr const char*
s_prototype{
"void FakeBatteryService::setBatteryTemperature(const double temperature)"};
525 static constexpr const char*
s_tag{
"getBatteryVoltage"};
529 static constexpr const char*
s_prototype{
"double FakeBatteryService::getBatteryVoltage()"};
583 static constexpr const char*
s_tag{
"getBatteryCurrent"};
587 static constexpr const char*
s_prototype{
"double FakeBatteryService::getBatteryCurrent()"};
641 static constexpr const char*
s_tag{
"getBatteryCharge"};
645 static constexpr const char*
s_prototype{
"double FakeBatteryService::getBatteryCharge()"};
699 static constexpr const char*
s_tag{
"getBatteryStatus"};
703 static constexpr const char*
s_prototype{
"yarp::dev::IBattery::Battery_status FakeBatteryService::getBatteryStatus()"};
757 static constexpr const char*
s_tag{
"getBatteryStatusString"};
761 static constexpr const char*
s_prototype{
"std::string FakeBatteryService::getBatteryStatusString()"};
815 static constexpr const char*
s_tag{
"getBatteryInfo"};
819 static constexpr const char*
s_prototype{
"std::string FakeBatteryService::getBatteryInfo()"};
873 static constexpr const char*
s_tag{
"getBatteryTemperature"};
877 static constexpr const char*
s_prototype{
"double FakeBatteryService::getBatteryTemperature()"};
908 return write(writer);
923 if (!writeTag(writer)) {
926 if (!writeArgs(writer)) {
950 if (!readTag(reader)) {
953 if (!readArgs(reader)) {
992 return write(writer);
1048 return write(writer);
1058 return read(reader);
1063 if (!writeTag(writer)) {
1066 if (!writeArgs(writer)) {
1090 if (!readTag(reader)) {
1093 if (!readArgs(reader)) {
1132 return write(writer);
1138 return read(reader);
1188 return write(writer);
1198 return read(reader);
1203 if (!writeTag(writer)) {
1206 if (!writeArgs(writer)) {
1230 if (!readTag(reader)) {
1233 if (!readArgs(reader)) {
1272 return write(writer);
1278 return read(reader);
1328 return write(writer);
1338 return read(reader);
1343 if (!writeTag(writer)) {
1346 if (!writeArgs(writer)) {
1370 if (!readTag(reader)) {
1373 if (!readArgs(reader)) {
1414 return write(writer);
1420 return read(reader);
1470 return write(writer);
1480 return read(reader);
1485 if (!writeTag(writer)) {
1488 if (!writeArgs(writer)) {
1512 if (!readTag(reader)) {
1515 if (!readArgs(reader)) {
1554 return write(writer);
1560 return read(reader);
1600 temperature{temperature}
1610 return write(writer);
1620 return read(reader);
1625 if (!writeTag(writer)) {
1628 if (!writeArgs(writer)) {
1652 if (!readTag(reader)) {
1655 if (!readArgs(reader)) {
1694 return write(writer);
1700 return read(reader);
1740 return write(writer);
1750 return read(reader);
1755 if (!writeTag(writer)) {
1758 if (!writeArgs(writer)) {
1779 if (!readTag(reader)) {
1782 if (!readArgs(reader)) {
1813 return write(writer);
1819 return read(reader);
1873 return write(writer);
1883 return read(reader);
1888 if (!writeTag(writer)) {
1891 if (!writeArgs(writer)) {
1912 if (!readTag(reader)) {
1915 if (!readArgs(reader)) {
1946 return write(writer);
1952 return read(reader);
2006 return write(writer);
2016 return read(reader);
2021 if (!writeTag(writer)) {
2024 if (!writeArgs(writer)) {
2045 if (!readTag(reader)) {
2048 if (!readArgs(reader)) {
2079 return write(writer);
2085 return read(reader);
2139 return write(writer);
2149 return read(reader);
2154 if (!writeTag(writer)) {
2157 if (!writeArgs(writer)) {
2178 if (!readTag(reader)) {
2181 if (!readArgs(reader)) {
2212 return write(writer);
2218 return read(reader);
2274 return write(writer);
2284 return read(reader);
2289 if (!writeTag(writer)) {
2292 if (!writeArgs(writer)) {
2313 if (!readTag(reader)) {
2316 if (!readArgs(reader)) {
2347 return write(writer);
2353 return read(reader);
2407 return write(writer);
2417 return read(reader);
2422 if (!writeTag(writer)) {
2425 if (!writeArgs(writer)) {
2446 if (!readTag(reader)) {
2449 if (!readArgs(reader)) {
2480 return write(writer);
2486 return read(reader);
2540 return write(writer);
2550 return read(reader);
2555 if (!writeTag(writer)) {
2558 if (!writeArgs(writer)) {
2579 if (!readTag(reader)) {
2582 if (!readArgs(reader)) {
2613 return write(writer);
2619 return read(reader);
2659 yarp().setOwner(*
this);
2664 if (!
yarp().canWrite()) {
2668 yarp().write(helper);
2673 if (!
yarp().canWrite()) {
2677 yarp().write(helper);
2682 if (!
yarp().canWrite()) {
2686 yarp().write(helper);
2691 if (!
yarp().canWrite()) {
2695 yarp().write(helper);
2700 if (!
yarp().canWrite()) {
2704 yarp().write(helper);
2709 if (!
yarp().canWrite()) {
2713 yarp().write(helper);
2718 if (!
yarp().canWrite()) {
2722 bool ok =
yarp().write(helper, helper);
2723 return ok ? helper.reply.return_helper :
double{};
2728 if (!
yarp().canWrite()) {
2732 bool ok =
yarp().write(helper, helper);
2733 return ok ? helper.reply.return_helper :
double{};
2738 if (!
yarp().canWrite()) {
2742 bool ok =
yarp().write(helper, helper);
2743 return ok ? helper.reply.return_helper :
double{};
2748 if (!
yarp().canWrite()) {
2752 bool ok =
yarp().write(helper, helper);
2758 if (!
yarp().canWrite()) {
2762 bool ok =
yarp().write(helper, helper);
2763 return ok ? helper.reply.return_helper : std::string{};
2768 if (!
yarp().canWrite()) {
2772 bool ok =
yarp().write(helper, helper);
2773 return ok ? helper.reply.return_helper : std::string{};
2778 if (!
yarp().canWrite()) {
2782 bool ok =
yarp().write(helper, helper);
2783 return ok ? helper.reply.return_helper :
double{};
2789 bool showAll = (functionName ==
"--all");
2790 std::vector<std::string> helpString;
2792 helpString.emplace_back(
"*** Available commands:");
2806 helpString.emplace_back(
"help");
2847 if (functionName ==
"help") {
2848 helpString.emplace_back(
"std::vector<std::string> help(const std::string& functionName = \"--all\")");
2849 helpString.emplace_back(
"Return list of available commands, or help message for a specific function");
2850 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");
2851 helpString.emplace_back(
"@return list of strings (one string per line)");
2854 if (helpString.empty()) {
2855 helpString.emplace_back(
"Command not found");
2863 constexpr size_t max_tag_len = 1;
2873 std::string tag = reader.
readTag(1);
2874 bool direct = (tag ==
"__direct__");
2878 while (tag_len <= max_tag_len && !reader.
isError()) {
2879 if(tag ==
"getRemoteProtocolVersion") {
2886 auto proto = getLocalProtocolVersion();
2892 if (!writer.
write(proto)) {
2906 yarp().callback(helper, *
this,
"__direct__");
2925 yarp().callback(helper, *
this,
"__direct__");
2944 yarp().callback(helper, *
this,
"__direct__");
2963 yarp().callback(helper, *
this,
"__direct__");
2982 yarp().callback(helper, *
this,
"__direct__");
3001 yarp().callback(helper, *
this,
"__direct__");
3118 if (tag ==
"help") {
3119 std::string functionName;
3121 functionName =
"--all";
3123 auto help_strings = help(functionName);
3129 if (!writer.
writeTag(
"many", 1, 0)) {
3135 for (
const auto& help_string : help_strings) {
3151 std::string next_tag = reader.
readTag(1);
3152 if (next_tag.empty()) {
3155 tag.append(
"_").append(next_tag);
3156 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