23 measurements(measurements)
30 if (!read_measurements(reader)) {
49 if (!write_measurements(writer)) {
89 yarp().setOwner(*
this);
115 return obj !=
nullptr;
134 if (group == 0 && is_dirty) {
141 will_set_measurements();
143 mark_dirty_measurements();
145 did_set_measurements();
151 will_set_measurements();
152 obj->measurements[index] = elem;
153 mark_dirty_measurements();
155 did_set_measurements();
161 return obj->measurements;
202 writer.
writeString(
"send: 'help' or 'patch (param1 val1) (param2 val2)'");
217 if (!writer.
writeTag(
"many", 1, 0)) {
225 if (field ==
"measurements") {
229 if (!writer.
writeString(
"std::vector<SensorMeasurement> measurements")) {
242 bool have_act =
false;
243 if (tag !=
"patch") {
244 if (((len - 1) % 2) != 0) {
247 len = 1 + ((len - 1) / 2);
251 for (
int i = 1; i < len; ++i) {
265 if (key ==
"measurements") {
266 will_set_measurements();
267 if (!obj->nested_read_measurements(reader)) {
270 did_set_measurements();
298 if (is_dirty_measurements) {
308 if (!obj->nested_write_measurements(writer)) {
316 void SensorMeasurements::Editor::communicate()
321 if (
yarp().canWrite()) {
328 void SensorMeasurements::Editor::mark_dirty()
334 void SensorMeasurements::Editor::mark_dirty_measurements()
336 if (is_dirty_measurements) {
340 is_dirty_measurements =
true;
345 void SensorMeasurements::Editor::dirty_flags(
bool flag)
348 is_dirty_measurements = flag;
349 dirty_count = flag ? 1 : 0;
360 for (
size_t _i4 = 0; _i4 < _size0; ++_i4) {
395 for (
size_t _i10 = 0; _i10 < _size6; ++_i10) {
virtual bool will_set_measurements()
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
bool edit(SensorMeasurements &obj, bool dirty=true)
void set_measurements(const std::vector< SensorMeasurement > &measurements)
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
const std::vector< SensorMeasurement > & get_measurements() const
virtual bool did_set_measurements()
SensorMeasurements & state()
std::vector< SensorMeasurement > measurements
std::string toString() const
bool write(const yarp::os::idl::WireWriter &writer) const override
bool read(yarp::os::idl::WireReader &reader) override
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 readNested(WirePortable &obj)
bool readString(std::string &str, bool *is_vocab=nullptr)
void readListBegin(yarp::os::idl::WireState &nstate, std::uint32_t &len)
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 writeListBegin(int tag, std::uint32_t len) const
bool writeListEnd() const
bool writeString(const std::string &tag) const
bool writeNested(const WirePortable &obj) const
bool isValid()
Check if time is valid (non-zero).
The main, catch-all namespace for YARP.