04.01.2015 Views

CR1000 Manual - Campbell Scientific

CR1000 Manual - Campbell Scientific

CR1000 Manual - Campbell Scientific

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Section 8. Operation<br />

FileControl Response<br />

All output formats contain the following parameters. Any action (for example, 9)<br />

that performs a reset, the response is returned before the effects of the command<br />

are complete.<br />

Table 103. FileControl API Command Response<br />

outcome<br />

holdoff<br />

description<br />

A response of zero indicates success. Non-zero indicates failure.<br />

Specifies the number of seconds that the web client should wait<br />

before attempting more communication with the station. A value<br />

of zero will indicate that communication can resume<br />

immediately. This parameter is needed because many of the<br />

commands will cause the <strong>CR1000</strong> to perform a reset. In the case<br />

of sending an operating system, it can take tens of seconds for<br />

the datalogger to copy the image from memory into flash and to<br />

perform the checking required for loading a new operating<br />

system. While this reset is under way, the <strong>CR1000</strong> will be<br />

unresponsive.<br />

Detail concerning the outcome code.<br />

Example:<br />

192.168.24.106/command=FileControl&action=4&file=cpu:davetest.c<br />

r1<br />

Response: delete the file davetest.cr1 from the host <strong>CR1000</strong><br />

CPU: drive.<br />

When html is entered in the FileControl format parameter, the response will be<br />

HTML. Following is an example response.<br />

8.6.3.7.3 ListFiles Command<br />

ListFiles allows a web client to obtain a listing of directories and files in the host<br />

<strong>CR1000</strong>. ListFiles takes the form:<br />

http://ip_address/drive/command=ListFiles<br />

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

Table 104. ListFiles API Command Parameters<br />

format<br />

uri<br />

Specifies the format of the response. The values html, json, and<br />

xml are valid. If this parameter is omitted, or if the value is<br />

html, empty, or invalid, the response is HTML.<br />

If this parameter is excluded, or if it is set to "datalogger"<br />

(uri=dl) or an empty string (uri=), the file system will be sent<br />

from the host <strong>CR1000</strong>. 1<br />

1 Optionally specifies the URI to a LoggerNet datalogger station from which the file list will be<br />

retrieved.<br />

394

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

Saved successfully!

Ooh no, something went wrong!