YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
yarp::dev::ReturnValue Class Reference

#include <yarp/dev/ReturnValue.h>

+ Inheritance diagram for yarp::dev::ReturnValue:

Public Types

enum class  return_code {
  return_value_ok = 0 ,
  return_value_error_generic = 1 ,
  return_value_error_not_implemented_by_device = 2 ,
  return_value_error_nws_nwc_communication_error = 3 ,
  return_value_error_deprecated = 4 ,
  return_value_error_method_failed = 5 ,
  return_value_error_not_ready = 6 ,
  return_value_uninitialized = 100
}
 

Public Member Functions

 ReturnValue ()
 
 ~ReturnValue ()=default
 
 ReturnValue (return_code code)
 
 ReturnValue (const ReturnValue &other)=default
 
ReturnValueoperator&& (const ReturnValue &other)
 
ReturnValueoperator&= (const ReturnValue &other)
 
bool operator== (const return_code &code) const
 
bool operator== (const ReturnValue &value) const
 
std::string toString ()
 
 operator bool () const
 
bool read (yarp::os::ConnectionReader &connection) override
 Read this object from a network connection.
 
bool write (yarp::os::ConnectionWriter &connection) const override
 Write this object to a network connection.
 
- Public Member Functions inherited from yarp::os::Portable
virtual Type getType () const
 
- Public Member Functions inherited from yarp::os::PortReader
virtual ~PortReader ()
 Destructor.
 
virtual Type getReadType () const
 
- Public Member Functions inherited from yarp::os::PortWriter
virtual ~PortWriter ()
 Destructor.
 
virtual void onCompletion () const
 This is called when the port has finished all writing operations.
 
virtual void onCommencement () const
 This is called when the port is about to begin writing operations.
 
virtual yarp::os::Type getWriteType () const
 

Additional Inherited Members

- Static Public Member Functions inherited from yarp::os::Portable
static bool copyPortable (const PortWriter &writer, PortReader &reader)
 Copy one portable to another, via writing and reading.
 

Detailed Description

Definition at line 32 of file ReturnValue.h.

Member Enumeration Documentation

◆ return_code

Enumerator
return_value_ok 
return_value_error_generic 

Method was successfully executed.

return_value_error_not_implemented_by_device 
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_method_failed 

Method is deprecated.

return_value_error_not_ready 

Method failed due to invalid internal status/invalid request.

return_value_uninitialized 

Method failed because some initialization is missing.

Definition at line 35 of file ReturnValue.h.

Constructor & Destructor Documentation

◆ ReturnValue() [1/3]

ReturnValue::ReturnValue ( )

Definition at line 13 of file ReturnValue.cpp.

◆ ~ReturnValue()

yarp::dev::ReturnValue::~ReturnValue ( )
default

◆ ReturnValue() [2/3]

ReturnValue::ReturnValue ( return_code  code)

Definition at line 115 of file ReturnValue.cpp.

◆ ReturnValue() [3/3]

yarp::dev::ReturnValue::ReturnValue ( const ReturnValue other)
default

Member Function Documentation

◆ operator bool()

ReturnValue::operator bool ( ) const

Definition at line 110 of file ReturnValue.cpp.

◆ operator&&()

ReturnValue & ReturnValue::operator&& ( const ReturnValue other)

Definition at line 31 of file ReturnValue.cpp.

◆ operator&=()

ReturnValue & ReturnValue::operator&= ( const ReturnValue other)

Definition at line 51 of file ReturnValue.cpp.

◆ operator==() [1/2]

bool ReturnValue::operator== ( const return_code code) const

Definition at line 120 of file ReturnValue.cpp.

◆ operator==() [2/2]

bool ReturnValue::operator== ( const ReturnValue value) const

Definition at line 126 of file ReturnValue.cpp.

◆ read()

bool ReturnValue::read ( yarp::os::ConnectionReader reader)
overridevirtual

Read this object from a network connection.

Override this for your particular class.

Parameters
readeran interface to the network connection for reading
Returns
true iff the object is successfully read

Implements yarp::os::Portable.

Definition at line 132 of file ReturnValue.cpp.

◆ toString()

std::string ReturnValue::toString ( )

Definition at line 86 of file ReturnValue.cpp.

◆ write()

bool ReturnValue::write ( yarp::os::ConnectionWriter writer) const
overridevirtual

Write this object to a network connection.

Override this for your particular class. Be aware that depending on the nature of the connections a port has, and what protocol they use, and how efficient the YARP implementation is, this method may be called once, twice, or many times, as the result of a single call to Port::write

Parameters
writeran interface to the network connection for writing
Returns
true iff the object is successfully written

Implements yarp::os::Portable.

Definition at line 139 of file ReturnValue.cpp.


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