30#if !YARP_RETURNVALUE_DISABLE_BOOL_INPUT
54 if (this->value_b == other.value_b)
74 if (this->value_b == other.value_b)
84#if !YARP_RETURNVALUE_DISABLE_BOOL_INPUT
104 return std::string(
"ok");
106 return std::string(
"return_value_error_deprecated");
108 return std::string(
"return_value_error_generic");
110 return std::string(
"return_value_error_method_fail");
112 return std::string(
"return_value_error_not_implemented_by_device");
114 return std::string(
"return_value_error_nws_nwc_communication_error");
116 return std::string(
"return_value_error_not_ready");
119 return std::string(
"unknown/uninitialized");
123ReturnValue::operator
bool()
const
125 return value_b == return_code::return_value_ok;
135 if (code == this->value_b)
return true;
141 if (value == this->value_b)
return true;
149 bool ok = connection.
expectBlock((
char*)&header,
sizeof(header));
162 connection.
appendBlock((
char*)&header,
sizeof(header));
bool operator==(const return_code &code) const
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
ReturnValue & operator&&(const ReturnValue &other)
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
ReturnValue & operator&=(const ReturnValue &other)
@ return_value_error_nws_nwc_communication_error
Method is not (yet) implemented.
@ return_value_error_deprecated
Command answer lost during network transmission. Status unknown.
@ return_value_error_not_implemented_by_device
@ return_value_error_generic
Method was successfully executed.
@ return_value_uninitialized
Method failed because some initialization is missing.
@ return_value_error_not_ready
Method failed due to invalid internal status/invalid request.
@ return_value_error_method_failed
Method is deprecated.
A mini-server for performing network communication in the background.
An interface for reading from a network connection.
virtual bool expectBlock(char *data, size_t len)=0
Read a block of data from the network connection.
virtual bool convertTextMode()=0
Reads in a standard description in text mode, and converts it to a standard description in binary.
An interface for writing to a network connection.
virtual bool convertTextMode()=0
Converts a standard description in binary into a textual description, if the connection is in text-mo...
virtual void appendBlock(const char *data, size_t len)=0
Send a block of data to the network connection.
For streams capable of holding different kinds of content, check what they actually have.
An interface to the operating system, including Port based communication.
std::int32_t NetInt32
Definition of the NetInt32 type.
#define YARP_END_PACK
Ends 1 byte packing for structs/classes.
#define YARP_BEGIN_PACK
Starts 1 byte packing for structs/classes.