|
YARP
Yet Another Robot Platform
|
|
Go to the documentation of this file.
45 if (!read_map_id(reader)) {
48 if (!read_x(reader)) {
51 if (!read_y(reader)) {
54 if (!read_theta(reader)) {
73 if (!write_map_id(writer)) {
76 if (!write_x(writer)) {
79 if (!write_y(writer)) {
82 if (!write_theta(writer)) {
122 yarp().setOwner(*
this);
148 return obj !=
nullptr;
167 if (group == 0 && is_dirty) {
309 writer.
writeString(
"send: 'help' or 'patch (param1 val1) (param2 val2)'");
324 if (!writer.
writeTag(
"many", 1, 0)) {
332 if (field ==
"map_id") {
356 if (field ==
"theta") {
376 bool have_act =
false;
377 if (tag !=
"patch") {
378 if (((len - 1) % 2) != 0) {
381 len = 1 + ((len - 1) / 2);
385 for (
int i = 1; i < len; ++i) {
399 if (key ==
"map_id") {
401 if (!obj->nested_read_map_id(reader)) {
405 }
else if (key ==
"x") {
407 if (!obj->nested_read_x(reader)) {
411 }
else if (key ==
"y") {
413 if (!obj->nested_read_y(reader)) {
417 }
else if (key ==
"theta") {
419 if (!obj->nested_read_theta(reader)) {
450 if (is_dirty_map_id) {
460 if (!obj->nested_write_map_id(writer)) {
474 if (!obj->nested_write_x(writer)) {
488 if (!obj->nested_write_y(writer)) {
492 if (is_dirty_theta) {
502 if (!obj->nested_write_theta(writer)) {
510 void Map2DLocationData::Editor::communicate()
515 if (
yarp().canWrite()) {
522 void Map2DLocationData::Editor::mark_dirty()
528 void Map2DLocationData::Editor::mark_dirty_map_id()
530 if (is_dirty_map_id) {
534 is_dirty_map_id =
true;
539 void Map2DLocationData::Editor::mark_dirty_x()
550 void Map2DLocationData::Editor::mark_dirty_y()
561 void Map2DLocationData::Editor::mark_dirty_theta()
563 if (is_dirty_theta) {
567 is_dirty_theta =
true;
572 void Map2DLocationData::Editor::dirty_flags(
bool flag)
575 is_dirty_map_id = flag;
578 is_dirty_theta = flag;
579 dirty_count = flag ? 4 : 0;
A simple collection of objects that can be described and transmitted in a portable way.
Map2DLocationData & state()
bool edit(Map2DLocationData &obj, bool dirty=true)
virtual bool will_set_theta()
std::string toString() const override
Gives a human-readable textual representation of the bottle.
bool readString(std::string &str, bool *is_vocab=nullptr)
constexpr yarp::conf::vocab32_t createVocab(char a, char b=0, char c=0, char d=0)
virtual bool did_set_theta()
bool read(yarp::os::idl::WireReader &reader) override
bool writeFloat64(yarp::conf::float64_t x) const
bool setOwner(yarp::os::PortReader &owner)
Set the owner of this WireLink.
virtual bool will_set_x()
bool isValid()
Check if time is valid (non-zero).
bool write(const yarp::os::idl::WireWriter &writer) const override
bool writeString(const std::string &tag) const
bool writeListHeader(int len) const
IDL-friendly connection writer.
void set_x(const double x)
std::string toString() const
An interface for writing to a network connection.
const std::string & get_map_id() const
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
virtual bool did_set_map_id()
bool writeTag(const char *tag, int split, int len) const
IDL-friendly connection reader.
An interface for reading from a network connection.
void set_map_id(const std::string &map_id)
yarp::os::WireLink & yarp()
Get YARP state associated with this object.
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
bool writeVocab(std::int32_t x) const
void set_theta(const double theta)
void set_y(const double y)
The main, catch-all namespace for YARP.
bool read(ConnectionReader &reader) override
Set the bottle's value based on input from a network connection.
virtual bool will_set_map_id()
bool readFloat64(yarp::conf::float64_t &x)
virtual bool will_set_y()