Skip to content

gemini-hlsw/giapi-glue-cc

Repository files navigation

Introduction

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.

Dependencies

The GIAPI C++ API now supports the C++20 standard. C++20 introduces significant improvements over C++11, including enhanced performance, modern syntactic features, and expanded standard library capabilities. The GIAPI library can be compiled with any version of the GCC 10 compiler, which was among the first to fully implement C++20. Currently, Gemini is using GIAPI on Rocky 9 with GCC 11.5.0.

The following are tools used to build the GIAPI C++ API:

Rocky 9 Rocky 8
g++ (GCC) 11.5.0 8.5.0
GNU Make 4.3 4.2.1
GNU automake 1.16.2 1.16.1
cmake 3.26.5 3.26.5

For this branch the necessaries modifications are made to force all the external libraries to the standard C++14. This decision was made considering that the "ActiveMQ" library, at the moment, only supports at most this version of C++.

It should be noted that, even so, GIAPI supports the standard of C++20 with all the modifications in the build configurations of the externals. Also, all the dockerfiles are using Rocky 9 by default, but changing for Rocky 8 it's also works.

External libraries

The external libraries required by the GIAPI are:

  • Apache Active MQ CMS (C++ Messaging system) version 3.9.5. activemq
  • Apache Log4cxx version 1.3.1. log4cxx
  • libCurl version 8.11.1. curl
  • curlpp version 0.8.1 curlpp
  • Apache Portable Runtime libraries (apr and apr-util). apr and apr-util
  • Expat version 2.6.4 expat

Compile GIAPI-GLUE.

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 Rocky 9 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 expat library. Follow the actions listed in link
  • Compile the apr-util library. Follow the actions listed in this link
  • Compile the log4cxx library. Follow the actions listed in this link
  • Compile the activemq 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
    

History

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. . Migration to std=c++20/14 made by Pedro Arce.

About

GIAPI library for C++

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •