YARP
Yet Another Robot Platform
BayerCarrier Class Reference

Decode bayer images and serve them as regular rgb. More...

#include <bayer_carrier/BayerCarrier.h>

+ Inheritance diagram for BayerCarrier:

Public Member Functions

 BayerCarrier ()
 
 ~BayerCarrier ()
 
Carrier * create () const override
 Factory method. More...
 
std::string getName () const override
 Get the name of this connection type ("tcp", "mcast", "shmem", ...) More...
 
std::string toString () const override
 Get name of carrier. More...
 
yarp::os::ConnectionReadermodifyIncomingData (yarp::os::ConnectionReader &reader) override
 Modify incoming payload data, if appropriate. More...
 
bool expectBlock (char *data, size_t len) override
 Read a block of data from the network connection. More...
 
std::string expectText (const char terminatingChar='\n') override
 Read some text from the network connection. More...
 
std::int8_t expectInt8 () override
 Read a 8-bit integer from the network connection. More...
 
std::int16_t expectInt16 () override
 Read a 16-bit integer from the network connection. More...
 
std::int32_t expectInt32 () override
 Read a 32-bit integer from the network connection. More...
 
std::int64_t expectInt64 () override
 Read a 64-bit integer from the network connection. More...
 
bool pushInt (int x) override
 Store an integer to return on the next call to expectInt() More...
 
yarp::conf::float32_t expectFloat32 () override
 Read a 32-bit floating point number from the network connection. More...
 
yarp::conf::float64_t expectFloat64 () override
 Read a 64-bit floating point number from the network connection. More...
 
bool isTextMode () const override
 Check if the connection is text mode. More...
 
bool isBareMode () const override
 Check if the connection is bare mode. More...
 
bool convertTextMode () override
 Reads in a standard description in text mode, and converts it to a standard description in binary. More...
 
size_t getSize () const override
 Checks how much data is available. More...
 
yarp::os::ConnectionWritergetWriter () override
 Gets a way to reply to the message, if possible. More...
 
yarp::os::Bytes readEnvelope () override
 Read a message envelope, if available. More...
 
yarp::os::PortablegetReference () const override
 Get a direct pointer to the object being sent, if possible. More...
 
yarp::os::Contact getRemoteContact () const override
 Gets information about who is supplying the data being read, if that information is available. More...
 
yarp::os::Contact getLocalContact () const override
 Gets information about who is receiving the data, if that information is available. More...
 
bool isValid () const override
 
bool isActive () const override
 
bool isError () const override
 
void requestDrop () override
 Tag the connection to be dropped after the current message. More...
 
const yarp::os::SearchablegetConnectionModifiers () const override
 Access modifiers associated with the connection, if any. More...
 
bool setSize (size_t len) override
 
void flushWriter () override
 
yarp::conf::ssize_t read (yarp::os::Bytes &b) override
 Read a block of data from the stream. More...
 
void close () override
 Terminate the stream. More...
 
bool isOk () const override
 Check if the stream is ok or in an error state. More...
 
void setParent (yarp::os::ConnectionReader &reader)
 
virtual bool debayerFull (yarp::sig::ImageOf< yarp::sig::PixelMono > &src, yarp::sig::ImageOf< yarp::sig::PixelRgb > &dest)
 
virtual bool debayerHalf (yarp::sig::ImageOf< yarp::sig::PixelMono > &src, yarp::sig::ImageOf< yarp::sig::PixelRgb > &dest)
 
virtual bool processBuffered () const
 
virtual bool processBuffered ()
 
virtual bool processDirect (yarp::os::Bytes &bytes)
 
- Public Member Functions inherited from yarp::os::ModifyingCarrier
Carriercreate () const override=0
 Factory method. More...
 
std::string getName () const override=0
 Get the name of this connection type ("tcp", "mcast", "shmem", ...) More...
 
bool checkHeader (const yarp::os::Bytes &header) override
 Given the first 8 bytes received on a connection, decide if this is the right carrier type to use for the rest of the connection. More...
 
void getHeader (yarp::os::Bytes &header) const override
 Provide 8 bytes describing this connection sufficiently to allow the other side of a connection to select it. More...
 
bool respondToHeader (yarp::os::ConnectionState &proto) override
 Respond to the header. More...
 
bool modifiesIncomingData () const override
 Check if this carrier modifies incoming data through the Carrier::modifyIncomingData method. More...
 
bool modifiesOutgoingData () const override
 Check if this carrier modifies outgoing data through the Carrier::modifyOutgoingData method. More...
 
bool modifiesReply () const override
 Check if this carrier modifies outgoing data through the Carrier::modifyReply method. More...
 
void setCarrierParams (const yarp::os::Property &params) override
 Configure carrier from port administrative commands. More...
 
void getCarrierParams (yarp::os::Property &params) const override
 Get carrier configuration and deliver it by port administrative commands. More...
 
bool configureFromProperty (yarp::os::Property &prop) override
 
- Public Member Functions inherited from yarp::os::AbstractCarrier
void setParameters (const yarp::os::Bytes &header) override
 Configure this carrier based on the first 8 bytes of the connection. More...
 
bool isConnectionless () const override
 Check if this carrier is connectionless (like udp, mcast) or connection based (like tcp). More...
 
bool supportReply () const override
 This flag is used by YARP to determine whether the connection can carry RPC traffic, that is, messages with replies. More...
 
bool canAccept () const override
 Check if reading is implemented for this carrier. More...
 
bool canOffer () const override
 Check if writing is implemented for this carrier. More...
 
bool requireAck () const override
 Check if carrier has flow control, requiring sent messages to be acknowledged by recipient. More...
 
bool canEscape () const override
 Check if carrier can encode administrative messages, as opposed to just user data. More...
 
bool isLocal () const override
 Check if carrier operates within a single process. More...
 
bool prepareSend (ConnectionState &proto) override
 Perform any initialization needed before writing on a connection. More...
 
bool sendHeader (ConnectionState &proto) override
 Write a header appropriate to the carrier to the connection, followed by any carrier-specific data. More...
 
bool expectReplyToHeader (ConnectionState &proto) override
 Process reply to header, if one is expected for this carrier. More...
 
virtual bool sendIndex (ConnectionState &proto, SizedWriter &writer)
 
bool expectExtraHeader (ConnectionState &proto) override
 Receive any carrier-specific header. More...
 
bool expectIndex (ConnectionState &proto) override
 Expect a message header, if there is one for this carrier. More...
 
bool expectSenderSpecifier (ConnectionState &proto) override
 Expect the name of the sending port. More...
 
bool sendAck (ConnectionState &proto) override
 Send an acknowledgement, if needed for this carrier. More...
 
bool expectAck (ConnectionState &proto) override
 Receive an acknowledgement, if expected for this carrier. More...
 
bool defaultSendHeader (ConnectionState &proto)
 Default implementation for the sendHeader method. More...
 
bool defaultExpectIndex (ConnectionState &proto)
 Default implementation for the expectIndex method. More...
 
bool defaultSendIndex (ConnectionState &proto, SizedWriter &writer)
 Default implementation for the sendIndex method. More...
 
bool defaultExpectAck (ConnectionState &proto)
 Default implementation for the expectAck method. More...
 
bool defaultSendAck (ConnectionState &proto)
 Default implementation for the sendAck method. More...
 
int readYarpInt (ConnectionState &proto)
 Read 8 bytes and interpret them as a YARP number. More...
 
void writeYarpInt (int n, ConnectionState &proto)
 Write n as an 8 bytes yarp number. More...
 
- Public Member Functions inherited from yarp::os::Carrier
virtual Carriercreate () const =0
 Factory method. More...
 
virtual bool checkHeader (const Bytes &header)=0
 Given the first 8 bytes received on a connection, decide if this is the right carrier type to use for the rest of the connection. More...
 
virtual void setParameters (const Bytes &header)=0
 Configure this carrier based on the first 8 bytes of the connection. More...
 
void getHeader (Bytes &header) const override=0
 Provide 8 bytes describing this connection sufficiently to allow the other side of a connection to select it. More...
 
bool isConnectionless () const override=0
 Check if this carrier is connectionless (like udp, mcast) or connection based (like tcp). More...
 
bool isBroadcast () const override
 Check if this carrier uses a broadcast mechanism. More...
 
virtual bool canAccept () const =0
 Check if reading is implemented for this carrier. More...
 
virtual bool canOffer () const =0
 Check if writing is implemented for this carrier. More...
 
bool isTextMode () const override=0
 Check if carrier is textual in nature. More...
 
bool canEscape () const override=0
 Check if carrier can encode administrative messages, as opposed to just user data. More...
 
void handleEnvelope (const std::string &envelope) override
 Carriers that do not distinguish data from administrative headers (i.e. More...
 
bool requireAck () const override=0
 Check if carrier has flow control, requiring sent messages to be acknowledged by recipient. More...
 
bool supportReply () const override=0
 This flag is used by YARP to determine whether the connection can carry RPC traffic, that is, messages with replies. More...
 
bool isLocal () const override=0
 Check if carrier operates within a single process. More...
 
bool isPush () const override
 Check if carrier is "push" or "pull" style. More...
 
virtual bool prepareSend (ConnectionState &proto)=0
 Perform any initialization needed before writing on a connection. More...
 
virtual bool sendHeader (ConnectionState &proto)=0
 Write a header appropriate to the carrier to the connection, followed by any carrier-specific data. More...
 
virtual bool expectReplyToHeader (ConnectionState &proto)=0
 Process reply to header, if one is expected for this carrier. More...
 
virtual bool write (ConnectionState &proto, SizedWriter &writer)=0
 Write a message. More...
 
virtual bool reply (ConnectionState &proto, SizedWriter &writer)
 
virtual bool expectExtraHeader (ConnectionState &proto)=0
 Receive any carrier-specific header. More...
 
virtual bool respondToHeader (ConnectionState &proto)=0
 Respond to the header. More...
 
virtual bool expectIndex (ConnectionState &proto)=0
 Expect a message header, if there is one for this carrier. More...
 
virtual bool expectSenderSpecifier (ConnectionState &proto)=0
 Expect the name of the sending port. More...
 
virtual bool sendAck (ConnectionState &proto)=0
 Send an acknowledgement, if needed for this carrier. More...
 
virtual bool expectAck (ConnectionState &proto)=0
 Receive an acknowledgement, if expected for this carrier. More...
 
bool isActive () const override=0
 Check if carrier is alive and error free. More...
 
void prepareDisconnect () override
 Do cleanup and preparation for the coming disconnect, if necessary. More...
 
virtual std::string toString () const =0
 Get name of carrier. More...
 
virtual void close ()
 Close the carrier. More...
 
virtual ~Carrier ()
 Destructor. More...
 
virtual std::string getBootstrapCarrierName () const
 Get the name of the carrier that should be used prior to handshaking, if a port is registered with this carrier as its default carrier. More...
 
virtual int connect (const Contact &src, const Contact &dest, const ContactStyle &style, int mode, bool reversed)
 Some carrier types may require special connection logic. More...
 
bool modifiesIncomingData () const override
 Check if this carrier modifies incoming data through the Carrier::modifyIncomingData method. More...
 
ConnectionReadermodifyIncomingData (ConnectionReader &reader) override
 Modify incoming payload data, if appropriate. More...
 
bool acceptIncomingData (ConnectionReader &reader) override
 Determine whether incoming data should be accepted. More...
 
bool modifiesOutgoingData () const override
 Check if this carrier modifies outgoing data through the Carrier::modifyOutgoingData method. More...
 
const PortWritermodifyOutgoingData (const PortWriter &writer) override
 Modify outgoing payload data, if appropriate. More...
 
bool modifiesReply () const override
 Check if this carrier modifies outgoing data through the Carrier::modifyReply method. More...
 
PortReadermodifyReply (PortReader &reader) override
 Modify reply payload data, if appropriate. More...
 
bool acceptOutgoingData (const PortWriter &writer) override
 Determine whether outgoing data should be accepted. More...
 
virtual bool configure (ConnectionState &proto)
 Give carrier a shot at looking at how the connection is set up. More...
 
virtual bool configureFromProperty (yarp::os::Property &options)
 
void setCarrierParams (const Property &params) override
 Configure carrier from port administrative commands. More...
 
void getCarrierParams (Property &params) const override
 Get carrier configuration and deliver it by port administrative commands. More...
 
virtual yarp::os::FacecreateFace () const
 Create new Face object that the carrier needs. More...
 
- Public Member Functions inherited from yarp::os::Connection
virtual ~Connection ()
 Destructor. More...
 
virtual bool isValid () const
 Check if this object is really a connection, or just an empty placeholder. More...
 
virtual bool isTextMode () const =0
 Check if carrier is textual in nature. More...
 
virtual bool isBareMode () const
 Check if carrier excludes type information from payload. More...
 
virtual void handleEnvelope (const std::string &envelope)=0
 Carriers that do not distinguish data from administrative headers (i.e. More...
 
virtual bool canEscape () const =0
 Check if carrier can encode administrative messages, as opposed to just user data. More...
 
virtual bool requireAck () const =0
 Check if carrier has flow control, requiring sent messages to be acknowledged by recipient. More...
 
virtual bool supportReply () const =0
 This flag is used by YARP to determine whether the connection can carry RPC traffic, that is, messages with replies. More...
 
virtual bool isLocal () const =0
 Check if carrier operates within a single process. More...
 
virtual bool isPush () const =0
 Check if carrier is "push" or "pull" style. More...
 
virtual bool isConnectionless () const =0
 Check if this carrier is connectionless (like udp, mcast) or connection based (like tcp). More...
 
virtual bool isBroadcast () const =0
 Check if this carrier uses a broadcast mechanism. More...
 
virtual bool isActive () const =0
 Check if carrier is alive and error free. More...
 
virtual bool modifiesIncomingData () const =0
 Check if this carrier modifies incoming data through the Carrier::modifyIncomingData method. More...
 
virtual yarp::os::ConnectionReadermodifyIncomingData (yarp::os::ConnectionReader &reader)=0
 Modify incoming payload data, if appropriate. More...
 
virtual bool acceptIncomingData (yarp::os::ConnectionReader &reader)=0
 Determine whether incoming data should be accepted. More...
 
virtual bool modifiesOutgoingData () const =0
 Check if this carrier modifies outgoing data through the Carrier::modifyOutgoingData method. More...
 
virtual const PortWritermodifyOutgoingData (const PortWriter &writer)=0
 Modify outgoing payload data, if appropriate. More...
 
virtual bool acceptOutgoingData (const PortWriter &writer)=0
 Determine whether outgoing data should be accepted. More...
 
virtual bool modifiesReply () const =0
 Check if this carrier modifies outgoing data through the Carrier::modifyReply method. More...
 
virtual PortReadermodifyReply (PortReader &reader)=0
 Modify reply payload data, if appropriate. More...
 
virtual void setCarrierParams (const yarp::os::Property &params)=0
 Configure carrier from port administrative commands. More...
 
virtual void getCarrierParams (yarp::os::Property &params) const =0
 Get carrier configuration and deliver it by port administrative commands. More...
 
virtual void getHeader (yarp::os::Bytes &header) const =0
 Provide 8 bytes describing this connection sufficiently to allow the other side of a connection to select it. More...
 
virtual void prepareDisconnect ()=0
 Do cleanup and preparation for the coming disconnect, if necessary. More...
 
virtual std::string getName () const =0
 Get the name of this connection type ("tcp", "mcast", "shmem", ...) More...
 
- Public Member Functions inherited from yarp::os::ConnectionReader
virtual ~ConnectionReader ()
 Destructor. More...
 
virtual bool expectBlock (char *data, size_t len)=0
 Read a block of data from the network connection. More...
 
virtual std::string expectText (const char terminatingChar='\n')=0
 Read some text from the network connection. More...
 
virtual std::string expectString ()
 Read a string from the network connection. More...
 
virtual std::int8_t expectInt8 ()=0
 Read a 8-bit integer from the network connection. More...
 
virtual std::int16_t expectInt16 ()=0
 Read a 16-bit integer from the network connection. More...
 
virtual std::int32_t expectInt32 ()=0
 Read a 32-bit integer from the network connection. More...
 
virtual std::int64_t expectInt64 ()=0
 Read a 64-bit integer from the network connection. More...
 
virtual yarp::conf::float32_t expectFloat32 ()=0
 Read a 32-bit floating point number from the network connection. More...
 
virtual yarp::conf::float64_t expectFloat64 ()=0
 Read a 64-bit floating point number from the network connection. More...
 
virtual bool isTextMode () const =0
 Check if the connection is text mode. More...
 
virtual bool isBareMode () const =0
 Check if the connection is bare mode. More...
 
virtual bool convertTextMode ()=0
 Reads in a standard description in text mode, and converts it to a standard description in binary. More...
 
virtual size_t getSize () const =0
 Checks how much data is available. More...
 
virtual ConnectionWritergetWriter ()=0
 Gets a way to reply to the message, if possible. More...
 
virtual Bytes readEnvelope ()
 Read a message envelope, if available. More...
 
virtual PortablegetReference () const =0
 Get a direct pointer to the object being sent, if possible. More...
 
virtual Contact getRemoteContact () const =0
 Gets information about who is supplying the data being read, if that information is available. More...
 
virtual Contact getLocalContact () const =0
 Gets information about who is receiving the data, if that information is available. More...
 
virtual bool isValid () const =0
 
virtual bool isActive () const =0
 
virtual bool isError () const =0
 
virtual void requestDrop ()=0
 Tag the connection to be dropped after the current message. More...
 
virtual const SearchablegetConnectionModifiers () const =0
 Access modifiers associated with the connection, if any. More...
 
virtual bool pushInt (int x)=0
 Store an integer to return on the next call to expectInt() More...
 
virtual bool setSize (size_t len)=0
 
virtual void setParentConnectionReader (ConnectionReader *parentConnectionReader)
 Set ConnectionReader to be used for reading the envelope. More...
 
virtual void flushWriter ()=0
 
- Public Member Functions inherited from yarp::os::InputStream
 InputStream ()
 Constructor. More...
 
virtual ~InputStream ()
 Destructor. More...
 
virtual void check ()
 Perform maintenance actions, if needed. More...
 
virtual int read ()
 Read and return a single byte. More...
 
virtual yarp::conf::ssize_t read (Bytes &b, size_t offset, yarp::conf::ssize_t len)
 Read a block of data from the stream. More...
 
virtual yarp::conf::ssize_t read (yarp::os::Bytes &b)=0
 Read a block of data from the stream. More...
 
virtual yarp::conf::ssize_t partialRead (yarp::os::Bytes &b)
 Like read, but solicit partial responses. More...
 
virtual void close ()=0
 Terminate the stream. More...
 
virtual void interrupt ()
 Interrupt the stream. More...
 
virtual bool isOk () const =0
 Check if the stream is ok or in an error state. More...
 
virtual bool setReadTimeout (double timeout)
 Set activity timeout. More...
 
std::string readLine (const char terminal='\n', bool *success=nullptr)
 Read a block of text terminated with a specific marker (or EOF). More...
 
yarp::conf::ssize_t readFull (Bytes &b)
 Keep reading until buffer is full. More...
 
yarp::conf::ssize_t readDiscard (size_t len)
 Read and discard a fixed number of bytes. More...
 
virtual bool setReadEnvelopeCallback (readEnvelopeCallbackType callback, void *data)
 Install a callback that the InputStream will have to call when the envelope is read from a message in carriers that cannot be escaped. More...
 

Additional Inherited Members

- Public Types inherited from yarp::os::InputStream
typedef void(* readEnvelopeCallbackType) (void *, const yarp::os::Bytes &envelope)
 Callback type for setting the envelope from a message in carriers that cannot be escaped. More...
 
- Static Public Member Functions inherited from yarp::os::ConnectionReader
static ConnectionReadercreateConnectionReader (InputStream &is)
 Create an instance of YARP's standard connection reader implementation. More...
 
static bool readFromStream (PortReader &portable, InputStream &is)
 
- Protected Member Functions inherited from yarp::os::AbstractCarrier
int getSpecifier (const Bytes &b) const
 
void createStandardHeader (int specifier, yarp::os::Bytes &header) const
 
bool write (ConnectionState &proto, SizedWriter &writer) override
 Write a message. More...
 
bool sendConnectionStateSpecifier (ConnectionState &proto)
 
bool sendSenderSpecifier (ConnectionState &proto)
 
- Static Protected Member Functions inherited from yarp::os::AbstractCarrier
static int interpretYarpNumber (const yarp::os::Bytes &b)
 
static void createYarpNumber (int x, yarp::os::Bytes &header)
 

Detailed Description

Decode bayer images and serve them as regular rgb.

Affected by carrier modifiers. Examples: tcp+recv.bayer tcp+recv.bayer+size.half tcp+recv.bayer+size.half+order.bggr

Definition at line 24 of file BayerCarrier.h.

Constructor & Destructor Documentation

◆ BayerCarrier()

BayerCarrier::BayerCarrier ( )
inline

Definition at line 60 of file BayerCarrier.h.

◆ ~BayerCarrier()

BayerCarrier::~BayerCarrier ( )
inline

Definition at line 76 of file BayerCarrier.h.

Member Function Documentation

◆ close()

void BayerCarrier::close ( )
inlineoverridevirtual

Terminate the stream.

Implements yarp::os::InputStream.

Definition at line 209 of file BayerCarrier.h.

◆ convertTextMode()

bool BayerCarrier::convertTextMode ( )
inlineoverridevirtual

Reads in a standard description in text mode, and converts it to a standard description in binary.

Useful if you only operate on the binary description usually, and just want to permit text mode for command-line interaction. If isTextMode would return false, no conversion is done.

Returns
true if the conversion was possible

Implements yarp::os::ConnectionReader.

Definition at line 144 of file BayerCarrier.h.

◆ create()

Carrier * BayerCarrier::create ( ) const
inlineoverridevirtual

Factory method.

Get a new object of the same type as this one.

Returns
a new object of the same type as this one.

Implements yarp::os::ModifyingCarrier.

Definition at line 82 of file BayerCarrier.h.

◆ debayerFull()

bool BayerCarrier::debayerFull ( yarp::sig::ImageOf< yarp::sig::PixelMono > &  src,
yarp::sig::ImageOf< yarp::sig::PixelRgb > &  dest 
)
virtual

Definition at line 201 of file BayerCarrier.cpp.

◆ debayerHalf()

bool BayerCarrier::debayerHalf ( yarp::sig::ImageOf< yarp::sig::PixelMono > &  src,
yarp::sig::ImageOf< yarp::sig::PixelRgb > &  dest 
)
virtual

Definition at line 159 of file BayerCarrier.cpp.

◆ expectBlock()

bool BayerCarrier::expectBlock ( char *  data,
size_t  len 
)
inlineoverridevirtual

Read a block of data from the network connection.

Parameters
dataStart of the block of data
lenLength of the block of data
Returns
true on success

Implements yarp::os::ConnectionReader.

Definition at line 100 of file BayerCarrier.h.

◆ expectFloat32()

yarp::conf::float32_t BayerCarrier::expectFloat32 ( )
inlineoverridevirtual

Read a 32-bit floating point number from the network connection.

Returns
the floating point number read from the connection

Implements yarp::os::ConnectionReader.

Definition at line 128 of file BayerCarrier.h.

◆ expectFloat64()

yarp::conf::float64_t BayerCarrier::expectFloat64 ( )
inlineoverridevirtual

Read a 64-bit floating point number from the network connection.

Returns
the floating point number read from the connection

Implements yarp::os::ConnectionReader.

Definition at line 132 of file BayerCarrier.h.

◆ expectInt16()

std::int16_t BayerCarrier::expectInt16 ( )
inlineoverridevirtual

Read a 16-bit integer from the network connection.

Returns
the integer read from the connection

Implements yarp::os::ConnectionReader.

Definition at line 112 of file BayerCarrier.h.

◆ expectInt32()

std::int32_t BayerCarrier::expectInt32 ( )
inlineoverridevirtual

Read a 32-bit integer from the network connection.

Returns
the integer read from the connection

Implements yarp::os::ConnectionReader.

Definition at line 116 of file BayerCarrier.h.

◆ expectInt64()

std::int64_t BayerCarrier::expectInt64 ( )
inlineoverridevirtual

Read a 64-bit integer from the network connection.

Returns
the integer read from the connection

Implements yarp::os::ConnectionReader.

Definition at line 120 of file BayerCarrier.h.

◆ expectInt8()

std::int8_t BayerCarrier::expectInt8 ( )
inlineoverridevirtual

Read a 8-bit integer from the network connection.

Returns
the integer read from the connection

Implements yarp::os::ConnectionReader.

Definition at line 108 of file BayerCarrier.h.

◆ expectText()

std::string BayerCarrier::expectText ( const char  terminatingChar = '\n')
inlineoverridevirtual

Read some text from the network connection.

Parameters
terminatingCharThe marker for the end of the text
Returns
the text read from the connection

Implements yarp::os::ConnectionReader.

Definition at line 104 of file BayerCarrier.h.

◆ flushWriter()

void BayerCarrier::flushWriter ( )
inlineoverridevirtual

Implements yarp::os::ConnectionReader.

Definition at line 199 of file BayerCarrier.h.

◆ getConnectionModifiers()

const yarp::os::Searchable & BayerCarrier::getConnectionModifiers ( ) const
inlineoverridevirtual

Access modifiers associated with the connection, if any.

Returns
connection configuration object

Implements yarp::os::ConnectionReader.

Definition at line 191 of file BayerCarrier.h.

◆ getLocalContact()

yarp::os::Contact BayerCarrier::getLocalContact ( ) const
inlineoverridevirtual

Gets information about who is receiving the data, if that information is available.

Returns
contact information about sender (Contact::invalid if not available)

Implements yarp::os::ConnectionReader.

Definition at line 171 of file BayerCarrier.h.

◆ getName()

std::string BayerCarrier::getName ( ) const
inlineoverridevirtual

Get the name of this connection type ("tcp", "mcast", "shmem", ...)

Returns
the name of this connection type

Implements yarp::os::ModifyingCarrier.

Definition at line 86 of file BayerCarrier.h.

◆ getReference()

yarp::os::Portable * BayerCarrier::getReference ( ) const
inlineoverridevirtual

Get a direct pointer to the object being sent, if possible.

This only makes sense in local operation, when sender and receiver are in the same process; in all other situations this returns nullptr.

Returns
The message object, or nullptr if not available

Implements yarp::os::ConnectionReader.

Definition at line 163 of file BayerCarrier.h.

◆ getRemoteContact()

yarp::os::Contact BayerCarrier::getRemoteContact ( ) const
inlineoverridevirtual

Gets information about who is supplying the data being read, if that information is available.

Returns
contact information about sender (Contact::invalid if not available)

Implements yarp::os::ConnectionReader.

Definition at line 167 of file BayerCarrier.h.

◆ getSize()

size_t BayerCarrier::getSize ( ) const
inlineoverridevirtual

Checks how much data is available.

Returns
the number of bytes left on the connection.

Implements yarp::os::ConnectionReader.

Definition at line 148 of file BayerCarrier.h.

◆ getWriter()

yarp::os::ConnectionWriter * BayerCarrier::getWriter ( )
inlineoverridevirtual

Gets a way to reply to the message, if possible.

Returns
An object that permits replies, or nullptr if this cannot be done.

Implements yarp::os::ConnectionReader.

Definition at line 155 of file BayerCarrier.h.

◆ isActive()

bool BayerCarrier::isActive ( ) const
inlineoverridevirtual
Returns
true if the reader is active. Readers become inactive if the connection they are associated with breaks.

Implements yarp::os::ConnectionReader.

Definition at line 179 of file BayerCarrier.h.

◆ isBareMode()

bool BayerCarrier::isBareMode ( ) const
inlineoverridevirtual

Check if the connection is bare mode.

If it is, you are encouraged to omit type information from your serialization.

Returns
true if the connection is bare

Implements yarp::os::ConnectionReader.

Definition at line 140 of file BayerCarrier.h.

◆ isError()

bool BayerCarrier::isError ( ) const
inlineoverridevirtual
Returns
true if the reader encountered an error. Readers can encounter an error if there is some data loss. For unreliable protocols like UDP/Multicast, where losses are not unexpected, this error flag will be reset for the next incoming message.

Implements yarp::os::ConnectionReader.

Definition at line 183 of file BayerCarrier.h.

◆ isOk()

bool BayerCarrier::isOk ( ) const
inlineoverridevirtual

Check if the stream is ok or in an error state.

Returns
true iff the stream is ok

Implements yarp::os::InputStream.

Definition at line 212 of file BayerCarrier.h.

◆ isTextMode()

bool BayerCarrier::isTextMode ( ) const
inlineoverridevirtual

Check if the connection is text mode.

If it is, you are encouraged (but by no means required) to use a human-readable representation of your data structure.

Returns
true if the connection is text mode (as opposed to binary)

Implements yarp::os::ConnectionReader.

Definition at line 136 of file BayerCarrier.h.

◆ isValid()

bool BayerCarrier::isValid ( ) const
inlineoverridevirtual
Returns
true if the reader is valid. Invalid readers may signal a shutdown.

Implements yarp::os::ConnectionReader.

Definition at line 175 of file BayerCarrier.h.

◆ modifyIncomingData()

yarp::os::ConnectionReader & BayerCarrier::modifyIncomingData ( yarp::os::ConnectionReader reader)
overridevirtual

Modify incoming payload data, if appropriate.

Doesn't need to be done immediately, it is fine to hold onto a reference to the incoming data reader and use it on demand. This can be handy in order to avoid unnecessary copies.

Parameters
readerfor incoming data.
Returns
reader for modified version of incoming data.
Note
If the ConnectionReader returned is not the same as the one in input, the setParentConnectionReader(&reader) should be called for the new one, or the envelope will not be handled correctly.

Reimplemented from yarp::os::Carrier.

Definition at line 67 of file BayerCarrier.cpp.

◆ processBuffered() [1/2]

bool BayerCarrier::processBuffered ( )
virtual

Definition at line 305 of file BayerCarrier.cpp.

◆ processBuffered() [2/2]

bool BayerCarrier::processBuffered ( ) const
virtual

Definition at line 301 of file BayerCarrier.cpp.

◆ processDirect()

bool BayerCarrier::processDirect ( yarp::os::Bytes bytes)
virtual

Definition at line 322 of file BayerCarrier.cpp.

◆ pushInt()

bool BayerCarrier::pushInt ( int  x)
inlineoverridevirtual

Store an integer to return on the next call to expectInt()

Parameters
xthe integer to store
Returns
true on success

Implements yarp::os::ConnectionReader.

Definition at line 124 of file BayerCarrier.h.

◆ read()

yarp::conf::ssize_t BayerCarrier::read ( yarp::os::Bytes b)
overridevirtual

Read a block of data from the stream.

Should block and wait for data.

Parameters
b[out]the block of data to read to
Returns
the number of bytes read, or -1 upon error

Implements yarp::os::InputStream.

Definition at line 340 of file BayerCarrier.cpp.

◆ readEnvelope()

yarp::os::Bytes BayerCarrier::readEnvelope ( )
inlineoverridevirtual

Read a message envelope, if available.

Reimplemented from yarp::os::ConnectionReader.

Definition at line 159 of file BayerCarrier.h.

◆ requestDrop()

void BayerCarrier::requestDrop ( )
inlineoverridevirtual

Tag the connection to be dropped after the current message.

Implements yarp::os::ConnectionReader.

Definition at line 187 of file BayerCarrier.h.

◆ setParent()

void BayerCarrier::setParent ( yarp::os::ConnectionReader reader)
inline

Definition at line 219 of file BayerCarrier.h.

◆ setSize()

bool BayerCarrier::setSize ( size_t  len)
inlineoverridevirtual

Implements yarp::os::ConnectionReader.

Definition at line 195 of file BayerCarrier.h.

◆ toString()

std::string BayerCarrier::toString ( ) const
inlineoverridevirtual

Get name of carrier.

Returns
name of carrier.

Reimplemented from yarp::os::AbstractCarrier.

Definition at line 90 of file BayerCarrier.h.


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