User manual
99
To perform the operation, the initiator invokes a routine identified by the
set_and_disable_option_value field of the chapi_in descriptor. The initiator provides in the
opt_name parameter the name of configuration option to set the value for, in the opt_val_idx
parameter the index of option value to set value for (from 0 to opt_vals_count - 1) and value
to set in the val parameter. See invocation example in the chapter 4.19.2 (just change the
name of called entry from set_option_value to set_and_disable_option_value).
The example shows that the CHARON core is not obliged to support the indicated
operation. It indicates why the device instance must remember the chapi_in descriptor.
4.19.9 Enabling option value
Enabling configuration option value belongs to the “A request to process loadable
component defined configuration options” class of operations. Such an operation is
initiated by the device instance. The CHARON core is defined as a target of the operation.
This operation changes specified option value access level using the following rules:
access level of the option value is changed to "enabled" whenever option value has not
been hidden or forced enable is requested, otherwise the access level is not changed.
To perform the operation, the initiator invokes a routine identified by the enable_option_value
field of the chapi_in descriptor. The initiator provides in the opt_name parameter the name
of configuration option to change access level for, in the opt_val_idx parameter the index of
option value to change access level for (from 0 to opt_vals_count - 1) and forced enable
request in the force parameter. Invocation example is below:
// Define option storage somewhere in loadable component implementation
int my_int_opt;
bool my_bool_opt[3];
…
const chapi_in * ci = …;
if (ci->enable_option_value) {
// Enable option values forcing it in case of hidden one
for(int idx = 0; idx < 3; idx++) {
ci->enable_option_value(ci, “bool_opt”, idx, true);
}
// Enable option value only if it is not hidden – left disabled
// otherwise
ci->enable_option_value(ci, “int_opt”, 0, false);
}
The example shows that the CHARON core is not obliged to support the indicated
operation. It indicates why the device instance must remember the chapi_in descriptor.










