Home

Documentation

Project Support

II. STARGRASP Software Overview

STARGRASP Software

See also Command syntax notes

These are the five layers of interfaces to the STARGRASP controller system. Each is built on only the next lower layer:

A. Demo Scripts

Our example/template script commands run on the STARGRASP pixel server. They are implemented in Bourne Shell and are primarily for demonstration -- a suggested way to integrate a camera or set of detectors controlled by STARGRASP into a larger system. The scripts use toolkit level commands, described below, to control a group of controller boardsets.

B. Toolkit Level

The STARGRASP toolkit consists of C programs which a user or script can invoke on the pixel server host. Toolkit programs can be invoked on any host with the ability to connect to the controller using IP over Ethernet. The most important tools in the toolkit are those which receive log messages, boot the controller, send arbitrary commands, and retrieve FITS images. Additional engineering tools exist to visualize and optimize noise performance and generate clocking patterns.

C. STARGRASP C Libraries

Each of the toolkit tools are built on five main C Libraries. Users wishing to replace the Demo Scripts, or make their own customized tools that work in a similar fashion to the toolkit level can build their own programs by using the APIs at this level and linking with these libraries. Some of the APIs at this level are still evolving, so we recommend using the Toolkit tools instead, if possible.

D. Controller Socket Commands

The STARGRASP C libraries must accomplish all controller communication through a TCP socket on the controller's port 915 (by default.) The majority of these commands are sent by using grasp_cmd() (the C function, or the toolkit tool.) grasp_cmd is a pass-through to the extensive list of commands that the controller supports at the socket level. For diagnostics, many of these commands can also be typed manually if a serial console is connected to the controller, and most can be sent interactively with a tool such as "telnet" or "nc". A command exists to control each analog and digital function of the controller.

E. Registers and Clocking Instructions

Registers and Clocking Instructions are the lowest level API, used only by someone adding a new controller socket level command. All controller socket level commands are implemented in C code (downloaded as the stage2.srec to the controller) which modifies registers or address space, and/or writes instructions to the clocking engine.

What's New in 4.00

The stargrasp-4.00 source tarball has been tested on Ubuntu 22.04 LTS, and should be usable both on earlier versions (down to 18.04, possibly earlier) and also the imminent 24.04 release. It should also build on MacOSX and most 32-bit and 64-bit Linux distributions, including Microsoft's WSL.

The 4.00 release mainly includes fixes to work with modern compiler suites, especially where fortran is concerned.

Many Linux distributions unfortunately do not come by default with development files necessary to build traditional Unix applications such as those based on libX11 and ncurses. You may also need to install compilers for C++ and FORTRAN to build the STARGRASP source code. Under CentOS, this is achieved by doing the initial install as a "development workstation." For ubuntu 22.04, the following were needed on a default "server" install:

sudo apt install autoconf g++ gfortran libasound2-dev libncurses5-dev librrd-dev libssl-dev libtool libx11-dev make pkgconf

Past releases were tested against Centos. However, since the decision to largely abandon the old model of following RHEL in favour of "Stream" (which tracks ahead of RHEL), there's been little to no interest in using this any more.

In the past, for RedHat-based Linux distributions not initially installed for software development, the following may have worked:

yum -y groupinstall 'Development Tools'
yum -y install gcc-gfortran # gfortran not necessarily included in dev tools package.
yum -y install libX11-devel
yum -y install rrdtool-devel
yum -y install glibc-static
yum -y install openssl-devel

Attachments