04.01.2015 Views

CR1000 Manual - Campbell Scientific

CR1000 Manual - Campbell Scientific

CR1000 Manual - Campbell Scientific

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Section 8. Operation<br />

8.6.3.7.4 NewestFile Command<br />

path="CPU:lights-web.cr1"<br />

last_write="yyyy-mm-ddThh:mm:ss.xxx"<br />

size="16994"<br />

run_now="true"<br />

run_on_power_up="true"<br />

read_only="false"<br />

paused="false"/><br />

<br />

JSON Response<br />

When json is entered in the ListFiles format parameter, the response will be<br />

formated as CSIJSON (p. 68). Following is an example response.<br />

{<br />

}<br />

"files": [<br />

{<br />

"path": "CPU:",<br />

"is_dir": true,<br />

"size": 50000,<br />

"last_write": "yyyy-mm-ddThh:mm:ss.xxx",<br />

"run_now": false,<br />

"run_on_power_up": false,<br />

"read_only": false,<br />

"paused": false<br />

},<br />

{<br />

"path": "CPU:lights-web.cr1",<br />

"is_dir": false,<br />

"size": 16994,<br />

"last_write": "yyyy-mm-ddThh:mm:ss.xxx",<br />

"run_now": true,<br />

"run_on_power_up": true,<br />

"read_only": false,<br />

"paused": false<br />

},<br />

]<br />

NewestFile allows a web client to request a file, such as a program or image, from<br />

the host <strong>CR1000</strong>. If a wildcard (*) is included in the expression, the most recent<br />

in a set of files whose names match the expression is returned. For instance, a<br />

web page may be designed to show the newest image taken by a camera attached<br />

to the <strong>CR1000</strong>. NewestFile takes the form:<br />

http://192.168.13.154/command=NewestFile&expr=drive:filename.ex<br />

t<br />

Where filename can be a wildcard (*).<br />

NewestFile requires a minimum .csipasswd access level of 3 (read only) for all<br />

files except program files. Program files require access level 1 (all access<br />

allowed).<br />

398

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!