18 additionalMetadata(
"")
24 const std::string& frameName,
25 const std::string& additionalMetadata) :
29 additionalMetadata(additionalMetadata)
36 if (!read_name(reader)) {
39 if (!read_frameName(reader)) {
42 if (!read_additionalMetadata(reader)) {
61 if (!write_name(writer)) {
64 if (!write_frameName(writer)) {
67 if (!write_additionalMetadata(writer)) {
107 yarp().setOwner(*
this);
133 return obj !=
nullptr;
152 if (group == 0 && is_dirty) {
187 will_set_frameName();
189 mark_dirty_frameName();
197 return obj->frameName;
215 will_set_additionalMetadata();
217 mark_dirty_additionalMetadata();
219 did_set_additionalMetadata();
225 return obj->additionalMetadata;
266 writer.
writeString(
"send: 'help' or 'patch (param1 val1) (param2 val2)'");
281 if (!writer.
writeTag(
"many", 1, 0)) {
289 if (field ==
"name") {
297 if (field ==
"frameName") {
301 if (!writer.
writeString(
"std::string frameName")) {
305 if (field ==
"additionalMetadata") {
309 if (!writer.
writeString(
"std::string additionalMetadata")) {
324 bool have_act =
false;
325 if (tag !=
"patch") {
326 if (((len - 1) % 2) != 0) {
329 len = 1 + ((len - 1) / 2);
333 for (
int i = 1; i < len; ++i) {
349 if (!obj->nested_read_name(reader)) {
353 }
else if (key ==
"frameName") {
354 will_set_frameName();
355 if (!obj->nested_read_frameName(reader)) {
359 }
else if (key ==
"additionalMetadata") {
360 will_set_additionalMetadata();
361 if (!obj->nested_read_additionalMetadata(reader)) {
364 did_set_additionalMetadata();
402 if (!obj->nested_write_name(writer)) {
406 if (is_dirty_frameName) {
416 if (!obj->nested_write_frameName(writer)) {
420 if (is_dirty_additionalMetadata) {
430 if (!obj->nested_write_additionalMetadata(writer)) {
438 void SensorMetadata::Editor::communicate()
443 if (
yarp().canWrite()) {
450 void SensorMetadata::Editor::mark_dirty()
456 void SensorMetadata::Editor::mark_dirty_name()
462 is_dirty_name =
true;
467 void SensorMetadata::Editor::mark_dirty_frameName()
469 if (is_dirty_frameName) {
473 is_dirty_frameName =
true;
478 void SensorMetadata::Editor::mark_dirty_additionalMetadata()
480 if (is_dirty_additionalMetadata) {
484 is_dirty_additionalMetadata =
true;
489 void SensorMetadata::Editor::dirty_flags(
bool flag)
492 is_dirty_name = flag;
493 is_dirty_frameName = flag;
494 is_dirty_additionalMetadata = flag;
495 dirty_count = flag ? 3 : 0;
A simple collection of objects that can be described and transmitted in a portable way.
bool read(ConnectionReader &reader) override
Set the bottle's value based on input from a network connection.
std::string toString() const override
Gives a human-readable textual representation of the bottle.
An interface for reading from a network connection.
An interface for writing to a network connection.
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 readString(std::string &str, bool *is_vocab=nullptr)
IDL-friendly connection writer.
bool writeVocab32(yarp::conf::vocab32_t x) const
bool writeListHeader(int len) const
bool writeTag(const char *tag, int split, int len) const
bool writeString(const std::string &tag) const
bool isValid()
Check if time is valid (non-zero).
The main, catch-all namespace for YARP.