28 const std::int32_t m_channels,
29 const std::int32_t m_depth,
30 const std::int32_t size) :
33 m_channels(m_channels),
42 if (!read_m_samples(reader)) {
45 if (!read_m_channels(reader)) {
48 if (!read_m_depth(reader)) {
51 if (!read_size(reader)) {
70 if (!write_m_samples(writer)) {
73 if (!write_m_channels(writer)) {
76 if (!write_m_depth(writer)) {
79 if (!write_size(writer)) {
119 yarp().setOwner(*
this);
145 return obj !=
nullptr;
164 if (group == 0 && is_dirty) {
171 will_set_m_samples();
173 mark_dirty_m_samples();
181 return obj->m_samples;
199 will_set_m_channels();
201 mark_dirty_m_channels();
203 did_set_m_channels();
209 return obj->m_channels;
229 mark_dirty_m_depth();
306 writer.
writeString(
"send: 'help' or 'patch (param1 val1) (param2 val2)'");
321 if (!writer.
writeTag(
"many", 1, 0)) {
329 if (field ==
"m_samples") {
333 if (!writer.
writeString(
"std::int32_t m_samples")) {
337 if (field ==
"m_channels") {
341 if (!writer.
writeString(
"std::int32_t m_channels")) {
345 if (field ==
"m_depth") {
353 if (field ==
"size") {
373 bool have_act =
false;
374 if (tag !=
"patch") {
375 if (((len - 1) % 2) != 0) {
378 len = 1 + ((len - 1) / 2);
382 for (
int i = 1; i < len; ++i) {
396 if (key ==
"m_samples") {
397 will_set_m_samples();
398 if (!obj->nested_read_m_samples(reader)) {
402 }
else if (key ==
"m_channels") {
403 will_set_m_channels();
404 if (!obj->nested_read_m_channels(reader)) {
407 did_set_m_channels();
408 }
else if (key ==
"m_depth") {
410 if (!obj->nested_read_m_depth(reader)) {
414 }
else if (key ==
"size") {
416 if (!obj->nested_read_size(reader)) {
447 if (is_dirty_m_samples) {
457 if (!obj->nested_write_m_samples(writer)) {
461 if (is_dirty_m_channels) {
471 if (!obj->nested_write_m_channels(writer)) {
475 if (is_dirty_m_depth) {
485 if (!obj->nested_write_m_depth(writer)) {
499 if (!obj->nested_write_size(writer)) {
507 void audioBufferSizeData::Editor::communicate()
512 if (
yarp().canWrite()) {
519 void audioBufferSizeData::Editor::mark_dirty()
525 void audioBufferSizeData::Editor::mark_dirty_m_samples()
527 if (is_dirty_m_samples) {
531 is_dirty_m_samples =
true;
536 void audioBufferSizeData::Editor::mark_dirty_m_channels()
538 if (is_dirty_m_channels) {
542 is_dirty_m_channels =
true;
547 void audioBufferSizeData::Editor::mark_dirty_m_depth()
549 if (is_dirty_m_depth) {
553 is_dirty_m_depth =
true;
558 void audioBufferSizeData::Editor::mark_dirty_size()
564 is_dirty_size =
true;
569 void audioBufferSizeData::Editor::dirty_flags(
bool flag)
572 is_dirty_m_samples = flag;
573 is_dirty_m_channels = flag;
574 is_dirty_m_depth = flag;
575 is_dirty_size = flag;
576 dirty_count = flag ? 4 : 0;
void set_m_channels(const std::int32_t m_channels)
std::int32_t get_size() const
virtual bool did_set_m_depth()
virtual bool did_set_m_channels()
void set_m_depth(const std::int32_t m_depth)
virtual bool will_set_m_samples()
void set_m_samples(const std::int32_t m_samples)
virtual bool will_set_m_channels()
void set_size(const std::int32_t size)
virtual bool did_set_size()
std::int32_t get_m_samples() const
std::int32_t get_m_depth() const
virtual bool will_set_m_depth()
virtual bool did_set_m_samples()
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
bool edit(audioBufferSizeData &obj, bool dirty=true)
virtual bool will_set_size()
std::int32_t get_m_channels() const
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
audioBufferSizeData & state()
bool write(const yarp::os::idl::WireWriter &writer) const override
bool read(yarp::os::idl::WireReader &reader) override
std::string toString() const
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)
bool readI32(std::int32_t &x)
IDL-friendly connection writer.
bool writeVocab32(yarp::conf::vocab32_t x) const
bool writeI32(std::int32_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.