24 "yarp.carrier.portmonitor.bottle_zlib",
32void split(
const std::string& s,
char delim, std::vector<std::string>& elements)
34 std::istringstream
iss(s);
37 elements.push_back(
item);
44 std::vector<std::string> parameters;
48 for (std::string param : parameters)
60 std::string s = param.substr(
pointPosition + 1, param.length());
72 m_shouldCompress = (options.
find(
"sender_side").
asBool());
79 m_debug_compression_size =
m_user_params.check(
"debug_compression_info");
158 if (m_debug_compression_size)
192 if (m_debug_compression_size)
void getParamsFromCommandLine(std::string carrierString, yarp::os::Property &prop)
void split(const std::string &s, char delim, std::vector< std::string > &elements)
bool setparam(const yarp::os::Property ¶ms) override
This will be called when the portmonitor carrier parameters are set via YARP admin port.
int decompressData(const unsigned char *in, const size_t &in_size, unsigned char *out, size_t &out_size)
int compressData(const unsigned char *in, const size_t &in_size, unsigned char *out, size_t &out_size)
void destroy() override
This will be called when the portmonitor object destroyes.
bool getparam(yarp::os::Property ¶ms) override
This will be called when the portmonitor carrier parameters are requested via YARP admin port.
bool accept(yarp::os::Things &thing) override
This will be called when the data reach the portmonitor object.
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...
bool create(const yarp::os::Property &options) override
This will be called when the dll is properly loaded by the portmonitor carrier.
A simple collection of objects that can be described and transmitted in a portable way.
void add(const Value &value)
Add a Value to the bottle, at the end of the list.
Value & get(size_type index) const
Reads a Value v from a certain part of the list.
void clear()
Empties the bottle of any objects it contains.
void addInt32(std::int32_t x)
Places a 32-bit integer in the bottle, at the end of the list.
const char * toBinary(size_t *size=nullptr)
Returns binary representation of bottle.
void fromBinary(const char *buf, size_t len)
Initializes bottle from a binary representation.
A mini-server for performing network communication in the background.
static LogCallback printCallback()
Get current print callback.
static LogType minimumPrintLevel()
Get current minimum print level.
This is a base class for objects that can be both read from and be written to the YARP network.
static bool copyPortable(const PortWriter &writer, PortReader &reader)
Copy one portable to another, via writing and reading.
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.
yarp::os::PortWriter * getPortWriter()
void setPortWriter(yarp::os::PortWriter *writer)
Set the reference to a PortWriter object.
A single value (typically within a Bottle).
virtual bool asBool() const
Get boolean value.
virtual std::int32_t asInt32() const
Get 32-bit integer value.
virtual size_t asBlobLength() const
Get binary data length.
virtual const char * asBlob() const
Get binary data value.
virtual std::string asString() const
Get string value.
#define yCError(component,...)
#define yCDebug(component,...)
#define YARP_LOG_COMPONENT(name,...)
double now()
Return the current time in seconds, relative to an arbitrary starting point.
An interface to the operating system, including Port based communication.