Skip to content

Interfacing the Apollo Service Module control class with the ShepHERD tracker online software framework

Notifications You must be signed in to change notification settings

ammitra/ApolloHerd

Repository files navigation

ApolloSM plugin for HERD library

An ApolloSM-specific plugin using the HERD Library.

Derived from the work of the CMS Phase-2 Tracker Online SW group, whose work can be found here.

Overview

This repository contains an ApolloSM_device-specific plugin with an ApolloDevice class that utilizes the EvaluateCommand functionality from BUTool to wrap several ApolloSM_device commands, including:

  • cmpwrdown, cmpwrup, read, svfplayer and
  • dev_cmd, which allows for the execution of any ApolloSM_device command by passing the command string and the appropriate arguments.

Dependencies

The main dependency is swatch, which in turn requires:

And, in the switch from ZMQ & msgpack to HTTP & JSON, the HERD control app now requires

Building on an Apollo

  1. ssh into the SoC

  2. Install the HERD control app and library, along with their dependencies, following the instructions in the README:

    • Install the dependencies: yum install gcc-c++ make cmake3 boost-devel log4cplus-devel yaml-cpp-devel jsoncpp-devel gtest-devel
    • Ensure swatch checked out, or run git submodule update --init
    • NOTE: due to the old compiler on the Apollo failing with certain aspects of the build (namely the test suite, which is not necessary for this), certain aspects of the build process for swatch and the control app must be changed:
    • Build HERD library and control application with
      mkdir build && cd build
      cmake3 ..
      make
      
    • Finally, if you want to install the HERD library and control application, run
    sudo make install
    
  3. Checkout the ApolloHerd plugin and build by running:

mkdir build && cd build
cmake3 ..
make

Using this plugin with the control application

If built directly on SoC: After installing the HERD control app and swatch (see above) and building ApolloHerd, run:

source env.sh
herd-control-app Apollo.yml

NOTE: if ERROR: locale::facet::_S_create_c_locale name not valid error, then prepend command with LC_ALL=C (until workaround found)

source env.sh
LC_ALL=C herd-control-app Apollo.yml

WIP - Running in a container

Eventually, the goal is to run this software in a container on the Apollo. In the Docker/ directory there are several scripts designed to be run inside of a container. The main script (almost working) is build.sh and installs all of the software necessary to run the HERD control app and the Apollo plugin for HERD. The code is all compiled inside of the container:

gitlab-registry.cern.ch/cms-tracker-phase2-onlinesw/herd-docker/herd-base-dev:master-8cd483a1

If building in a container: (WIP) To build the image targeting armv7 on x86 architecture:

  1. Navigate to directory containing Dockerfile
  2. Run docker buildx build --platform linux/arm -t ammitra/apolloherd . --push
    • login to the docker hub and substitute your own username as necessary This should build and push the armv7 image to the desired registry.

Useful links regarding buildx:

About

Interfacing the Apollo Service Module control class with the ShepHERD tracker online software framework

Resources

Stars

Watchers

Forks

Packages

No packages published