Public Types | Public Member Functions | Private Attributes | List of all members
uavcan::ServiceCallResult< DataType > Class Template Reference

#include <service_client.hpp>

Inheritance diagram for uavcan::ServiceCallResult< DataType >:
Inheritance graph
[legend]

Public Types

typedef ReceivedDataStructure< typename DataType::Response > ResponseFieldType
 
enum  Status { Success, ErrorTimeout }
 

Public Member Functions

ServiceCallID getCallID () const
 
ResponseFieldTypegetResponse ()
 
const ResponseFieldTypegetResponse () const
 
Status getStatus () const
 
bool isSuccessful () const
 
 ServiceCallResult (Status arg_status, ServiceCallID arg_call_id, ResponseFieldType &arg_response)
 

Private Attributes

ServiceCallID call_id_
 Identifies the call. More...
 
ResponseFieldTyperesponse_
 Returned data structure. Value undefined if the service call has failed. More...
 
const Status status_
 Whether successful or not. Failure to decode the response causes timeout. More...
 

Additional Inherited Members

- Private Member Functions inherited from uavcan::Noncopyable
 Noncopyable ()
 
 ~Noncopyable ()
 

Detailed Description

template<typename DataType>
class uavcan::ServiceCallResult< DataType >

Object of this type will be returned to the application as a result of service call. Note that application ALWAYS gets this result, even when it times out or fails because of some other reason. The class is made noncopyable because it keeps a reference to a stack-allocated object.

Definition at line 54 of file service_client.hpp.

Member Typedef Documentation

◆ ResponseFieldType

template<typename DataType >
typedef ReceivedDataStructure<typename DataType::Response> uavcan::ServiceCallResult< DataType >::ResponseFieldType

Definition at line 57 of file service_client.hpp.

Member Enumeration Documentation

◆ Status

template<typename DataType >
enum uavcan::ServiceCallResult::Status
Enumerator
Success 
ErrorTimeout 

Definition at line 59 of file service_client.hpp.

Constructor & Destructor Documentation

◆ ServiceCallResult()

template<typename DataType >
uavcan::ServiceCallResult< DataType >::ServiceCallResult ( Status  arg_status,
ServiceCallID  arg_call_id,
ResponseFieldType arg_response 
)
inline

Definition at line 67 of file service_client.hpp.

Member Function Documentation

◆ getCallID()

template<typename DataType >
ServiceCallID uavcan::ServiceCallResult< DataType >::getCallID ( ) const
inline

Definition at line 83 of file service_client.hpp.

◆ getResponse() [1/2]

template<typename DataType >
ResponseFieldType& uavcan::ServiceCallResult< DataType >::getResponse ( )
inline

Definition at line 89 of file service_client.hpp.

◆ getResponse() [2/2]

template<typename DataType >
const ResponseFieldType& uavcan::ServiceCallResult< DataType >::getResponse ( ) const
inline

Returned reference points to a stack-allocated object.

Definition at line 88 of file service_client.hpp.

◆ getStatus()

template<typename DataType >
Status uavcan::ServiceCallResult< DataType >::getStatus ( ) const
inline

Definition at line 81 of file service_client.hpp.

◆ isSuccessful()

template<typename DataType >
bool uavcan::ServiceCallResult< DataType >::isSuccessful ( ) const
inline

Shortcut to quickly check whether the call was successful.

Definition at line 79 of file service_client.hpp.

Member Data Documentation

◆ call_id_

template<typename DataType >
ServiceCallID uavcan::ServiceCallResult< DataType >::call_id_
private

Identifies the call.

Definition at line 63 of file service_client.hpp.

◆ response_

template<typename DataType >
ResponseFieldType& uavcan::ServiceCallResult< DataType >::response_
private

Returned data structure. Value undefined if the service call has failed.

Definition at line 64 of file service_client.hpp.

◆ status_

template<typename DataType >
const Status uavcan::ServiceCallResult< DataType >::status_
private

Whether successful or not. Failure to decode the response causes timeout.

Definition at line 62 of file service_client.hpp.


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


uavcan_communicator
Author(s):
autogenerated on Fri Dec 13 2024 03:10:05