User Tools

Site Tools


doc:grb_scripts

This is an old revision of the document!


GRB scripting

Scripting informations are stored in table grb_script. Here is sample output:

stars= SELECT * FROM grb_script;
 camera_name | grb_script_end | grb_script_script 
-------------+----------------+-------------------
 C5          |            600 | F 2 E 20
 C5          |                | F 2 E 60 F 4 E 60
 C4          |            600 | E 30
 C4          |                | E 60
 C6          |            600 | F 2 E 20
 C6          |                | F 2 E 60 F 4 E 60
 C7          |            600 | F 2 E 20
 C7          |                | F 2 E 60 F 4 E 60
  • camera_name hold name of camera. It must reference to cameras table.
  • grb_script_end is time after GRB when this script will NOT be used. If it's NULL, this is default script. 600 in this field means that script will be used up to 600 seconds (10 minutes) after GRB trigger. After this time, script with bigger number in grb_script_end, or grb_script_end left NULL, will be used
  • grb_script_script is script to be executed. Plese refer to man rts2.script for details.

If you would like to modify this table, the easiest approach is to use pg-dump

user@host:~$ pg_dump -t grb_script stars > grb_script
user@host:~$ editor grb_script

edit grb_script so it contains only lines similar to the example bellow:

COPY grb_script (camera_name, grb_script_end, grb_script_script) FROM stdin;
C5      600     F 2 E 20
C5      \N      F 2 E 60 F 4 E 60
C4      600     E 30
C4      \N      E 60
C6      600     F 2 E 20
C6      \N      F 2 E 60 F 4 E 60
C7      600     F 2 E 20
C7      \N      F 2 E 60 F 4 E 60
\.

Please bear in mid that there MUST be tabulator between entries (after C5 and 600 in the example above). Edit those lines, particularly scripts, add new lines, and send the file back to psql

user@host:~$ psql stars < grb_script
doc/grb_scripts.1237933626.txt.gz · Last modified: 2009/03/24 00:00 (external edit)