24 "yarp.carrier.portmonitor.depthimage_compression_zfp",
34 shouldCompress = (options.
find(
"sender_side").
asBool());
36 decompressed =
nullptr;
57 decompressed =
nullptr;
76 yCError(
ZFPMONITOR,
"Expected type ImageOf<PixelFloat> in sender side, but got wrong data type!");
83 yCError(
ZFPMONITOR,
"Expected type Bottle in receiver side, but got wrong data type!");
128 imageOut.
resize(width,height);
141 array=(
float*)
malloc(sizeToAllocate);
150 array=(
void*)
malloc(sizeToAllocateB);
bool setparam(const yarp::os::Property ¶ms) override
This will be called when the portmonitor carrier parameters are set via YARP admin port.
int decompress(float *array, float *&decompressed, int zfpsize, int nx, int ny, float tolerance)
int compress(float *array, float *&compressed, int &zfpsize, int nx, int ny, float tolerance)
bool getparam(yarp::os::Property ¶ms) override
This will be called when the portmonitor carrier parameters are requested via YARP admin port.
void resizeV(void *&array, int newSize)
void resizeF(float *&array, int newSize)
bool accept(yarp::os::Things &thing) override
This will be called when the data reach the portmonitor object.
void destroy() override
This will be called when the portmonitor object destroyes.
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.
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.
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.
A class for storing options and configuration information.
Value & find(const std::string &key) const override
Gets a value corresponding to a given keyword.
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 bool asBool() const
Get boolean value.
unsigned char * getRawImage() const
Access to the internal image buffer.
void resize(size_t imgWidth, size_t imgHeight)
Reallocate an image to be of a desired size, throwing away its current contents.
#define yCError(component,...)
#define YARP_LOG_COMPONENT(name,...)
An interface to the operating system, including Port based communication.