User manual

115
can be used when CHAPI device need to use product minor number somehow, e.g. to
check product version to be greater than something.
In order to perform the operation, the initiator invokes a routine identified by the
get_product_minor_version field of the chapi_in descriptor. Procedure invocation example will
be given later.
4.34.8 Getting product build number
The operation of getting product build 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 use product build number somehow, e.g. to
check product build to be greater than something.
In order to perform the operation, the initiator invokes a routine identified by the
get_product_build_version field of the chapi_in descriptor. The example of invocation of three
version number routines is bellow:
const int v_major = 1;
const int v_minor = 5;
const int v_build = 88;
if(ci && ci->get_product_buld_version &&
v_build <= ci->get_product_build_no(ci))
{
// Ok, build is ok, continue checking...
if(ci->get_product_major_version && ci->get_product_minor_version) {
v_prod_major = ci->get_product_major_version(ci);
v_prod_minor = ci->get_product_minor_version(ci);
if(v_prod_major >= v_major && v_prod_minor >= v_minor) {
// Ok, version checking done...
...
}
else {
// Product version check failed – report error
...
}
}
else {
// Product version check failed – report error
}
}
else {
// Product build number is less than required – report error
...
}
4.34.9 Getting CHAPI major version number
The operation of getting chapi major 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.