72 static constexpr const char*
s_tag{
"set_language"};
76 static constexpr const char*
s_prototype{
"return_set_language ISpeechSynthesizerMsgs::set_language(const std::string& language)"};
77 static constexpr const char*
s_help{
""};
130 static constexpr const char*
s_tag{
"get_language"};
134 static constexpr const char*
s_prototype{
"return_get_language ISpeechSynthesizerMsgs::get_language()"};
193 static constexpr const char*
s_tag{
"set_voice"};
197 static constexpr const char*
s_prototype{
"return_set_voice ISpeechSynthesizerMsgs::set_voice(const std::string& language)"};
251 static constexpr const char*
s_tag{
"get_voice"};
255 static constexpr const char*
s_prototype{
"return_get_voice ISpeechSynthesizerMsgs::get_voice()"};
314 static constexpr const char*
s_tag{
"set_speed"};
318 static constexpr const char*
s_prototype{
"return_set_speed ISpeechSynthesizerMsgs::set_speed(const double speed)"};
372 static constexpr const char*
s_tag{
"get_speed"};
376 static constexpr const char*
s_prototype{
"return_get_speed ISpeechSynthesizerMsgs::get_speed()"};
435 static constexpr const char*
s_tag{
"set_pitch"};
439 static constexpr const char*
s_prototype{
"return_set_pitch ISpeechSynthesizerMsgs::set_pitch(const double pitch)"};
493 static constexpr const char*
s_tag{
"get_pitch"};
497 static constexpr const char*
s_prototype{
"return_get_pitch ISpeechSynthesizerMsgs::get_pitch()"};
556 static constexpr const char*
s_tag{
"synthesize"};
560 static constexpr const char*
s_prototype{
"return_synthesize ISpeechSynthesizerMsgs::synthesize(const std::string& text)"};
591 return write(writer);
606 if (!writeTag(writer)) {
609 if (!writeArgs(writer)) {
633 if (!readTag(reader)) {
636 if (!readArgs(reader)) {
675 return write(writer);
690 if (!writer.
write(return_helper)) {
706 if (!reader.
read(return_helper)) {
735 return write(writer);
750 if (!writeTag(writer)) {
753 if (!writeArgs(writer)) {
774 if (!readTag(reader)) {
777 if (!readArgs(reader)) {
808 return write(writer);
823 if (!writer.
write(return_helper)) {
839 if (!reader.
read(return_helper)) {
878 return write(writer);
893 if (!writeTag(writer)) {
896 if (!writeArgs(writer)) {
920 if (!readTag(reader)) {
923 if (!readArgs(reader)) {
962 return write(writer);
977 if (!writer.
write(return_helper)) {
993 if (!reader.
read(return_helper)) {
1022 return write(writer);
1032 return read(reader);
1037 if (!writeTag(writer)) {
1040 if (!writeArgs(writer)) {
1061 if (!readTag(reader)) {
1064 if (!readArgs(reader)) {
1095 return write(writer);
1101 return read(reader);
1110 if (!writer.
write(return_helper)) {
1126 if (!reader.
read(return_helper)) {
1165 return write(writer);
1175 return read(reader);
1180 if (!writeTag(writer)) {
1183 if (!writeArgs(writer)) {
1207 if (!readTag(reader)) {
1210 if (!readArgs(reader)) {
1249 return write(writer);
1255 return read(reader);
1264 if (!writer.
write(return_helper)) {
1280 if (!reader.
read(return_helper)) {
1309 return write(writer);
1319 return read(reader);
1324 if (!writeTag(writer)) {
1327 if (!writeArgs(writer)) {
1348 if (!readTag(reader)) {
1351 if (!readArgs(reader)) {
1382 return write(writer);
1388 return read(reader);
1397 if (!writer.
write(return_helper)) {
1413 if (!reader.
read(return_helper)) {
1452 return write(writer);
1462 return read(reader);
1467 if (!writeTag(writer)) {
1470 if (!writeArgs(writer)) {
1494 if (!readTag(reader)) {
1497 if (!readArgs(reader)) {
1536 return write(writer);
1542 return read(reader);
1551 if (!writer.
write(return_helper)) {
1567 if (!reader.
read(return_helper)) {
1596 return write(writer);
1606 return read(reader);
1611 if (!writeTag(writer)) {
1614 if (!writeArgs(writer)) {
1635 if (!readTag(reader)) {
1638 if (!readArgs(reader)) {
1669 return write(writer);
1675 return read(reader);
1684 if (!writer.
write(return_helper)) {
1700 if (!reader.
read(return_helper)) {
1739 return write(writer);
1749 return read(reader);
1754 if (!writeTag(writer)) {
1757 if (!writeArgs(writer)) {
1781 if (!readTag(reader)) {
1784 if (!readArgs(reader)) {
1823 return write(writer);
1829 return read(reader);
1838 if (!writer.
write(return_helper)) {
1854 if (!reader.
read(return_helper)) {
1869 yarp().setOwner(*
this);
1874 if (!
yarp().canWrite()) {
1878 bool ok =
yarp().write(helper, helper);
1884 if (!
yarp().canWrite()) {
1888 bool ok =
yarp().write(helper, helper);
1894 if (!
yarp().canWrite()) {
1898 bool ok =
yarp().write(helper, helper);
1904 if (!
yarp().canWrite()) {
1908 bool ok =
yarp().write(helper, helper);
1914 if (!
yarp().canWrite()) {
1918 bool ok =
yarp().write(helper, helper);
1924 if (!
yarp().canWrite()) {
1928 bool ok =
yarp().write(helper, helper);
1934 if (!
yarp().canWrite()) {
1938 bool ok =
yarp().write(helper, helper);
1944 if (!
yarp().canWrite()) {
1948 bool ok =
yarp().write(helper, helper);
1954 if (!
yarp().canWrite()) {
1958 bool ok =
yarp().write(helper, helper);
1965 bool showAll = (functionName ==
"--all");
1966 std::vector<std::string> helpString;
1968 helpString.emplace_back(
"*** Available commands:");
1978 helpString.emplace_back(
"help");
2007 if (functionName ==
"help") {
2008 helpString.emplace_back(
"std::vector<std::string> help(const std::string& functionName = \"--all\")");
2009 helpString.emplace_back(
"Return list of available commands, or help message for a specific function");
2010 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");
2011 helpString.emplace_back(
"@return list of strings (one string per line)");
2014 if (helpString.empty()) {
2015 helpString.emplace_back(
"Command not found");
2023 constexpr size_t max_tag_len = 2;
2033 std::string tag = reader.
readTag(1);
2034 bool direct = (tag ==
"__direct__");
2038 while (tag_len <= max_tag_len && !reader.
isError()) {
2174 if (tag ==
"help") {
2175 std::string functionName;
2177 functionName =
"--all";
2179 auto help_strings = help(functionName);
2185 if (!writer.
writeTag(
"many", 1, 0)) {
2191 for (
const auto& help_string : help_strings) {
2207 std::string next_tag = reader.
readTag(1);
2208 if (next_tag.empty()) {
2211 tag.append(
"_").append(next_tag);
2212 tag_len = std::count(tag.begin(), tag.end(),
'_') + 1;
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.
bool readTag(yarp::os::idl::WireReader &reader)
~Command() override=default
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.
return_get_language return_helper
~Reply() override=default
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
ISpeechSynthesizerMsgs_get_language_helper()=default
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
static constexpr const char * s_prototype
static constexpr size_t s_cmd_len
static constexpr size_t s_tag_len
static constexpr const char * s_help
return_get_language(*)() funcptr_t
void call(ISpeechSynthesizerMsgs *ptr)
static constexpr const char * s_tag
static constexpr size_t s_reply_len
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 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 writeTag(const yarp::os::idl::WireWriter &writer) const
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
return_get_pitch return_helper
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
~Reply() override=default
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
void call(ISpeechSynthesizerMsgs *ptr)
static constexpr size_t s_tag_len
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.
static constexpr const char * s_help
return_get_pitch(*)() funcptr_t
static constexpr size_t s_cmd_len
static constexpr const char * s_prototype
ISpeechSynthesizerMsgs_get_pitch_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 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 readArgs(yarp::os::idl::WireReader &reader)
~Command() override=default
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
return_get_speed return_helper
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
static constexpr const char * s_prototype
ISpeechSynthesizerMsgs_get_speed_helper()=default
static constexpr size_t s_cmd_len
static constexpr size_t s_tag_len
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
void call(ISpeechSynthesizerMsgs *ptr)
static constexpr const char * s_tag
static constexpr const char * s_help
return_get_speed(*)() funcptr_t
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
static constexpr size_t s_reply_len
~Command() override=default
bool readArgs(yarp::os::idl::WireReader &reader)
bool readTag(yarp::os::idl::WireReader &reader)
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
bool writeTag(const yarp::os::idl::WireWriter &writer) const
bool writeArgs(const yarp::os::idl::WireWriter &writer) const
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
~Reply() override=default
return_get_voice 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 size_t s_cmd_len
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
ISpeechSynthesizerMsgs_get_voice_helper()=default
static constexpr size_t s_tag_len
static constexpr const char * s_tag
return_get_voice(*)() funcptr_t
static constexpr const char * s_prototype
void call(ISpeechSynthesizerMsgs *ptr)
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
static constexpr const char * s_help
static constexpr size_t s_reply_len
~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 write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
bool readArgs(yarp::os::idl::WireReader &reader)
bool writeTag(const yarp::os::idl::WireWriter &writer) const
bool readTag(yarp::os::idl::WireReader &reader)
return_set_language return_helper
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
static constexpr const char * s_help
static constexpr size_t s_tag_len
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
static constexpr const char * s_tag
static constexpr size_t s_cmd_len
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
ISpeechSynthesizerMsgs_set_language_helper()=default
static constexpr const char * s_prototype
static constexpr size_t s_reply_len
void call(ISpeechSynthesizerMsgs *ptr)
return_set_language(*)(const std::string &) funcptr_t
~Command() override=default
bool writeTag(const yarp::os::idl::WireWriter &writer) const
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
bool readArgs(yarp::os::idl::WireReader &reader)
bool readTag(yarp::os::idl::WireReader &reader)
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
bool writeArgs(const yarp::os::idl::WireWriter &writer) const
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
return_set_pitch return_helper
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
~Reply() override=default
static constexpr const char * s_tag
static constexpr const char * s_prototype
static constexpr size_t s_reply_len
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.
ISpeechSynthesizerMsgs_set_pitch_helper()=default
static constexpr size_t s_cmd_len
void call(ISpeechSynthesizerMsgs *ptr)
static constexpr size_t s_tag_len
return_set_pitch(*)(const double) funcptr_t
static constexpr const char * s_help
~Command() override=default
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 read(yarp::os::ConnectionReader &connection) override
Read this object from 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 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_set_speed return_helper
~Reply() override=default
ISpeechSynthesizerMsgs_set_speed_helper()=default
static constexpr const char * s_help
static constexpr const char * s_prototype
static constexpr size_t s_cmd_len
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
return_set_speed(*)(const double) 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.
static constexpr size_t s_tag_len
void call(ISpeechSynthesizerMsgs *ptr)
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.
~Command() override=default
bool writeTag(const yarp::os::idl::WireWriter &writer) const
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_set_voice return_helper
~Reply() override=default
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
return_set_voice(*)(const std::string &) funcptr_t
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
static constexpr const char * s_help
static constexpr const char * s_tag
static constexpr const char * s_prototype
ISpeechSynthesizerMsgs_set_voice_helper()=default
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
void call(ISpeechSynthesizerMsgs *ptr)
static constexpr size_t s_cmd_len
~Command() override=default
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 writeTag(const yarp::os::idl::WireWriter &writer) const
bool readTag(yarp::os::idl::WireReader &reader)
bool writeArgs(const yarp::os::idl::WireWriter &writer) const
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
return_synthesize return_helper
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.
static constexpr const char * s_help
static constexpr size_t s_reply_len
static constexpr const char * s_prototype
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
static constexpr const char * s_tag
return_synthesize(*)(const std::string &) funcptr_t
static constexpr size_t s_cmd_len
void call(ISpeechSynthesizerMsgs *ptr)
ISpeechSynthesizerMsgs_synthesize_helper()=default
static constexpr size_t s_tag_len
virtual return_set_speed set_speed(const double speed)
virtual return_get_speed get_speed()
virtual return_set_pitch set_pitch(const double pitch)
virtual return_set_voice set_voice(const std::string &language)
virtual return_synthesize synthesize(const std::string &text)
virtual std::vector< std::string > help(const std::string &functionName="--all")
virtual return_get_pitch get_pitch()
virtual return_get_language get_language()
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
virtual return_get_voice get_voice()
virtual return_set_language set_language(const std::string &language)
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 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
The main, catch-all namespace for YARP.