YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
BottleZlibMonitorObject Class Reference

bottle_compression_zlib_portmonitor: Portmonitor plugin for compression and decompression of bottles (or yarp data types castable to bottle) using zlib library. More...

#include </home/runner/work/yarp-documentation/yarp-documentation/yarp/src/portmonitors/bottle_compression_zlib/BottleZlibPortmonitor.h>

+ Inheritance diagram for BottleZlibMonitorObject:

Public Member Functions

bool create (const yarp::os::Property &options) override
 This will be called when the dll is properly loaded by the portmonitor carrier.
 
void destroy () override
 This will be called when the portmonitor object destroyes.
 
bool setparam (const yarp::os::Property &params) override
 This will be called when the portmonitor carrier parameters are set via YARP admin port.
 
bool getparam (yarp::os::Property &params) 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::Thingsupdate (yarp::os::Things &thing) override
 After data get accpeted in the accept() callback, an instance of that is given to the update function where the data can be accessed and modified.
 
- Public Member Functions inherited from yarp::os::MonitorObject
virtual ~MonitorObject ()
 
virtual void trig ()
 This will be called when one of the peer connections to the same import port receives data.
 
virtual yarp::os::ThingsupdateReply (yarp::os::Things &thing)
 The updateReply makes it possible to modify a reply from a port when the portmonitor object is attached to a two-ways connection (e.g., RPC).
 

Protected Member Functions

int compressData (const unsigned char *in, const size_t &in_size, unsigned char *out, size_t &out_size)
 
int decompressData (const unsigned char *in, const size_t &in_size, unsigned char *out, size_t &out_size)
 

Detailed Description

bottle_compression_zlib_portmonitor: Portmonitor plugin for compression and decompression of bottles (or yarp data types castable to bottle) using zlib library.

Example usage: yarp connect /src /dest tcp+send.portmonitor+file.bottle_compression_zlib+recv.portmonitor+file.bottle_compression_zlib+type.dll yarp connect /src /dest tcp+send.portmonitor+file.bottle_compression_zlib+recv.portmonitor+file.bottle_compression_zlib+type.dll+debug_compression_info

Definition at line 22 of file BottleZlibPortmonitor.h.

Member Function Documentation

◆ accept()

bool BottleZlibMonitorObject::accept ( yarp::os::Things thing)
overridevirtual

This will be called when the data reach the portmonitor object.

Parameters
thingAn instance of yarp::os::Thing object which can be used to typecast the data to the correct type.
Returns
returning false will avoid delivering data to an input port or transmitting through the output port

Reimplemented from yarp::os::MonitorObject.

Definition at line 98 of file BottleZlibPortmonitor.cpp.

◆ compressData()

int BottleZlibMonitorObject::compressData ( const unsigned char in,
const size_t in_size,
unsigned char out,
size_t out_size 
)
protected

Definition at line 206 of file BottleZlibPortmonitor.cpp.

◆ create()

bool BottleZlibMonitorObject::create ( const yarp::os::Property options)
overridevirtual

This will be called when the dll is properly loaded by the portmonitor carrier.

Parameters
optionsA set of useful information of the current connection which the monitor object is attached.
Returns
Returning false will stop the portmonitor object to procced

Reimplemented from yarp::os::MonitorObject.

Definition at line 69 of file BottleZlibPortmonitor.cpp.

◆ decompressData()

int BottleZlibMonitorObject::decompressData ( const unsigned char in,
const size_t in_size,
unsigned char out,
size_t out_size 
)
protected

Definition at line 228 of file BottleZlibPortmonitor.cpp.

◆ destroy()

void BottleZlibMonitorObject::destroy ( void  )
overridevirtual

This will be called when the portmonitor object destroyes.

Reimplemented from yarp::os::MonitorObject.

Definition at line 84 of file BottleZlibPortmonitor.cpp.

◆ getparam()

bool BottleZlibMonitorObject::getparam ( yarp::os::Property params)
overridevirtual

This will be called when the portmonitor carrier parameters are requested via YARP admin port.

Parameters
paramsThe Property
Returns
Returns true of any parameter is available

Reimplemented from yarp::os::MonitorObject.

Definition at line 93 of file BottleZlibPortmonitor.cpp.

◆ setparam()

bool BottleZlibMonitorObject::setparam ( const yarp::os::Property params)
overridevirtual

This will be called when the portmonitor carrier parameters are set via YARP admin port.

Parameters
paramsThe Property
Returns
Returns true if parameters are correctly set

Reimplemented from yarp::os::MonitorObject.

Definition at line 88 of file BottleZlibPortmonitor.cpp.

◆ update()

yarp::os::Things & BottleZlibMonitorObject::update ( yarp::os::Things thing)
overridevirtual

After data get accpeted in the accept() callback, an instance of that is given to the update function where the data can be accessed and modified.

Parameters
thingAn instance of yarp::os::Thing object which can be used to typecast the data to the correct type.
Returns
An instance of modified data in form of Thing

Reimplemented from yarp::os::MonitorObject.

Definition at line 126 of file BottleZlibPortmonitor.cpp.


The documentation for this class was generated from the following files: