User manual
111
4.31 Update of bus mapping registers (CHARON deep integration)
Update of bus mapping register belongs to the class of operations called “Replacement
hardware support requests” ”, Using this function could require Stromasys consulting. The
CHARON core initiates such an operation when particular bus mapping register is
updated.
To perform the operation, the initiator invokes a routine identified by the
mapping_register_updated field of the chapi_out descriptor. The initiator provides in the reg_no
parameter a number of updated bus mapping register and in the val parameter the value
written to the bus mapping register. The procedure is invoked as follows:
const chapi_out * co = …;
if (co->mapping_register_updated) {
co-> mapping_register_updated (co, reg_no, val);
}
The example above shows that the device is not obliged to support the indicated
operation.
4.32 Get bus type
The operation of getting bus type we are connected to belongs to the class of operations
called “A request for changing the configuration and support requests”. Such an operation
is initiated by the device instance. The CHARON core 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 switch
correctly from one bus specific to another in device implementation.
In order to perform the operation, the initiator invokes a routine identified by the
get_bus_type field of the chapi_in descriptor. The procedure is invoked as follows:
void chapi_rlv12_t::start()
{
int i;
…
// Remember bus type we are connected to for the further usage
if(ci && ci->get_bus_type){
if(ci->get_bus_type(ci) == UNIBUS){
bus_type = UNIBUS;
}
if(ci->get_bus_type(ci) == QBUS){
bus_type = QBUS;
}
}
…
}










