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 3.04

The stargrasp-3.04 source tarball has been tested on Ubuntu 14.04LTS (desktop, amd64) and should also build on MacOSX and most 32-bit and 64-bit Linux distributions. Here is a quick summary of what's been done between 3.03 and 3.04:

  • Tweak CCID20 "safe" voltages to allow DR of 21V (with a warning.)
  • Fix "successfully powered ON" message when actually powering OFF.
  • In grasp_save_ccid20, add MJD-OBS, and shutter UTC+MJD close/open times.
  • In grasp_save_ccid20, move DARKTIME to the primary header unit.
  • Fix some small compilation problems on Centos 6.4 (-lcrypt, ulong).
  • More updates to daqsim, include command queue code from the real thing.
  • GPC2 otatool updates, CCID71 support, and grasp_save_ota TDI mode fix.
  • Noisetone compiles again, but may only be working on Linux at the moment.

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 14.04, the following were needed on a default "desktop" install:

sudo apt-get install g++
sudo apt-get install gfortran
sudo apt-get install libncurses5-dev
sudo apt-get install libx11-dev
sudo apt-get install libasound2-dev
sudo apt-get install librrd-dev

For RedHat-based Linux distributions not initially installed for software development, the following may work:

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

Attachments