|
YARP
Yet Another Robot Platform
|
|
Go to the documentation of this file.
9 #ifndef BAYERCARRIER_INC
10 #define BAYERCARRIER_INC
38 size_t image_data_len, consumed;
47 bool bayer_method_set;
56 bool setFormat(
const char *fmt);
72 bayer_method_set(false),
80 if (local)
delete local;
92 return "bayer_carrier";
105 std::string
expectText(
const char terminatingChar =
'\n')
override {
150 if (image_data_len) {
153 return sizeof(header)+image_data_len;
185 return parent->
isError()||!happy;
A dummy connection to test yarp::os::Portable implementations.
yarp::os::Bytes readEnvelope() override
Read a message envelope, if available.
yarp::conf::float64_t expectFloat64() override
Read a 64-bit floating point number from the network connection.
virtual bool processBuffered() const
virtual Bytes readEnvelope()
Read a message envelope, if available.
This is a base class for objects that can be both read from and be written to the YARP network.
A base class for nested structures that can be searched.
virtual const Searchable & getConnectionModifiers() const =0
Access modifiers associated with the connection, if any.
bool pushInt(int x) override
Store an integer to return on the next call to expectInt()
yarp::os::Contact getRemoteContact() const override
Gets information about who is supplying the data being read, if that information is available.
void requestDrop() override
Tag the connection to be dropped after the current message.
std::int32_t expectInt32() override
Read a 32-bit integer from the network connection.
A starter class for implementing simple modifying carriers.
bool isError() const override
yarp::os::Portable * getReference() const override
Get a direct pointer to the object being sent, if possible.
bool isActive() const override
virtual std::int8_t expectInt8()=0
Read a 8-bit integer from the network connection.
yarp::conf::float32_t expectFloat32() override
Read a 32-bit floating point number from the network connection.
bool expectBlock(char *data, size_t len) override
Read a block of data from the network connection.
bool isTextMode() const override
Check if the connection is text mode.
bool isValid() const override
virtual yarp::conf::float64_t expectFloat64()=0
Read a 64-bit floating point number from the network connection.
std::string expectText(const char terminatingChar='\n') override
Read some text from the network connection.
bool convertTextMode() override
Reads in a standard description in text mode, and converts it to a standard description in binary.
Carrier * create() const override
Factory method.
std::int16_t expectInt16() override
Read a 16-bit integer from the network connection.
virtual std::int32_t expectInt32()=0
Read a 32-bit integer from the network connection.
virtual std::int64_t expectInt64()=0
Read a 64-bit integer from the network connection.
void setParent(yarp::os::ConnectionReader &reader)
An interface for writing to a network connection.
virtual bool isError() const =0
bool isBareMode() const override
Check if the connection is bare mode.
yarp::os::ConnectionReader & modifyIncomingData(yarp::os::ConnectionReader &reader) override
Modify incoming payload data, if appropriate.
static ConnectionReader * createConnectionReader(InputStream &is)
Create an instance of YARP's standard connection reader implementation.
void close() override
Terminate the stream.
virtual bool processDirect(yarp::os::Bytes &bytes)
virtual ConnectionWriter * getWriter()=0
Gets a way to reply to the message, if possible.
yarp::os::ConnectionWriter * getWriter() override
Gets a way to reply to the message, if possible.
bool setSize(size_t len) override
A simple abstraction for a block of bytes.
std::string toString() const override
Get name of carrier.
virtual bool debayerFull(yarp::sig::ImageOf< yarp::sig::PixelMono > &src, yarp::sig::ImageOf< yarp::sig::PixelRgb > &dest)
std::string getName() const override
Get the name of this connection type ("tcp", "mcast", "shmem", ...)
virtual bool isActive() const =0
virtual bool debayerHalf(yarp::sig::ImageOf< yarp::sig::PixelMono > &src, yarp::sig::ImageOf< yarp::sig::PixelRgb > &dest)
An interface for reading from a network connection.
yarp::os::Contact getLocalContact() const override
Gets information about who is receiving the data, if that information is available.
virtual bool setSize(size_t len)=0
Decode bayer images and serve them as regular rgb.
virtual Contact getLocalContact() const =0
Gets information about who is receiving the data, if that information is available.
virtual Portable * getReference() const =0
Get a direct pointer to the object being sent, if possible.
virtual bool pushInt(int x)=0
Store an integer to return on the next call to expectInt()
bool isOk() const override
Check if the stream is ok or in an error state.
virtual std::string expectText(const char terminatingChar='\n')=0
Read some text from the network connection.
The main, catch-all namespace for YARP.
size_t getSize() const override
Checks how much data is available.
virtual yarp::conf::float32_t expectFloat32()=0
Read a 32-bit floating point number from the network connection.
std::int8_t expectInt8() override
Read a 8-bit integer from the network connection.
const yarp::os::Searchable & getConnectionModifiers() const override
Access modifiers associated with the connection, if any.
virtual bool expectBlock(char *data, size_t len)=0
Read a block of data from the network connection.
virtual Contact getRemoteContact() const =0
Gets information about who is supplying the data being read, if that information is available.
virtual void requestDrop()=0
Tag the connection to be dropped after the current message.
std::int64_t expectInt64() override
Read a 64-bit integer from the network connection.