72 static constexpr const char*
s_tag{
"setTransformsRPC"};
76 static constexpr const char*
s_prototype{
"yarp::dev::ReturnValue FrameTransformStorageSetRPC::setTransformsRPC(const std::vector<yarp::math::FrameTransform>& transforms)"};
77 static constexpr const char*
s_help{
""};
135 static constexpr const char*
s_tag{
"setTransformRPC"};
139 static constexpr const char*
s_prototype{
"yarp::dev::ReturnValue FrameTransformStorageSetRPC::setTransformRPC(const yarp::math::FrameTransform& transform)"};
199 static constexpr const char*
s_tag{
"deleteTransformRPC"};
203 static constexpr const char*
s_prototype{
"yarp::dev::ReturnValue FrameTransformStorageSetRPC::deleteTransformRPC(const std::string& src, const std::string& dst)"};
257 static constexpr const char*
s_tag{
"clearAllRPC"};
261 static constexpr const char*
s_prototype{
"yarp::dev::ReturnValue FrameTransformStorageSetRPC::clearAllRPC()"};
282 transforms{transforms}
292 return write(writer);
307 if (!writeTag(writer)) {
310 if (!writeArgs(writer)) {
329 for (
const auto& _item : transforms) {
342 if (!readTag(reader)) {
345 if (!readArgs(reader)) {
375 if constexpr (expected_tag != 0) {
376 if (_csize != 0 && _etype.
code != expected_tag) {
380 transforms.resize(_csize);
381 for (
size_t _i = 0; _i < _csize; ++_i) {
402 return write(writer);
414 if (!writer.
write(return_helper)) {
427 if (!reader.
read(return_helper)) {
466 return write(writer);
481 if (!writeTag(writer)) {
484 if (!writeArgs(writer)) {
508 if (!readTag(reader)) {
511 if (!readArgs(reader)) {
550 return write(writer);
562 if (!writer.
write(return_helper)) {
575 if (!reader.
read(return_helper)) {
615 return write(writer);
630 if (!writeTag(writer)) {
633 if (!writeArgs(writer)) {
660 if (!readTag(reader)) {
663 if (!readArgs(reader)) {
710 return write(writer);
722 if (!writer.
write(return_helper)) {
735 if (!reader.
read(return_helper)) {
764 return write(writer);
779 if (!writeTag(writer)) {
782 if (!writeArgs(writer)) {
803 if (!readTag(reader)) {
806 if (!readArgs(reader)) {
837 return write(writer);
849 if (!writer.
write(return_helper)) {
862 if (!reader.
read(return_helper)) {
877 yarp().setOwner(*
this);
882 if (!
yarp().canWrite()) {
886 bool ok =
yarp().write(helper, helper);
892 if (!
yarp().canWrite()) {
896 bool ok =
yarp().write(helper, helper);
902 if (!
yarp().canWrite()) {
906 bool ok =
yarp().write(helper, helper);
912 if (!
yarp().canWrite()) {
916 bool ok =
yarp().write(helper, helper);
923 bool showAll = (functionName ==
"--all");
924 std::vector<std::string> helpString;
926 helpString.emplace_back(
"*** Available commands:");
931 helpString.emplace_back(
"help");
945 if (functionName ==
"help") {
946 helpString.emplace_back(
"std::vector<std::string> help(const std::string& functionName = \"--all\")");
947 helpString.emplace_back(
"Return list of available commands, or help message for a specific function");
948 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");
949 helpString.emplace_back(
"@return list of strings (one string per line)");
952 if (helpString.empty()) {
953 helpString.emplace_back(
"Command not found");
961 constexpr size_t max_tag_len = 1;
971 std::string tag = reader.
readTag(1);
972 bool direct = (tag ==
"__direct__");
976 while (tag_len <= max_tag_len && !reader.
isError()) {
1037 if (tag ==
"help") {
1038 std::string functionName;
1040 functionName =
"--all";
1042 auto help_strings = help(functionName);
1048 if (!writer.
writeTag(
"many", 1, 0)) {
1054 for (
const auto& help_string : help_strings) {
1070 std::string next_tag = reader.
readTag(1);
1071 if (next_tag.empty()) {
1074 tag.append(
"_").append(next_tag);
1075 tag_len = std::count(tag.begin(), tag.end(),
'_') + 1;
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.
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
The main, catch-all namespace for YARP.