51bool RawValuesPublisherMetadata_getRemoteProtocolVersion_helper ::read(yarp::os::ConnectionReader & connection)
53 yarp::os::idl::WireReader reader(connection);
54 if (!reader.readListHeader()) {
59 if (!helper_proto.read(connection)) {
99 yarp::os::ApplicationNetworkProtocolVersion myproto;
103 myproto.protocol_version = 0;
104 myproto.yarp_major = YARP_VERSION_MAJOR;
105 myproto.yarp_minor = YARP_VERSION_MINOR;
106 myproto.yarp_patch = YARP_VERSION_PATCH;
349 constexpr size_t max_tag_len = 1;
352 yarp::os::idl::WireReader reader(connection);
353 reader.expectAccept();
354 if (!reader.readListHeader()) {
359 std::string tag = reader.readTag(1);
360 bool direct = (tag ==
"__direct__");
362 tag = reader.readTag(1);
364 while (tag_len <= max_tag_len && !reader.isError()) {
365 if(tag ==
"getRemoteProtocolVersion") {
366 if (!reader.noMore()) {
367 yError(
"Reader invalid protocol?! %s:%d - %s", __FILE__, __LINE__, __YFUNCTION__);
372 auto proto = getLocalProtocolVersion();
374 yarp::os::idl::WireWriter writer(reader);
375 if (!writer.writeListHeader(1)) {
376 yWarning(
"Writer invalid protocol?! %s:%d - %s", __FILE__, __LINE__, __YFUNCTION__);
378 if (!writer.write(proto)) {
379 yWarning(
"Writer invalid protocol?! %s:%d - %s", __FILE__, __LINE__, __YFUNCTION__);
393 yarp::os::idl::WireWriter writer(reader);
401 std::string functionName;
402 if (!reader.readString(functionName)) {
403 functionName =
"--all";
405 auto help_strings = help(functionName);
406 yarp::os::idl::WireWriter writer(reader);
407 if (!writer.isNull()) {
408 if (!writer.writeListHeader(2)) {
411 if (!writer.writeTag(
"many", 1, 0)) {
414 if (!writer.writeListBegin(0, help_strings.size())) {
417 for (
const auto& help_string : help_strings) {
418 if (!writer.writeString(help_string)) {
422 if (!writer.writeListEnd()) {
429 if (reader.noMore()) {
433 std::string next_tag = reader.readTag(1);
434 if (next_tag.empty()) {
437 tag.append(
"_").append(next_tag);
438 tag_len = std::count(tag.begin(), tag.end(),
'_') + 1;