User manual
116
In order to perform the operation, the initiator invokes a routine identified by the
get_chapi_major_version field of the chapi_in descriptor. Procedure invocation example will
be given later.
4.34.10 Getting CHAPI minor version number
The operation of getting chapi minor version number 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 check that some functionality is supported by
the running emulator CHAPI subsystem.
In order to perform the operation, the initiator invokes a routine identified by the
get_chapi_minor_version field of the chapi_in descriptor. Procedure invocation example is
bellow.
// Check that CHAPI subsystem of running emulator version is greater or equal
// one used for CHAPI madule development
if(ci && ci->get_chapi_major_version && ci->get_chapi_minor_version) {
int cv_major = ci->get_chapi_major_version(ci);
int cv_minor = ci->get_chapi_minor_version(ci);
if(cv_major < CHAPI_MAJOR_VERSION_NO ||
(cv_major == CHAPI_MAJOR_VERSION_NO) && cv_minor < CHAPI_MINOR_VERSION_NO)
{
// It means running emulator CHAPI subsystem has some previous
// version than we’ve developed module for. Issue error for example
…
}
else {
// Version check succeeded – proceed to run…
…
}
}










