CIGI API Version 2.7.1 
CIGI API : Users' Guide
Versioning

Versioning

The API is backwards compatible with previous versions of the CIGI. When the API is updated for the most recent version of CIGI, many of the packet definitions and functions that manipulate the packets are subject to change. The interface for the API however, will remain the same.
 

Version Packet and Function Names

Packet and function names that refer to previous versions and need to be updated, are renamed by appending the _VN suffix, where N is the last version number for which the packet or function was valid. For instance, the CIGI_HAT_REQUEST packet was updated in CIGI version 2, so the name of the new packet will remain the same in version 2, and the name of the outdated packet from version 1 will be renamed to CIGI_HAT_REQUEST_V1.
 
Example
/* CIGI version 1 Height Above Terrain packet definition */ struct CIGI_HAT_REQUEST_V1 { .... }; /* CIGI version 2 Height Above Terrain packet definition */ struct CIGI_HAT_REQUEST { .... };

Thus, there will be two definitions of the CIGI_COLL_RESPONSE packet, one from version 1 and the other from version 2 of the CIGI.

Similarly, old functions are renamed using _VN suffix, where N is the version number. In version 2 of the API, the CigiPrintHatRequestPacket() function was updated because the definition of the packet which it operates on has changed. The function that opeates on the CIGI version 1 packets is renamed to CigiPrintHatRequestPacket_V1(), while the CigiPrintHatRequestPacket() function is updated to opeate on the CIGI_COLL_RESPONSE packets defined in CIGI version 2.
 

Selecting the CIGI Version to Use

The preprocessor definition CIGI_VERSION_N can be set in order to automatically reference the packets and function names from a previous version of CIGI, where N is the CIGI version number to use.

This is done to reference specific packets and functions from a previous version on an application scope. All packet and function references will be defined to use a previous version. This is illustrated in the following figure.
 

Figure
/* Use CIGI version 1 */ #ifdef CIGI_VERSION_1 #define CIGI_HAT_REQUEST CIGI_HAT_REQUEST_V1 #define CIGI_HAT_REQUEST_SIZE CIGI_HAT_REQUEST_SIZE_V1 .... #endif /* CIGI_VERSION_1 */

Thus whenever CIGI_HAT_REQUEST or CIGI_HAT_REQUEST_SIZE are referenced in the application, they will be set to use CIGI_HAT_REQUEST_V1 and CIGI_HAT_REQUEST_SIZE_V1, respectively.

The benefit of using the preprocessor definition for selecting the version of CIGI, is that the same interface (packet and function names) can be used for different versions of the API. An application using the CIGI API can be compiled to support different versions of the API.

The disadvantage to using the CIGI_VERSION_N preprocessor definition is that only the version selected and preceeding versions can be used by an application. This is because the most recent version of the CIGI implemented by the API will use the normal packet and function names, without the _VN prefix. When a different version is selected with a CIGI_VERSION_N preprocessor definition, constants, packet names, and function names will be redefined to use a previous version and the ones which refer ones implementing a previous version of CIGI. This means that the implementation for the most recent version of the API will become inaccessable.
 

Explicitly Using Previous Versions

In order to support multiple versions of the CIGI from the same application, constants, functions, and packet names must be used explicitly to refer to the version that is required.
SourceForge LogoBoeing
******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ********