This is the gmp backend service for all the ISD new generations.
- Java version 1.8.0_472
- Maven version 3.9.12
If you have multiple java versions, please make sure you are using the right one. The desired java version can be set using the environment variable JAVA_HOME, in ArchLinux it can be done using the command sudo archlinux-java set java-8-openjdk.
Using bash shell it can be done using:
export JAVA_HOME=/path/to/java/8Maven can be installed using your OS package manager, brew, apt, dnf, pacman.
To have a more detailed explanation about the installation process, please visit the SCORPIO ISD architecture document.
Once you have cloned the gmp repository and you have the right java and maven versions the entire repository must be compiled at least one time to create the needed jars to run the backend, this is done using the following command:
mvn install -Dmaven.test.skip=trueThe previous command will also compile the isd backend project. If you want to compile any further change made only to the isd backed project, located in gmp/edu.gemini.isd directory, the following command can be used:
mvn install -Dmaven.test.skip=true -rf :isdAfter compiling the project, the backend can be started using the following command:
mvn -Dmaven.test.skip=true pax:runThe previous command will start the websocket server using the default url ws://localhost:7000/ws/.
After the webscocket service is started the server will:
- Check every 1 second the current devices state.
- Compare every device default value and will store all changed states.
- Send the entire set of changed states on every new client connection received.
- Send only one time to every active connection any new change discovered in the device statuses.
To update the status of a device the giapi-tester compiled jar can be used. To do it you should go to its corresponding directory gmp/giapi-tester/target/ where the giapi-tester.jar should be located. If the jar is not found check the installation section to compile the entire repository.
For example, to update the cover state the following command can be used:
java -jar giapi-tester -set SCO:CC:cover.cover -type integer -value 1To have a full list of possible devices check the Data Dictionary spreadsheet.
In the directory gmp/edu.gemini.isd/src/main/resources/ a set of scripts can be found, every script have a pre-defined list of instructions to update the states and emulate a possible scenario. For example, the temperatures.sh script will start updating the bench and detectors temperatures using random values emulating the sensors reading them.