31 m_transforms{transforms}
42 if (!writer.
writeTag(
"setTransformsRPC", 1, 1)) {
88 m_transform{transform}
99 if (!writer.
writeTag(
"setTransformRPC", 1, 1)) {
150 if (!writer.
writeTag(
"deleteTransformRPC", 1, 1)) {
199 if (!writer.
writeTag(
"clearAllRPC", 1, 1)) {
227 if (!
yarp().canWrite()) {
228 yError(
"Missing server method '%s'?",
"bool FrameTransformStorageSetRPC::setTransformsRPC(const std::vector<yarp::math::FrameTransform>& transforms)");
237 if (!
yarp().canWrite()) {
238 yError(
"Missing server method '%s'?",
"bool FrameTransformStorageSetRPC::setTransformRPC(const yarp::math::FrameTransform& transform)");
247 if (!
yarp().canWrite()) {
248 yError(
"Missing server method '%s'?",
"bool FrameTransformStorageSetRPC::deleteTransformRPC(const std::string& src, const std::string& dst)");
257 if (!
yarp().canWrite()) {
258 yError(
"Missing server method '%s'?",
"bool FrameTransformStorageSetRPC::clearAllRPC()");
267 bool showAll = (functionName ==
"--all");
268 std::vector<std::string> helpString;
270 helpString.emplace_back(
"*** Available commands:");
271 helpString.emplace_back(
"setTransformsRPC");
272 helpString.emplace_back(
"setTransformRPC");
273 helpString.emplace_back(
"deleteTransformRPC");
274 helpString.emplace_back(
"clearAllRPC");
275 helpString.emplace_back(
"help");
277 if (functionName ==
"setTransformsRPC") {
278 helpString.emplace_back(
"bool setTransformsRPC(const std::vector<yarp::math::FrameTransform>& transforms) ");
280 if (functionName ==
"setTransformRPC") {
281 helpString.emplace_back(
"bool setTransformRPC(const yarp::math::FrameTransform& transform) ");
283 if (functionName ==
"deleteTransformRPC") {
284 helpString.emplace_back(
"bool deleteTransformRPC(const std::string& src, const std::string& dst) ");
286 if (functionName ==
"clearAllRPC") {
287 helpString.emplace_back(
"bool clearAllRPC() ");
289 if (functionName ==
"help") {
290 helpString.emplace_back(
"std::vector<std::string> help(const std::string& functionName = \"--all\")");
291 helpString.emplace_back(
"Return list of available commands, or help message for a specific function");
292 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");
293 helpString.emplace_back(
"@return list of strings (one string per line)");
296 if (helpString.empty()) {
297 helpString.emplace_back(
"Command not found");
312 std::string tag = reader.
readTag();
313 bool direct = (tag ==
"__direct__");
318 if (tag ==
"setTransformsRPC") {
319 std::vector<yarp::math::FrameTransform> transforms;
324 transforms.resize(_size13);
325 for (
size_t _i17 = 0; _i17 < _size13; ++_i17) {
345 if (tag ==
"setTransformRPC") {
347 if (!reader.
read(transform)) {
364 if (tag ==
"deleteTransformRPC") {
388 if (tag ==
"clearAllRPC") {
403 std::string functionName;
405 functionName =
"--all";
407 auto help_strings =
help(functionName);
413 if (!writer.
writeTag(
"many", 1, 0)) {
419 for (
const auto& help_string : help_strings) {
435 std::string next_tag = reader.
readTag();
436 if (next_tag ==
"") {
439 tag.append(
"_").append(next_tag);
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.
bool setOwner(yarp::os::PortReader &owner)
Set the owner of this WireLink.
yarp::os::WireLink & yarp()
Get YARP state associated with this object.
IDL-friendly connection reader.
bool readNested(WirePortable &obj)
bool readString(std::string &str, bool *is_vocab=nullptr)
void readListBegin(yarp::os::idl::WireState &nstate, std::uint32_t &len)
bool read(WirePortable &obj)
IDL-friendly connection writer.
bool write(const WirePortable &obj) const
bool writeBool(bool x) const
bool writeListHeader(int len) const
bool writeTag(const char *tag, int split, int len) const
bool writeListBegin(int tag, std::uint32_t len) const
bool writeListEnd() const
bool writeString(const std::string &tag) const
bool writeNested(const WirePortable &obj) const