doc:grb_scripts
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
doc:grb_scripts [2009/03/24 22:35] – created pkubanek | doc:grb_scripts [Unknown date] (current) – external edit (Unknown date) 127.0.0.1 | ||
---|---|---|---|
Line 17: | Line 17: | ||
</ | </ | ||
- | * **camera_name** hold name of camera. It must reference to //cameras// table. | + | * **camera_name** hold name of camera. It must reference to //cameras// table. Usually you will encounter only single camera in the system, which will be called **C0**. |
* **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**, | * **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**, | ||
Line 30: | Line 30: | ||
</ | </ | ||
- | edit grb_script so it contains only those lines: | + | edit grb_script so it contains only lines similar to the example bellow: |
<code slq> | <code slq> | ||
Line 45: | Line 45: | ||
</ | </ | ||
- | edit those lines, particularly scripts, and send file back to psql | + | 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 |
<code bash> | <code bash> | ||
user@host: | user@host: | ||
</ | </ | ||
+ | |||
+ | ===== Updating by using psql ===== | ||
+ | //The following is added by someone learning the system and is not official:// | ||
+ | |||
+ | Since the grb_script table in the stars database is properly set to have the constrain of being UNIQUE, if the method described above is attempted for updating the script psql will refuse to add it again and will output among other things: | ||
+ | <code bash> | ||
+ | ERROR: | ||
+ | </ | ||
+ | This can be circumvented by simply using psql to edit the table. | ||
+ | <code bash> | ||
+ | user@host: | ||
+ | stars=> UPDATE grb_script SET grb_script_script = ' | ||
+ | stars=> INSERT INTO grb_script VALUES (' | ||
+ | stars=> UPDATE grb_script SET grb_script_script = ' | ||
+ | </ | ||
+ | |||
+ | Note that: | ||
+ | - The first command will update what camera C5 will do until 10 minutes | ||
+ | - The second command will insert the previously undefined behaviour for C5 that will happen until 300 seconds | ||
+ | - And the third will update that which will be done after all other defined behaviours. Note that for this case the column is not search by a literal expression like ' |
doc/grb_scripts.1237930510.txt.gz · Last modified: 2009/03/24 00:00 (external edit)