43 if (!writer.
writeString(
"getRemoteProtocolVersion")) {
57 if (!helper_proto.read(connection)) {
67 if(!
yarp().canWrite()) {
68 yError(
" Missing server method FrameTransformStorageSetRPC::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();
163 static constexpr const char*
s_tag{
"setTransformsRPC"};
167 static constexpr const char*
s_prototype{
"yarp::dev::ReturnValue FrameTransformStorageSetRPC::setTransformsRPC(const std::vector<yarp::math::FrameTransform>& transforms)"};
226 static constexpr const char*
s_tag{
"setTransformRPC"};
230 static constexpr const char*
s_prototype{
"yarp::dev::ReturnValue FrameTransformStorageSetRPC::setTransformRPC(const yarp::math::FrameTransform& transform)"};
290 static constexpr const char*
s_tag{
"deleteTransformRPC"};
294 static constexpr const char*
s_prototype{
"yarp::dev::ReturnValue FrameTransformStorageSetRPC::deleteTransformRPC(const std::string& src, const std::string& dst)"};
348 static constexpr const char*
s_tag{
"clearAllRPC"};
352 static constexpr const char*
s_prototype{
"yarp::dev::ReturnValue FrameTransformStorageSetRPC::clearAllRPC()"};
373 transforms{transforms}
383 return write(writer);
398 if (!writeTag(writer)) {
401 if (!writeArgs(writer)) {
420 for (
const auto& _item : transforms) {
433 if (!readTag(reader)) {
436 if (!readArgs(reader)) {
466 if constexpr (expected_tag != 0) {
467 if (_csize != 0 && _etype.
code != expected_tag) {
471 transforms.resize(_csize);
472 for (
size_t _i = 0; _i < _csize; ++_i) {
493 return write(writer);
505 if (!writer.
write(return_helper)) {
518 if (!reader.
read(return_helper)) {
557 return write(writer);
572 if (!writeTag(writer)) {
575 if (!writeArgs(writer)) {
599 if (!readTag(reader)) {
602 if (!readArgs(reader)) {
641 return write(writer);
653 if (!writer.
write(return_helper)) {
666 if (!reader.
read(return_helper)) {
706 return write(writer);
721 if (!writeTag(writer)) {
724 if (!writeArgs(writer)) {
751 if (!readTag(reader)) {
754 if (!readArgs(reader)) {
801 return write(writer);
813 if (!writer.
write(return_helper)) {
826 if (!reader.
read(return_helper)) {
855 return write(writer);
870 if (!writeTag(writer)) {
873 if (!writeArgs(writer)) {
894 if (!readTag(reader)) {
897 if (!readArgs(reader)) {
928 return write(writer);
940 if (!writer.
write(return_helper)) {
953 if (!reader.
read(return_helper)) {
968 yarp().setOwner(*
this);
973 if (!
yarp().canWrite()) {
977 bool ok =
yarp().write(helper, helper);
983 if (!
yarp().canWrite()) {
987 bool ok =
yarp().write(helper, helper);
993 if (!
yarp().canWrite()) {
997 bool ok =
yarp().write(helper, helper);
1003 if (!
yarp().canWrite()) {
1007 bool ok =
yarp().write(helper, helper);
1014 bool showAll = (functionName ==
"--all");
1015 std::vector<std::string> helpString;
1017 helpString.emplace_back(
"*** Available commands:");
1022 helpString.emplace_back(
"help");
1036 if (functionName ==
"help") {
1037 helpString.emplace_back(
"std::vector<std::string> help(const std::string& functionName = \"--all\")");
1038 helpString.emplace_back(
"Return list of available commands, or help message for a specific function");
1039 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");
1040 helpString.emplace_back(
"@return list of strings (one string per line)");
1043 if (helpString.empty()) {
1044 helpString.emplace_back(
"Command not found");
1052 constexpr size_t max_tag_len = 1;
1062 std::string tag = reader.
readTag(1);
1063 bool direct = (tag ==
"__direct__");
1067 while (tag_len <= max_tag_len && !reader.
isError()) {
1068 if(tag ==
"getRemoteProtocolVersion") {
1075 auto proto = getLocalProtocolVersion();
1081 if (!writer.
write(proto)) {
1148 if (tag ==
"help") {
1149 std::string functionName;
1151 functionName =
"--all";
1153 auto help_strings = help(functionName);
1159 if (!writer.
writeTag(
"many", 1, 0)) {
1165 for (
const auto& help_string : help_strings) {
1181 std::string next_tag = reader.
readTag(1);
1182 if (next_tag.empty()) {
1185 tag.append(
"_").append(next_tag);
1186 tag_len = std::count(tag.begin(), tag.end(),
'_') + 1;
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 readNested(WirePortable &obj)
bool readString(std::string &str, bool *is_vocab=nullptr)
void readListBegin(yarp::os::idl::WireState &nstate, size_t &len)
std::string readTag(size_t len=static_cast< size_t >(-1))
bool read(WirePortable &obj)
IDL-friendly connection writer.
bool write(const WirePortable &obj) const
bool writeListHeader(int len) const
bool writeTag(const char *tag, int split, int len) const
bool writeString(const std::string &str, bool skip_tag=false) const
bool writeListEnd() const
bool writeNested(const WirePortable &obj) 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