17 std::istringstream
iss(s);
20 elements.push_back(
item);
28 std::vector<std::string> parameters;
32 for (std::string param : parameters)
44 std::string s = param.substr(
pointPosition + 1, param.length());
57 (options.
find(
"sender_side").
asBool()) ?
"sender side" :
"receiver side");
89 if (m_output_freq < 0)
93 else if (m_output_freq == 0)
113 m_output_freq = params.
find(
"frequency").
asInt32();
119 params.
put(
"channel", m_channel);
120 params.
put(
"frequency", m_output_freq);
bool create(const yarp::os::Property &options) override
This will be called when the dll is properly loaded by the portmonitor carrier.
yarp::os::Things & update(yarp::os::Things &thing) override
After data get accpeted in the accept() callback, an instance of that is given to the update function...
void getParamsFromCommandLine(std::string carrierString, yarp::os::Property &prop)
void destroy() override
This will be called when the portmonitor object destroyes.
bool accept(yarp::os::Things &thing) override
This will be called when the data reach the portmonitor object.
void trig() override
This will be called when one of the peer connections to the same import port receives data.
bool getparam(yarp::os::Property ¶ms) override
This will be called when the portmonitor carrier parameters are requested via YARP admin port.
bool setparam(const yarp::os::Property ¶ms) override
This will be called when the portmonitor carrier parameters are set via YARP admin port.
A mini-server for performing network communication in the background.
A class for storing options and configuration information.
Value & find(const std::string &key) const override
Gets a value corresponding to a given keyword.
std::string toString() const override
Return a standard text representation of the content of the object.
void put(const std::string &key, const std::string &value)
Associate the given key with the given string.
Base class for generic things.
void setPortWriter(yarp::os::PortWriter *writer)
Set the reference to a PortWriter object.
A single value (typically within a Bottle).
virtual std::int8_t asInt8() const
Get 8-bit integer value.
virtual bool asBool() const
Get boolean value.
virtual std::int32_t asInt32() const
Get 32-bit integer value.
virtual std::string asString() const
Get string value.
Class for storing sounds See Audio in YARP for additional documentation on YARP audio.
Sound extractChannelAsSound(size_t channel_id) const
Extract a single channel from the sound.
void amplify(double gain)
amplify a sound
void clear()
set all the samples to zero (silence)
#define yCInfo(component,...)
#define yCError(component,...)
#define yCWarning(component,...)
#define yCDebug(component,...)
#define YARP_LOG_COMPONENT(name,...)
An interface to the operating system, including Port based communication.
bool resample(yarp::sig::Sound &snd, size_t frequency)
Resample a sound.