User Tools

Site Tools


code:json

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revisionBoth sides next revision
code:json [2016/11/28 02:35] – added information on a couple more commands jtellocode:json [2017/01/19 19:17] jtello
Line 3: Line 3:
  
 |change_constraints|change_script|[[#cmd]]|cnst_alt|cnst_alt_v| |change_constraints|change_script|[[#cmd]]|cnst_alt|cnst_alt_v|
-|cnst_time|consts|create_target|dec|devbytype|+|cnst_time|consts|create_target|dec|[[#devbytype]]|
 |deviceinfo|[[#devices]]|executor|expose|get| |deviceinfo|[[#devices]]|executor|expose|get|
-|hasimage|inc|labellist|labels|lastimage|+|hasimage|inc|labellist|labels|[[#lastimage]]|
 |messages|night|obytid|plan|runscript| |messages|night|obytid|plan|runscript|
-|satisfied|script|selval|[[#set]]|status|+|satisfied|script|selval|[[#set]]|[[#status]]|
 |sunalt|taltitudes|tbydistance|tbyid|tbylabel| |sunalt|taltitudes|tbydistance|tbyid|tbylabel|
 |tbyname|tbystring|tlabs_add|tlabs_delete|tlabs_set| |tbyname|tbystring|tlabs_add|tlabs_delete|tlabs_set|
 |[[#update_target]]|violated| |[[#update_target]]|violated|
  
 +Info about them can be figured out from the relevant code:
  
 +[[https://github.com/RTS2/rts2/blob/master/src/httpd/httpd.cpp|httpd.cpp]] and [[https://github.com/RTS2/rts2/blob/master/src/httpd/api.cpp|api.cpp]]
 +[[https://github.com/RTS2/rts2/blob/master/python/rts2/json.py|json.py]]
  
 ====== cmd ====== ====== cmd ======
Line 20: Line 23:
 note the URL code %20 is used to pass on the space between the command and the parameters. note the URL code %20 is used to pass on the space between the command and the parameters.
  
 +
 +====== devbytype ======
 +This will list the devices by type with the modifier being an interger t:
 +for example:
 +  http://observatoryserver/apipath/devbytype?t=2
 +will output mounts attached to this rts2 instance.
 +
 +2: mounts, 3: cameras, 4: domes, 
  
 ====== devices ====== ====== devices ======
 This will list the devices connected to rts2 This will list the devices connected to rts2
 +
 +====== lastimage ======
 +This theoretically tells you which was the last image to be taken. Using the modifier 'ccd'
 +However if this fails (claims not a single image has been taken) 
 +Looking at the status of the camera device will often state the last_image as a value.
 +
  
 ====== set ====== ====== set ======
 This will allow you to set values in rts2 devices. Modifiers are: This will allow you to set values in rts2 devices. Modifiers are:
 'd': device, 'n': name, 'v': value, 'async': async 'd': device, 'n': name, 'v': value, 'async': async
 +
 +====== status ======
 +This will give the values of a specific module. Known modifier is: 'd': device
  
  
code/json.txt · Last modified: 2017/02/07 00:00 (external edit)