Register a handler called if any remote proxy tries to set the current field value.

Note: The registered handler must provide the effective field value using asynchronous future / promise approach. The SetHandler
is mandatory for fields with HAS-SETTER=true
configuration.
Syntax
template <…>
auto amsr::socal::events::SkeletonField<…>::RegisterSetHandler(GetHandlerInterface set_handler) -> void
Parameters
in |
| Handler function which is called with The given handler must not be |
Returns
void

Note: Any exception thrown by the callback will lead to a termination through std::terminate()
.
Precondition
- Service must not be offered before calling this API.
Thread-safety, Reentrance, Result Delivery
- Threadsafe : FALSE for same class instance, TRUE for different instances
- Reentrant : FALSE for same class instance, TRUE for different instances
- Synchronous : TRUE
Example
ExampleApplicationField1.RegisterGetHandler([this]() {
ara::core::Promise<service1::skeleton::fields::ExampleApplicationField1::FieldType> promise;
promise.set_value(field1_value_);
return promise.get_future();
});