libuav original
Dependents: UAVCAN UAVCAN_Subscriber
BlockingServiceClient< DataType > Class Template Reference
Wrapper over uavcan::ServiceClient<> for blocking calls. More...
#include <helpers.hpp>
Public Member Functions | |
int | blockingCall (uavcan::NodeID server_node_id, const typename DataType::Request &request) |
Performs a blocking service call using default timeout (see the specs). | |
int | blockingCall (uavcan::NodeID server_node_id, const typename DataType::Request &request, uavcan::MonotonicDuration timeout) |
Performs a blocking service call using the specified timeout. | |
bool | wasSuccessful () const |
Whether the last blocking call was successful. | |
const DataType::Response & | getResponse () const |
Use this to retrieve the response of the last blocking service call. |
Detailed Description
template<typename DataType>
class uavcan_linux::BlockingServiceClient< DataType >
Wrapper over uavcan::ServiceClient<> for blocking calls.
Blocks on uavcan::Node::spin() internally until the call is complete.
Definition at line 37 of file drivers/linux/include/uavcan_linux/helpers.hpp.
Member Function Documentation
int blockingCall | ( | uavcan::NodeID | server_node_id, |
const typename DataType::Request & | request | ||
) |
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 drivers/linux/include/uavcan_linux/helpers.hpp.
int blockingCall | ( | uavcan::NodeID | server_node_id, |
const typename DataType::Request & | request, | ||
uavcan::MonotonicDuration | timeout | ||
) |
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 drivers/linux/include/uavcan_linux/helpers.hpp.
const DataType::Response& getResponse | ( | ) | const |
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 drivers/linux/include/uavcan_linux/helpers.hpp.
bool wasSuccessful | ( | ) | const |
Whether the last blocking call was successful.
Definition at line 104 of file drivers/linux/include/uavcan_linux/helpers.hpp.
Generated on Tue Jul 12 2022 17:17:38 by 1.7.2