3 |
5 |
See also [wiki:GraspSwCommandSyntax Command syntax notes] |
4 |
6 |
These are the five layers of interfaces to the STARGRASP controller system. Each is built on only the next lower layer: |
5 |
7 |
A. [wiki:GraspSwDemoScripts Demo Scripts] |
6 |
8 |
Our example/template script commands run on the STARGRASP pixel server. |
7 |
9 |
They are implemented in Bourne Shell and are primarily for |
8 |
10 |
demonstration -- a suggested way to integrate a camera |
9 |
11 |
or set of detectors controlled by STARGRASP into a larger system. |
10 |
12 |
The scripts use toolkit level commands, described below, |
11 |
13 |
to control a group of controller boardsets. |
12 |
14 |
B. [wiki:GraspSwToolkit Toolkit Level] |
13 |
15 |
The STARGRASP toolkit consists of C programs which a user or |
14 |
16 |
script can invoke on the pixel server host. Toolkit programs |
15 |
17 |
can be invoked on any host with the ability to connect to the |
16 |
18 |
controller using IP over Ethernet. The most important tools |
17 |
19 |
in the toolkit are those which receive log messages, boot the |
18 |
20 |
controller, send arbitrary commands, and retrieve FITS images. |
19 |
21 |
Additional engineering tools exist to visualize and optimize |
20 |
22 |
noise performance and generate clocking patterns. |
21 |
23 |
C. [wiki:GraspSwClibraries STARGRASP C Libraries] |
22 |
24 |
Each of the toolkit tools are built on five main C Libraries. |
23 |
25 |
Users wishing to replace the Demo Scripts, or make their own |
24 |
26 |
customized tools that work in a similar fashion to the |
25 |
27 |
toolkit level can build their own programs by using the |
26 |
28 |
APIs at this level and linking with these libraries. Some |
27 |
29 |
of the APIs at this level are still evolving, so we recommend |
28 |
30 |
using the Toolkit tools instead, if possible. |
29 |
31 |
D. [wiki:GraspSwControllerCmd Controller Socket Commands] |
30 |
32 |
The STARGRASP C libraries must accomplish all controller |
31 |
33 |
communication through a TCP socket on the controller's |
32 |
34 |
port 915 (by default.) The majority of these commands are sent |
33 |
35 |
by using grasp_cmd() (the C function, or the toolkit tool.) |
34 |
36 |
grasp_cmd is a pass-through to the extensive list of commands |
35 |
37 |
that the controller supports at the socket level. For diagnostics, |
36 |
38 |
many of these commands can also be typed manually if a serial |
37 |
39 |
console is connected to the controller, and most can be sent |
38 |
40 |
interactively with a tool such as "telnet" or "nc". A command |
39 |
41 |
exists to control each analog and digital function of the controller. |
40 |
42 |
E. [wiki:GraspSwRegisters Registers and Clocking Instructions] |
41 |
43 |
Registers and Clocking Instructions are the lowest level API, |
42 |
44 |
used only by someone adding a new controller socket level command. |
43 |
45 |
All controller socket level commands are implemented in C code |
44 |
46 |
(downloaded as the stage2.srec to the controller) which modifies |
45 |
47 |
registers or address space, and/or writes instructions to the |
46 |
48 |
clocking engine. |