31 const std::int32_t m_channels,
32 const std::int32_t m_depth,
33 const std::int32_t size) :
36 m_channels(m_channels),
45 if (!read_m_samples(reader)) {
48 if (!read_m_channels(reader)) {
51 if (!read_m_depth(reader)) {
54 if (!read_size(reader)) {
73 if (!write_m_samples(writer)) {
76 if (!write_m_channels(writer)) {
79 if (!write_m_depth(writer)) {
82 if (!write_size(writer)) {
122 yarp().setOwner(*
this);
148 return obj !=
nullptr;
167 if (group == 0 && is_dirty) {
174 will_set_m_samples();
176 mark_dirty_m_samples();
184 return obj->m_samples;
202 will_set_m_channels();
204 mark_dirty_m_channels();
206 did_set_m_channels();
212 return obj->m_channels;
232 mark_dirty_m_depth();
309 writer.
writeString(
"send: 'help' or 'patch (param1 val1) (param2 val2)'");
324 if (!writer.
writeTag(
"many", 1, 0)) {
332 if (field ==
"m_samples") {
336 if (!writer.
writeString(
"std::int32_t m_samples")) {
340 if (field ==
"m_channels") {
344 if (!writer.
writeString(
"std::int32_t m_channels")) {
348 if (field ==
"m_depth") {
356 if (field ==
"size") {
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 ==
"m_samples") {
400 will_set_m_samples();
401 if (!obj->nested_read_m_samples(reader)) {
405 }
else if (key ==
"m_channels") {
406 will_set_m_channels();
407 if (!obj->nested_read_m_channels(reader)) {
410 did_set_m_channels();
411 }
else if (key ==
"m_depth") {
413 if (!obj->nested_read_m_depth(reader)) {
417 }
else if (key ==
"size") {
419 if (!obj->nested_read_size(reader)) {
450 if (is_dirty_m_samples) {
460 if (!obj->nested_write_m_samples(writer)) {
464 if (is_dirty_m_channels) {
474 if (!obj->nested_write_m_channels(writer)) {
478 if (is_dirty_m_depth) {
488 if (!obj->nested_write_m_depth(writer)) {
502 if (!obj->nested_write_size(writer)) {
510 void audioBufferSizeData::Editor::communicate()
515 if (
yarp().canWrite()) {
522 void audioBufferSizeData::Editor::mark_dirty()
528 void audioBufferSizeData::Editor::mark_dirty_m_samples()
530 if (is_dirty_m_samples) {
534 is_dirty_m_samples =
true;
539 void audioBufferSizeData::Editor::mark_dirty_m_channels()
541 if (is_dirty_m_channels) {
545 is_dirty_m_channels =
true;
550 void audioBufferSizeData::Editor::mark_dirty_m_depth()
552 if (is_dirty_m_depth) {
556 is_dirty_m_depth =
true;
561 void audioBufferSizeData::Editor::mark_dirty_size()
567 is_dirty_size =
true;
572 void audioBufferSizeData::Editor::dirty_flags(
bool flag)
575 is_dirty_m_samples = flag;
576 is_dirty_m_channels = flag;
577 is_dirty_m_depth = flag;
578 is_dirty_size = flag;
579 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 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 writeVocab(std::int32_t x) const
bool isValid()
Check if time is valid (non-zero).
constexpr yarp::conf::vocab32_t createVocab(char a, char b=0, char c=0, char d=0)
The main, catch-all namespace for YARP.