User manual

100
4.19.10 Freezing option value
Freezing 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 makes specified option value access level readonly.
To perform the operation, the initiator invokes a routine identified by the freeze_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 and in the opt_val_idx parameter the
index of option value to change access level for (from 0 to opt_vals_count - 1). 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->freeze_option_value) {
// Freeze all option values for the “bool_opt”
for(int idx = 0; idx < 3; idx++) {
ci->freeze_option_value(ci, “bool_opt”, idx);
}
}
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.11 Disabling option value
Disabling 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 makes specified option value hidden for the external entities.
To perform the operation, the initiator invokes a routine identified by the
disable_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 and in the
opt_val_idx parameter the index of option value to change access level for (from 0 to
opt_vals_count - 1). 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->disable_option_value) {