The GIAPI C++ Language glue API is one of the Language binding options used by instrument code to integrate with Gemini. The C++ API is implemented as a shared library in C++. The API sits between the instrument code and the Gemini Master Process (GMP).
The GIAPI C++ API library is included with any process that the builder creates that must communicate with Gemini. Which processes in the instrument must link with and use the C++ API is an instrument design decision.
The communication protocol between the C++ API and the GMP is encapsulated within the GIAPI implementation.
Details about the usage of the API can be found in the Gemini Observatory ICD50 - GIAPI C++ Language Glue API.
The GIAPI C++ API supports the C++11 standard. The C++11 is a major upgrade over C++98/03, with performance and convenience features that make it feel like a new language. The GIAPI library can be compiled from any version of the gcc 4.8.1 compiler, which was the first to implement the C++11 language. Currently, Gemini is using the GIAPI on centos7 (gcc 4.8.5) and rocky 8 (gcc 8.5.0).
The following are tools used to build the GIAPI C++ API:
Centos 7 | Rocky 8 | |
---|---|---|
g++ (GCC) | 4.8.5 | 8.5.0 |
GNU Make | 3.82 | 4.2.1 |
GNU automake | 1.16.1 | 1.16.1 |
cmake | 2.8.12.2 | 3.20.2 |
The external libraries required by the GIAPI are:
- Apache Active MQ CMS (C++ Messaging system) version 3.4.1. activemq
- Apache Log4cxx version 0.11.0. log4cxx
- libCurl version 7.21.6. curl
- curlpp version 0.8.1 curlpp
- Apache Portable Runtime libraries (apr and apr-util). apr and apr-util
To compile GIAPI-GLUE from source code, it is necessary to first compile the external libraries located in the external directory.
The steps performed from GEMINI to compile the library on CENTOS 7 and CENTOS 8 are described below.
- Create the GIAPI_ROOT and BOOST_ROOT enviroment variables. It is possible executing the following command.
source ./defineGiapiglueEnv.sh
- Compile the apr library. Follow the actions listed in link
- Compile the apr-util library. Follow the actions listed in this link
- Compile the activemq library. Follow the actions listed in this link
- Compile the log4cxx library. Follow the actions listed in this link
- Compile the libCurl library. Follow the actions listed in this link
- Compile the libCurlpp library. Follow the actions listed in this link
- Compile the giapi-glue library. Execute the following commands.
> cd $GIAPI_ROOT > make > make install
- Finally, if you want to execute some examples provided by GEMINI, perform the following actions.
cd $GIAPI_ROOT/src/examples > make
The first version of the giapi-glue dates from October 24, 2008. It was written by AN (Arturo Nunez). During these years it has been maintained mainly by Carlos Quiroz, Ignacio Arriagada and Fran. Ramos. .