72 static constexpr const char*
s_tag{
"setHWGain_RPC"};
76 static constexpr const char*
s_prototype{
"yarp::dev::ReturnValue IAudioGrabberMsgs::setHWGain_RPC(const double gain)"};
77 static constexpr const char*
s_help{
""};
135 static constexpr const char*
s_tag{
"setSWGain_RPC"};
139 static constexpr const char*
s_prototype{
"yarp::dev::ReturnValue IAudioGrabberMsgs::setSWGain_RPC(const double gain)"};
193 static constexpr const char*
s_tag{
"resetRecordingAudioBuffer_RPC"};
197 static constexpr const char*
s_prototype{
"yarp::dev::ReturnValue IAudioGrabberMsgs::resetRecordingAudioBuffer_RPC()"};
251 static constexpr const char*
s_tag{
"startRecording_RPC"};
255 static constexpr const char*
s_prototype{
"yarp::dev::ReturnValue IAudioGrabberMsgs::startRecording_RPC()"};
309 static constexpr const char*
s_tag{
"stopRecording_RPC"};
313 static constexpr const char*
s_prototype{
"yarp::dev::ReturnValue IAudioGrabberMsgs::stopRecording_RPC()"};
367 static constexpr const char*
s_tag{
"isRecording_RPC"};
371 static constexpr const char*
s_prototype{
"return_isRecording IAudioGrabberMsgs::isRecording_RPC()"};
432 static constexpr const char*
s_tag{
"getSound_RPC"};
436 static constexpr const char*
s_prototype{
"return_getSound IAudioGrabberMsgs::getSound_RPC(const size_t min_number_of_samples, const size_t max_number_of_samples, const double max_samples_timeout_s)"};
490 static constexpr const char*
s_tag{
"getRecordingAudioBufferMaxSize_RPC"};
494 static constexpr const char*
s_prototype{
"return_getRecordingAudioBufferMaxSize IAudioGrabberMsgs::getRecordingAudioBufferMaxSize_RPC()"};
548 static constexpr const char*
s_tag{
"getRecordingAudioBufferCurrentSize_RPC"};
552 static constexpr const char*
s_prototype{
"return_getRecordingAudioBufferCurrentSize IAudioGrabberMsgs::getRecordingAudioBufferCurrentSize_RPC()"};
583 return write(writer);
598 if (!writeTag(writer)) {
601 if (!writeArgs(writer)) {
625 if (!readTag(reader)) {
628 if (!readArgs(reader)) {
667 return write(writer);
679 if (!writer.
write(return_helper)) {
692 if (!reader.
read(return_helper)) {
731 return write(writer);
746 if (!writeTag(writer)) {
749 if (!writeArgs(writer)) {
773 if (!readTag(reader)) {
776 if (!readArgs(reader)) {
815 return write(writer);
827 if (!writer.
write(return_helper)) {
840 if (!reader.
read(return_helper)) {
869 return write(writer);
884 if (!writeTag(writer)) {
887 if (!writeArgs(writer)) {
908 if (!readTag(reader)) {
911 if (!readArgs(reader)) {
942 return write(writer);
954 if (!writer.
write(return_helper)) {
967 if (!reader.
read(return_helper)) {
996 return write(writer);
1006 return read(reader);
1011 if (!writeTag(writer)) {
1014 if (!writeArgs(writer)) {
1035 if (!readTag(reader)) {
1038 if (!readArgs(reader)) {
1069 return write(writer);
1075 return read(reader);
1081 if (!writer.
write(return_helper)) {
1094 if (!reader.
read(return_helper)) {
1123 return write(writer);
1133 return read(reader);
1138 if (!writeTag(writer)) {
1141 if (!writeArgs(writer)) {
1162 if (!readTag(reader)) {
1165 if (!readArgs(reader)) {
1196 return write(writer);
1202 return read(reader);
1208 if (!writer.
write(return_helper)) {
1221 if (!reader.
read(return_helper)) {
1250 return write(writer);
1260 return read(reader);
1265 if (!writeTag(writer)) {
1268 if (!writeArgs(writer)) {
1289 if (!readTag(reader)) {
1292 if (!readArgs(reader)) {
1323 return write(writer);
1329 return read(reader);
1338 if (!writer.
write(return_helper)) {
1354 if (!reader.
read(return_helper)) {
1368 cmd{min_number_of_samples, max_number_of_samples, max_samples_timeout_s}
1383 min_number_of_samples{min_number_of_samples},
1384 max_number_of_samples{max_number_of_samples},
1385 max_samples_timeout_s{max_samples_timeout_s}
1395 return write(writer);
1405 return read(reader);
1410 if (!writeTag(writer)) {
1413 if (!writeArgs(writer)) {
1429 if (!writer.
writeSizeT(min_number_of_samples)) {
1432 if (!writer.
writeSizeT(max_number_of_samples)) {
1443 if (!readTag(reader)) {
1446 if (!readArgs(reader)) {
1471 if (!reader.
readSizeT(min_number_of_samples)) {
1479 if (!reader.
readSizeT(max_number_of_samples)) {
1501 return write(writer);
1507 return read(reader);
1516 if (!writer.
write(return_helper)) {
1532 if (!reader.
read(return_helper)) {
1561 return write(writer);
1571 return read(reader);
1576 if (!writeTag(writer)) {
1579 if (!writeArgs(writer)) {
1600 if (!readTag(reader)) {
1603 if (!readArgs(reader)) {
1634 return write(writer);
1640 return read(reader);
1649 if (!writer.
write(return_helper)) {
1665 if (!reader.
read(return_helper)) {
1694 return write(writer);
1704 return read(reader);
1709 if (!writeTag(writer)) {
1712 if (!writeArgs(writer)) {
1733 if (!readTag(reader)) {
1736 if (!readArgs(reader)) {
1767 return write(writer);
1773 return read(reader);
1782 if (!writer.
write(return_helper)) {
1798 if (!reader.
read(return_helper)) {
1813 yarp().setOwner(*
this);
1818 if (!
yarp().canWrite()) {
1822 bool ok =
yarp().write(helper, helper);
1828 if (!
yarp().canWrite()) {
1832 bool ok =
yarp().write(helper, helper);
1838 if (!
yarp().canWrite()) {
1842 bool ok =
yarp().write(helper, helper);
1848 if (!
yarp().canWrite()) {
1852 bool ok =
yarp().write(helper, helper);
1858 if (!
yarp().canWrite()) {
1862 bool ok =
yarp().write(helper, helper);
1868 if (!
yarp().canWrite()) {
1872 bool ok =
yarp().write(helper, helper);
1878 if (!
yarp().canWrite()) {
1882 bool ok =
yarp().write(helper, helper);
1888 if (!
yarp().canWrite()) {
1892 bool ok =
yarp().write(helper, helper);
1898 if (!
yarp().canWrite()) {
1902 bool ok =
yarp().write(helper, helper);
1909 bool showAll = (functionName ==
"--all");
1910 std::vector<std::string> helpString;
1912 helpString.emplace_back(
"*** Available commands:");
1922 helpString.emplace_back(
"help");
1951 if (functionName ==
"help") {
1952 helpString.emplace_back(
"std::vector<std::string> help(const std::string& functionName = \"--all\")");
1953 helpString.emplace_back(
"Return list of available commands, or help message for a specific function");
1954 helpString.emplace_back(
"@param functionName name of command for which to get a detailed description. If none or '--all' is provided, print list of available commands");
1955 helpString.emplace_back(
"@return list of strings (one string per line)");
1958 if (helpString.empty()) {
1959 helpString.emplace_back(
"Command not found");
1967 constexpr size_t max_tag_len = 2;
1977 std::string tag = reader.
readTag(1);
1978 bool direct = (tag ==
"__direct__");
1982 while (tag_len <= max_tag_len && !reader.
isError()) {
2118 if (tag ==
"help") {
2119 std::string functionName;
2121 functionName =
"--all";
2123 auto help_strings = help(functionName);
2129 if (!writer.
writeTag(
"many", 1, 0)) {
2135 for (
const auto& help_string : help_strings) {
2151 std::string next_tag = reader.
readTag(1);
2152 if (next_tag.empty()) {
2155 tag.append(
"_").append(next_tag);
2156 tag_len = std::count(tag.begin(), tag.end(),
'_') + 1;
bool readTag(yarp::os::idl::WireReader &reader)
~Command() override=default
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
bool writeArgs(const yarp::os::idl::WireWriter &writer) const
bool writeTag(const yarp::os::idl::WireWriter &writer) const
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
bool readArgs(yarp::os::idl::WireReader &reader)
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
return_getRecordingAudioBufferCurrentSize return_helper
~Reply() override=default
static constexpr const char * s_prototype
static constexpr const char * s_tag
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
return_getRecordingAudioBufferCurrentSize(*)() funcptr_t
IAudioGrabberMsgs_getRecordingAudioBufferCurrentSize_RPC_helper()=default
static constexpr size_t s_tag_len
void call(IAudioGrabberMsgs *ptr)
static constexpr size_t s_cmd_len
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
static constexpr size_t s_reply_len
static constexpr const char * s_help
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
bool readTag(yarp::os::idl::WireReader &reader)
bool readArgs(yarp::os::idl::WireReader &reader)
bool writeArgs(const yarp::os::idl::WireWriter &writer) const
~Command() override=default
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
bool writeTag(const yarp::os::idl::WireWriter &writer) const
~Reply() override=default
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
return_getRecordingAudioBufferMaxSize return_helper
static constexpr const char * s_tag
void call(IAudioGrabberMsgs *ptr)
static constexpr const char * s_prototype
static constexpr const char * s_help
return_getRecordingAudioBufferMaxSize(*)() funcptr_t
static constexpr size_t s_tag_len
static constexpr size_t s_reply_len
IAudioGrabberMsgs_getRecordingAudioBufferMaxSize_RPC_helper()=default
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
static constexpr size_t s_cmd_len
size_t max_number_of_samples
double max_samples_timeout_s
size_t min_number_of_samples
bool readArgs(yarp::os::idl::WireReader &reader)
~Command() override=default
bool readTag(yarp::os::idl::WireReader &reader)
bool writeArgs(const yarp::os::idl::WireWriter &writer) const
bool writeTag(const yarp::os::idl::WireWriter &writer) const
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
~Reply() override=default
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
return_getSound return_helper
static constexpr const char * s_tag
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
static constexpr const char * s_prototype
return_getSound(*)(const size_t, const size_t, const double) funcptr_t
static constexpr size_t s_tag_len
void call(IAudioGrabberMsgs *ptr)
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
IAudioGrabberMsgs_getSound_RPC_helper()=default
static constexpr size_t s_cmd_len
static constexpr size_t s_reply_len
static constexpr const char * s_help
~Command() override=default
bool writeArgs(const yarp::os::idl::WireWriter &writer) const
bool writeTag(const yarp::os::idl::WireWriter &writer) const
bool readTag(yarp::os::idl::WireReader &reader)
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
bool readArgs(yarp::os::idl::WireReader &reader)
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
return_isRecording return_helper
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
~Reply() override=default
static constexpr const char * s_help
void call(IAudioGrabberMsgs *ptr)
static constexpr const char * s_tag
static constexpr const char * s_prototype
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
static constexpr size_t s_reply_len
return_isRecording(*)() funcptr_t
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
static constexpr size_t s_tag_len
static constexpr size_t s_cmd_len
IAudioGrabberMsgs_isRecording_RPC_helper()=default
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
bool writeArgs(const yarp::os::idl::WireWriter &writer) const
bool readTag(yarp::os::idl::WireReader &reader)
bool writeTag(const yarp::os::idl::WireWriter &writer) const
bool readArgs(yarp::os::idl::WireReader &reader)
~Command() override=default
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
yarp::dev::ReturnValue return_helper
~Reply() override=default
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
static constexpr const char * s_help
static constexpr size_t s_cmd_len
yarp::dev::ReturnValue(*)() funcptr_t
static constexpr const char * s_tag
static constexpr size_t s_reply_len
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
void call(IAudioGrabberMsgs *ptr)
IAudioGrabberMsgs_resetRecordingAudioBuffer_RPC_helper()=default
static constexpr const char * s_prototype
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
static constexpr size_t s_tag_len
~Command() override=default
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
bool writeTag(const yarp::os::idl::WireWriter &writer) const
bool readArgs(yarp::os::idl::WireReader &reader)
bool readTag(yarp::os::idl::WireReader &reader)
bool writeArgs(const yarp::os::idl::WireWriter &writer) const
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
yarp::dev::ReturnValue return_helper
~Reply() override=default
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
static constexpr size_t s_reply_len
static constexpr size_t s_tag_len
yarp::dev::ReturnValue(*)(const double) funcptr_t
IAudioGrabberMsgs_setHWGain_RPC_helper()=default
static constexpr const char * s_help
static constexpr const char * s_prototype
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
void call(IAudioGrabberMsgs *ptr)
static constexpr size_t s_cmd_len
static constexpr const char * s_tag
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
~Command() override=default
bool writeArgs(const yarp::os::idl::WireWriter &writer) const
bool readArgs(yarp::os::idl::WireReader &reader)
bool writeTag(const yarp::os::idl::WireWriter &writer) const
bool readTag(yarp::os::idl::WireReader &reader)
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
yarp::dev::ReturnValue return_helper
~Reply() override=default
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
yarp::dev::ReturnValue(*)(const double) funcptr_t
static constexpr size_t s_tag_len
static constexpr const char * s_help
static constexpr const char * s_prototype
static constexpr const char * s_tag
IAudioGrabberMsgs_setSWGain_RPC_helper()=default
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
void call(IAudioGrabberMsgs *ptr)
static constexpr size_t s_reply_len
static constexpr size_t s_cmd_len
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
bool readArgs(yarp::os::idl::WireReader &reader)
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
bool writeTag(const yarp::os::idl::WireWriter &writer) const
bool writeArgs(const yarp::os::idl::WireWriter &writer) const
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
~Command() override=default
bool readTag(yarp::os::idl::WireReader &reader)
~Reply() override=default
yarp::dev::ReturnValue return_helper
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
static constexpr const char * s_help
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
yarp::dev::ReturnValue(*)() funcptr_t
static constexpr const char * s_tag
static constexpr size_t s_cmd_len
static constexpr const char * s_prototype
void call(IAudioGrabberMsgs *ptr)
static constexpr size_t s_reply_len
static constexpr size_t s_tag_len
IAudioGrabberMsgs_startRecording_RPC_helper()=default
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
bool writeTag(const yarp::os::idl::WireWriter &writer) const
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
~Command() override=default
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
bool readArgs(yarp::os::idl::WireReader &reader)
bool writeArgs(const yarp::os::idl::WireWriter &writer) const
bool readTag(yarp::os::idl::WireReader &reader)
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
~Reply() override=default
yarp::dev::ReturnValue return_helper
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
static constexpr const char * s_tag
static constexpr const char * s_help
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
static constexpr size_t s_reply_len
yarp::dev::ReturnValue(*)() funcptr_t
void call(IAudioGrabberMsgs *ptr)
static constexpr const char * s_prototype
static constexpr size_t s_cmd_len
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
static constexpr size_t s_tag_len
IAudioGrabberMsgs_stopRecording_RPC_helper()=default
virtual return_isRecording isRecording_RPC()
virtual yarp::dev::ReturnValue setHWGain_RPC(const double gain)
virtual return_getRecordingAudioBufferMaxSize getRecordingAudioBufferMaxSize_RPC()
virtual std::vector< std::string > help(const std::string &functionName="--all")
virtual return_getRecordingAudioBufferCurrentSize getRecordingAudioBufferCurrentSize_RPC()
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
virtual return_getSound getSound_RPC(const size_t min_number_of_samples, const size_t max_number_of_samples, const double max_samples_timeout_s)
virtual yarp::dev::ReturnValue startRecording_RPC()
virtual yarp::dev::ReturnValue setSWGain_RPC(const double gain)
virtual yarp::dev::ReturnValue resetRecordingAudioBuffer_RPC()
virtual yarp::dev::ReturnValue stopRecording_RPC()
An interface for reading from a network connection.
An interface for writing to a network connection.
This is a base class for objects that can be both read from and be written to the YARP network.
A "tamed" Portable, that promises to serialize itself in an IDL-friendly way.
IDL-friendly connection reader.
bool readString(std::string &str, bool *is_vocab=nullptr)
std::string readTag(size_t len=static_cast< size_t >(-1))
bool read(WirePortable &obj)
bool readSizeT(std::size_t &x)
bool readFloat64(yarp::conf::float64_t &x)
IDL-friendly connection writer.
bool write(const WirePortable &obj) const
bool writeListHeader(int len) const
bool writeTag(const char *tag, int split, int len) const
bool writeFloat64(yarp::conf::float64_t x, bool skip_tag=false) const
bool writeString(const std::string &str, bool skip_tag=false) const
bool writeListEnd() const
bool writeListBegin(int tag, size_t len) const
bool writeSizeT(std::size_t x, bool skip_tag=false) const
The main, catch-all namespace for YARP.