User manual

112
4.33 Get bus address range
The operation of getting bus address range belongs to the class of operations called “A
request for changing the configuration and support requests”. Such an operation is
initiated by the CHARON core. The device instance is defined as a target of the operation.
This operation is commonly used by devices which implementation is almost but not
exactly the same for different bus types (QBUS/UNIBUS) it is possible to inform
CHARON core about particular bus register window size.
In order to perform the operation, the initiator invokes a routine identified by the
get_bus_address_range field of the chapi_out descriptor. The procedure is invoked as follows
from CHARON core when it connects default device address space to the bus:
//
// Address window size maybe different for different buses supported by the same
// device implementation. In this case device can give us appropriate range
// depending on bus type device is connected to.
//
if(communication_context.co.get_bus_address_range) {
b_address_range = communication_context.co.get_bus_address_range(
&communication_context.co, bus_type);
}
The example above shows that the device is not obliged to support the indicated
operation.
4.34 Versioning information support requests
4.34.1 Getting product identification string
The operation of getting product identification string belongs to the class of operations
called “Versioning information support requests”. Such an operation is initiated by the
device instance. The CHARON core is defined as a target of the operation. This operation
can be used when CHAPI device need to use product identification string somehow.
In order to perform the operation, the initiator invokes a routine identified by the
get_product_ident field of the chapi_in descriptor. The procedure should be invoked like
follows from device instance:
char *prod_id_str;
if(ci && ci->get_product_ident) {
prod_id_str = ci->get_product_ident(ci);
}
else {
// No valid communication context – issue error message if necessary
prod_id_str = 0;
}