User manual

93
4.17 Processing a bus power-down condition
Handling the bus power-down condition belongs to the class of operations called “Request
for processing bus power events”.. The CHARON core initiates such an operation when
“powering” down the configured node.
In order to perform the operation, the initiator invokes a routine identified by the stop field
of the chapi_out descriptor. The procedure is invoked as follows:
const chapi_out * co = …;
if (co->stop) {
co->stop(co);
}
The example above shows that the device is not obliged to support the indicated
operation.
4.18 Processing a bus reset condition
Handling the bus reset condition is currently the only operation defined within the class of
operations called “Request for processing bus reset events”. CHARON initiates such an
operation when resetting the I/O subsystem of the configured node. A CPU instruction
interpretation thread is likely (but not necessarily) the initiator of such an operation.
In order to perform the operation, the initiator invokes a routine identified by the reset field
of the chapi_out descriptor. The procedure is invoked as follows:
const chapi_out * co = …;
if (co->reset) {
co->reset(co);
}
The example above shows that the device is not obliged to support the indicated
operation.
4.19 Working with configuration options
This set of operations allows loadable component to add required number of different
configuration options which are visible for this particular loadable component in the
CHARON configuration file. See chapter (5.1) for description of convenient C++ wrappers
for configuration option part of CHAPI protocol they simplify device configuration
gratefully.
4.19.1 Adding configuration option
Adding configuration option 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.