Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: UAVCAN UAVCAN_Subscriber
ServiceResponseDataStructure< ResponseDataType_ > Class Template Reference
This type can be used in place of the response type in a service server callback to get more advanced control of service request processing. More...
#include <service_server.hpp>
Public Member Functions | |
| void | setResponseEnabled (bool x) |
| When disabled, the server will not transmit the response transfer. | |
| bool | isResponseEnabled () const |
| Whether the response will be sent. | |
Detailed Description
template<typename ResponseDataType_>
class uavcan::ServiceResponseDataStructure< ResponseDataType_ >
This type can be used in place of the response type in a service server callback to get more advanced control of service request processing.
PLEASE NOTE that since this class inherits the response type, service server callbacks can accept either object of this class or the response type directly if the extra options are not needed.
For example, both of these callbacks can be used with the same service type 'Foo':
void first(const ReceivedDataStructure<Foo::Request>& request, ServiceResponseDataStructure<Foo::Response>& response);
void second(const Foo::Request& request, Foo::Response& response);
In the latter case, an implicit cast will happen before the callback is invoked.
Definition at line 40 of file service_server.hpp.
Member Function Documentation
| bool isResponseEnabled | ( | ) | const |
Whether the response will be sent.
By default it will.
Definition at line 61 of file service_server.hpp.
| void setResponseEnabled | ( | bool | x ) |
When disabled, the server will not transmit the response transfer.
By default it is enabled, i.e. response will be sent.
Definition at line 56 of file service_server.hpp.
Generated on Tue Jul 12 2022 17:17:37 by
1.7.2