#include <service_server.hpp>
Public Types | |
typedef Callback_ | Callback |
typedef DataType_ | DataType |
typedef DataType::Request | RequestType |
typedef DataType::Response | ResponseType |
Public Member Functions | |
uint32_t | getRequestFailureCount () const |
uint32_t | getResponseFailureCount () const |
MonotonicDuration | getTxTimeout () const |
ServiceServer (INode &node) | |
void | setTxTimeout (MonotonicDuration tx_timeout) |
int | start (const Callback &callback) |
void | stop () |
![]() | |
uint32_t | getFailureCount () const |
INode & | getNode () const |
Static Public Member Functions | |
static MonotonicDuration | getDefaultTxTimeout () |
static MonotonicDuration | getMaxTxTimeout () |
static MonotonicDuration | getMinTxTimeout () |
Private Types | |
typedef GenericPublisher< DataType, ResponseType > | PublisherType |
typedef GenericSubscriber< DataType, RequestType, TransferListener > | SubscriberType |
Private Member Functions | |
virtual void | handleReceivedDataStruct (ReceivedDataStructure< RequestType > &request) |
Private Attributes | |
Callback | callback_ |
PublisherType | publisher_ |
uint32_t | response_failure_count_ |
Additional Inherited Members | |
![]() | |
void | allowAnonymousTransfers () |
GenericSubscriber (INode &node) | |
TransferListener * | getTransferListener () |
virtual void | handleReceivedDataStruct (ReceivedDataStructure< DataType_::Request > &)=0 |
int | startAsMessageListener () |
int | startAsServiceRequestListener () |
int | startAsServiceResponseListener () |
void | stop () |
virtual | ~GenericSubscriber () |
![]() | |
int | genericStart (TransferListener *listener, bool(Dispatcher::*registration_method)(TransferListener *)) |
GenericSubscriberBase (INode &node) | |
void | stop (TransferListener *listener) |
~GenericSubscriberBase () | |
![]() | |
uint32_t | failure_count_ |
INode & | node_ |
Use this class to implement UAVCAN service servers.
Note that the references passed to the callback may point to stack-allocated objects, which means that the references get invalidated once the callback returns.
DataType_ | Service data type. |
Callback_ | Service calls will be delivered through the callback of this type, and service response will be returned via the output parameter of the callback. Note that the reference to service response data struct passed to the callback always points to a default initialized response object. Please also refer to ReceivedDataStructure<> and ServiceResponseDataStructure<>. In C++11 mode this type defaults to std::function<>. In C++03 mode this type defaults to a plain function pointer; use binder to call member functions as callbacks. |
Definition at line 90 of file service_server.hpp.
typedef Callback_ uavcan::ServiceServer< DataType_, Callback_ >::Callback |
Definition at line 97 of file service_server.hpp.
typedef DataType_ uavcan::ServiceServer< DataType_, Callback_ >::DataType |
Definition at line 94 of file service_server.hpp.
|
private |
Definition at line 101 of file service_server.hpp.
typedef DataType::Request uavcan::ServiceServer< DataType_, Callback_ >::RequestType |
Definition at line 95 of file service_server.hpp.
typedef DataType::Response uavcan::ServiceServer< DataType_, Callback_ >::ResponseType |
Definition at line 96 of file service_server.hpp.
|
private |
Definition at line 100 of file service_server.hpp.
|
inlineexplicit |
Definition at line 143 of file service_server.hpp.
|
inlinestatic |
Definition at line 183 of file service_server.hpp.
|
inlinestatic |
Definition at line 185 of file service_server.hpp.
|
inlinestatic |
Definition at line 184 of file service_server.hpp.
|
inline |
Returns the number of failed attempts to decode data structs. Generally, a failed attempt means either:
Definition at line 195 of file service_server.hpp.
|
inline |
Definition at line 196 of file service_server.hpp.
|
inline |
Definition at line 187 of file service_server.hpp.
|
inlineprivatevirtual |
Definition at line 107 of file service_server.hpp.
|
inline |
Definition at line 188 of file service_server.hpp.
|
inline |
Starts the server. Incoming service requests will be passed to the application via the callback.
Definition at line 158 of file service_server.hpp.
|
inline |
Stops the server.
Definition at line 213 of file generic_subscriber.hpp.
|
private |
Definition at line 104 of file service_server.hpp.
|
private |
Definition at line 103 of file service_server.hpp.
|
private |
Definition at line 105 of file service_server.hpp.