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 />

JSON Response<br />

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

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

{"outcome": 1,"time": "2011-12-01T11:40:32.61","description": "<br />

The clock was set"}<br />

8.6.3.6.2 ClockCheck Command<br />

ClockCheck allows a web client to read the real-time clock from the host<br />

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

http://ip_address/command=ClockCheck&format=html<br />

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

Table 99. ClockCheck API Command Parameters<br />

uri<br />

format<br />

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

(uri=dl) or an empty string (uri=), the host <strong>CR1000</strong> real-time<br />

clock is returned. 1<br />

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

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

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

1 optionally specifies the URI for a LoggerNet source station to be checked<br />

Example:<br />

http://192.168.24.106/command=ClockCheck&format=html<br />

Response: checks the host <strong>CR1000</strong> real time clock and requests<br />

the response be an HTML table.<br />

ClockCheck Response<br />

The ClockCheck format parameter determines the format of the response. If a<br />

format is not specified, the format defaults to HTML. For more detail concerning<br />

data response formats, see the Data File Formats section.<br />

Responses contain three fields as described in the following table:<br />

Table 100. ClockCheck API Command Response<br />

outcome<br />

Codes that specifies the outcome of the ClockCheck command.<br />

Codes in grey text are not valid inputs for the <strong>CR1000</strong>:<br />

1 — The clock was checked<br />

2 — The clock was set 1<br />

3 — The LoggerNet session failed<br />

4 — Invalid LoggerNet logon<br />

5 — Blocked by LoggerNet security<br />

6 — Communication with the specified station failed<br />

7 — Communication with the specified station is disabled<br />

8 — Blocked by datalogger security<br />

9 — Invalid LoggerNet station name<br />

10 — The LoggerNet device is busy<br />

11 — The URI specified does not reference a LoggerNet station.<br />

389

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

Saved successfully!

Ooh no, something went wrong!