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::ConnectionReader & | modifyIncomingData (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::ConnectionWriter * | getWriter () 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::Portable * | getReference () 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::Searchable & | getConnectionModifiers () const override |
| Access modifiers associated with the connection, if any. More... | |
| bool | setSize (size_t len) 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 | |
| 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 ¶ms) override |
| Configure carrier from port administrative commands. More... | |
| void | getCarrierParams (yarp::os::Property ¶ms) 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 | |
| bool | isBroadcast () const override |
| Check if this carrier uses a broadcast mechanism. More... | |
| void | handleEnvelope (const std::string &envelope) override |
| Carriers that do not distinguish data from administrative headers (i.e. More... | |
| bool | isPush () const override |
| Check if carrier is "push" or "pull" style. More... | |
| virtual bool | reply (ConnectionState &proto, SizedWriter &writer) |
| void | prepareDisconnect () override |
| Do cleanup and preparation for the coming disconnect, if necessary. 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 | acceptIncomingData (ConnectionReader &reader) override |
| Determine whether incoming data should be accepted. More... | |
| const PortWriter & | modifyOutgoingData (const PortWriter &writer) override |
| Modify outgoing payload data, if appropriate. More... | |
| PortReader & | modifyReply (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 yarp::os::Face * | createFace () const |
| Create new Face object that the carrier needs. More... | |
Public Member Functions inherited from yarp::os::Connection | |
| virtual | ~Connection () |
| Destructor. More... | |
Public Member Functions inherited from yarp::os::ConnectionReader | |
| virtual | ~ConnectionReader () |
| Destructor. More... | |
| virtual std::string | expectString () |
| Read a string from the network connection. More... | |
| virtual int | expectInt () final |
| Read an integer from the network connection. More... | |
| virtual double | expectDouble () |
| Read a floating point number from the network connection. More... | |
| virtual void | setParentConnectionReader (ConnectionReader *parentConnectionReader) |
| Set ConnectionReader to be used for reading the envelope. More... | |
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 | partialRead (yarp::os::Bytes &b) |
| Like read, but solicit partial responses. More... | |
| virtual void | interrupt () |
| Interrupt the stream. 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 ConnectionReader * | createConnectionReader (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) |
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 27 of file BayerCarrier.h.
|
inline |
Definition at line 63 of file BayerCarrier.h.
|
inline |
Definition at line 79 of file BayerCarrier.h.
|
inlineoverridevirtual |
Terminate the stream.
Implements yarp::os::InputStream.
Definition at line 206 of file BayerCarrier.h.
|
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.
Implements yarp::os::ConnectionReader.
Definition at line 145 of file BayerCarrier.h.
|
inlineoverridevirtual |
Factory method.
Get a new object of the same type as this one.
Implements yarp::os::ModifyingCarrier.
Definition at line 83 of file BayerCarrier.h.
|
virtual |
Definition at line 204 of file BayerCarrier.cpp.
|
virtual |
Definition at line 162 of file BayerCarrier.cpp.
|
inlineoverridevirtual |
Read a block of data from the network connection.
| data | Start of the block of data |
| len | Length of the block of data |
Implements yarp::os::ConnectionReader.
Definition at line 101 of file BayerCarrier.h.
|
inlineoverridevirtual |
Read a 32-bit floating point number from the network connection.
Implements yarp::os::ConnectionReader.
Definition at line 129 of file BayerCarrier.h.
|
inlineoverridevirtual |
Read a 64-bit floating point number from the network connection.
Implements yarp::os::ConnectionReader.
Definition at line 133 of file BayerCarrier.h.
|
inlineoverridevirtual |
Read a 16-bit integer from the network connection.
Implements yarp::os::ConnectionReader.
Definition at line 113 of file BayerCarrier.h.
|
inlineoverridevirtual |
Read a 32-bit integer from the network connection.
Implements yarp::os::ConnectionReader.
Definition at line 117 of file BayerCarrier.h.
|
inlineoverridevirtual |
Read a 64-bit integer from the network connection.
Implements yarp::os::ConnectionReader.
Definition at line 121 of file BayerCarrier.h.
|
inlineoverridevirtual |
Read a 8-bit integer from the network connection.
Implements yarp::os::ConnectionReader.
Definition at line 109 of file BayerCarrier.h.
|
inlineoverridevirtual |
Read some text from the network connection.
| terminatingChar | The marker for the end of the text |
Implements yarp::os::ConnectionReader.
Definition at line 105 of file BayerCarrier.h.
|
inlineoverridevirtual |
Access modifiers associated with the connection, if any.
Implements yarp::os::ConnectionReader.
Definition at line 192 of file BayerCarrier.h.
|
inlineoverridevirtual |
Gets information about who is receiving the data, if that information is available.
Implements yarp::os::ConnectionReader.
Definition at line 172 of file BayerCarrier.h.
|
inlineoverridevirtual |
Get the name of this connection type ("tcp", "mcast", "shmem", ...)
Implements yarp::os::ModifyingCarrier.
Definition at line 87 of file BayerCarrier.h.
|
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.
Implements yarp::os::ConnectionReader.
Definition at line 164 of file BayerCarrier.h.
|
inlineoverridevirtual |
Gets information about who is supplying the data being read, if that information is available.
Implements yarp::os::ConnectionReader.
Definition at line 168 of file BayerCarrier.h.
|
inlineoverridevirtual |
Checks how much data is available.
Implements yarp::os::ConnectionReader.
Definition at line 149 of file BayerCarrier.h.
|
inlineoverridevirtual |
Gets a way to reply to the message, if possible.
Implements yarp::os::ConnectionReader.
Definition at line 156 of file BayerCarrier.h.
|
inlineoverridevirtual |
Implements yarp::os::ConnectionReader.
Definition at line 180 of file BayerCarrier.h.
|
inlineoverridevirtual |
Check if the connection is bare mode.
If it is, you are encouraged to omit type information from your serialization.
Implements yarp::os::ConnectionReader.
Definition at line 141 of file BayerCarrier.h.
|
inlineoverridevirtual |
Implements yarp::os::ConnectionReader.
Definition at line 184 of file BayerCarrier.h.
|
inlineoverridevirtual |
Check if the stream is ok or in an error state.
Implements yarp::os::InputStream.
Definition at line 209 of file BayerCarrier.h.
|
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.
Implements yarp::os::ConnectionReader.
Definition at line 137 of file BayerCarrier.h.
|
inlineoverridevirtual |
Implements yarp::os::ConnectionReader.
Definition at line 176 of file BayerCarrier.h.
|
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.
| reader | for incoming data. |
Reimplemented from yarp::os::Carrier.
Definition at line 70 of file BayerCarrier.cpp.
|
virtual |
Definition at line 308 of file BayerCarrier.cpp.
|
virtual |
Definition at line 304 of file BayerCarrier.cpp.
|
virtual |
Definition at line 325 of file BayerCarrier.cpp.
|
inlineoverridevirtual |
Store an integer to return on the next call to expectInt()
| x | the integer to store |
Implements yarp::os::ConnectionReader.
Definition at line 125 of file BayerCarrier.h.
|
overridevirtual |
Read a block of data from the stream.
Should block and wait for data.
| b[out] | the block of data to read to |
Implements yarp::os::InputStream.
Definition at line 343 of file BayerCarrier.cpp.
|
inlineoverridevirtual |
Read a message envelope, if available.
Reimplemented from yarp::os::ConnectionReader.
Definition at line 160 of file BayerCarrier.h.
|
inlineoverridevirtual |
Tag the connection to be dropped after the current message.
Implements yarp::os::ConnectionReader.
Definition at line 188 of file BayerCarrier.h.
|
inline |
Definition at line 216 of file BayerCarrier.h.
|
inlineoverridevirtual |
Implements yarp::os::ConnectionReader.
Definition at line 196 of file BayerCarrier.h.
|
inlineoverridevirtual |
Get name of carrier.
Reimplemented from yarp::os::AbstractCarrier.
Definition at line 91 of file BayerCarrier.h.