66 using funcptr_t = bool (*)(
const std::vector<yarp::math::FrameTransform>&);
72 static constexpr const char*
s_tag{
"setTransformsRPC"};
76 static constexpr const char*
s_prototype{
"bool 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{
"bool FrameTransformStorageSetRPC::setTransformRPC(const yarp::math::FrameTransform& transform)"};
193 using funcptr_t = bool (*)(
const std::string&,
const std::string&);
199 static constexpr const char*
s_tag{
"deleteTransformRPC"};
203 static constexpr const char*
s_prototype{
"bool 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{
"bool 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);
433 if (!reader.
readBool(return_helper)) {
472 return write(writer);
487 if (!writeTag(writer)) {
490 if (!writeArgs(writer)) {
514 if (!readTag(reader)) {
517 if (!readArgs(reader)) {
556 return write(writer);
587 if (!reader.
readBool(return_helper)) {
627 return write(writer);
642 if (!writeTag(writer)) {
645 if (!writeArgs(writer)) {
672 if (!readTag(reader)) {
675 if (!readArgs(reader)) {
722 return write(writer);
753 if (!reader.
readBool(return_helper)) {
782 return write(writer);
797 if (!writeTag(writer)) {
800 if (!writeArgs(writer)) {
821 if (!readTag(reader)) {
824 if (!readArgs(reader)) {
855 return write(writer);
886 if (!reader.
readBool(return_helper)) {
901 yarp().setOwner(*
this);
906 if (!
yarp().canWrite()) {
910 bool ok =
yarp().write(helper, helper);
911 return ok ? helper.reply.return_helper :
bool{};
916 if (!
yarp().canWrite()) {
920 bool ok =
yarp().write(helper, helper);
921 return ok ? helper.reply.return_helper :
bool{};
926 if (!
yarp().canWrite()) {
930 bool ok =
yarp().write(helper, helper);
931 return ok ? helper.reply.return_helper :
bool{};
936 if (!
yarp().canWrite()) {
940 bool ok =
yarp().write(helper, helper);
941 return ok ? helper.reply.return_helper :
bool{};
947 bool showAll = (functionName ==
"--all");
948 std::vector<std::string> helpString;
950 helpString.emplace_back(
"*** Available commands:");
955 helpString.emplace_back(
"help");
969 if (functionName ==
"help") {
970 helpString.emplace_back(
"std::vector<std::string> help(const std::string& functionName = \"--all\")");
971 helpString.emplace_back(
"Return list of available commands, or help message for a specific function");
972 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");
973 helpString.emplace_back(
"@return list of strings (one string per line)");
976 if (helpString.empty()) {
977 helpString.emplace_back(
"Command not found");
985 constexpr size_t max_tag_len = 1;
995 std::string tag = reader.
readTag(1);
996 bool direct = (tag ==
"__direct__");
1000 while (tag_len <= max_tag_len && !reader.
isError()) {
1061 if (tag ==
"help") {
1062 std::string functionName;
1064 functionName =
"--all";
1066 auto help_strings = help(functionName);
1072 if (!writer.
writeTag(
"many", 1, 0)) {
1078 for (
const auto& help_string : help_strings) {
1094 std::string next_tag = reader.
readTag(1);
1095 if (next_tag.empty()) {
1098 tag.append(
"_").append(next_tag);
1099 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))
IDL-friendly connection writer.
bool writeBool(bool x, bool skip_tag=false) 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.