#include <helpers.hpp>
Public Member Functions | |
int | blockingCall (uavcan::NodeID server_node_id, const typename DataType::Request &request) |
int | blockingCall (uavcan::NodeID server_node_id, const typename DataType::Request &request, uavcan::MonotonicDuration timeout) |
BlockingServiceClient (uavcan::INode &node) | |
const DataType::Response & | getResponse () const |
bool | wasSuccessful () const |
![]() | |
int | call (NodeID server_node_id, const RequestType &request) |
int | call (NodeID server_node_id, const RequestType &request, ServiceCallID &out_call_id) |
void | cancelAllCalls () |
void | cancelCall (ServiceCallID call_id) |
const Callback & | getCallback () const |
ServiceCallID | getCallIDByIndex (unsigned index) const |
unsigned | getNumPendingCalls () const |
TransferPriority | getPriority () const |
MonotonicDuration | getRequestTimeout () const |
uint32_t | getResponseFailureCount () const |
bool | hasPendingCalls () const |
bool | hasPendingCallToServer (NodeID server_node_id) const |
int | init () |
int | init (TransferPriority priority) |
ServiceClient (INode &node, const Callback &callback=Callback()) | |
void | setCallback (const Callback &cb) |
void | setPriority (const TransferPriority prio) |
void | setRequestTimeout (MonotonicDuration timeout) |
virtual | ~ServiceClient () |
![]() | |
uint32_t | getFailureCount () const |
INode & | getNode () const |
Private Types | |
typedef uavcan::ServiceClient< DataType > | Super |
Private Member Functions | |
void | callback (const uavcan::ServiceCallResult< DataType > &res) |
void | setup () |
Private Attributes | |
bool | call_was_successful_ |
DataType::Response | response_ |
Wrapper over uavcan::ServiceClient<> for blocking calls. Blocks on uavcan::Node::spin() internally until the call is complete.
Definition at line 37 of file platform_specific_components/linux/libuavcan/include/uavcan_linux/helpers.hpp.
|
private |
Definition at line 39 of file platform_specific_components/linux/libuavcan/include/uavcan_linux/helpers.hpp.
|
inline |
Definition at line 58 of file platform_specific_components/linux/libuavcan/include/uavcan_linux/helpers.hpp.
|
inline |
Performs a blocking service call using default timeout (see the specs). Use getResponse() to get the actual response. Returns negative error code.
Definition at line 70 of file platform_specific_components/linux/libuavcan/include/uavcan_linux/helpers.hpp.
|
inline |
Performs a blocking service call using the specified timeout. Please consider using default timeout instead. Use getResponse() to get the actual response. Returns negative error code.
Definition at line 80 of file platform_specific_components/linux/libuavcan/include/uavcan_linux/helpers.hpp.
|
inlineprivate |
Definition at line 44 of file platform_specific_components/linux/libuavcan/include/uavcan_linux/helpers.hpp.
|
inline |
Use this to retrieve the response of the last blocking service call. This method returns default constructed response object if the last service call was unsuccessful.
Definition at line 110 of file platform_specific_components/linux/libuavcan/include/uavcan_linux/helpers.hpp.
|
inlineprivate |
Definition at line 50 of file platform_specific_components/linux/libuavcan/include/uavcan_linux/helpers.hpp.
|
inline |
Whether the last blocking call was successful.
Definition at line 104 of file platform_specific_components/linux/libuavcan/include/uavcan_linux/helpers.hpp.
|
private |
Definition at line 42 of file platform_specific_components/linux/libuavcan/include/uavcan_linux/helpers.hpp.
|
private |
Definition at line 41 of file platform_specific_components/linux/libuavcan/include/uavcan_linux/helpers.hpp.