2 clockcheck command – Campbell Scientific CR1000 Measurement and Control System User Manual
Page 389

Section 8. Operation
389
JSON Response
When
json
is entered in the ClockSet
format
parameter, the response will be
formated as CSIJSON
(p. 68).
Following is an example response.
{"outcome": 1,"time": "2011-12-01T11:40:32.61","description": "
The clock was set"}
8.6.3.6.2 ClockCheck Command
ClockCheck allows a web client to read the real-time clock from the host
CR1000. DataQuery takes the form:
http://ip_address/?command=ClockCheck&format=html
ClockCheck requires a minimum .csipasswd access level of 3 (read-only
)
.
Table 99. ClockCheck API Command Parameters
uri
If this parameter is excluded, or if it is set to "datalogger"
(uri=dl) or an empty string (uri=), the host CR1000 real-time
clock is returned.
1
format
Specifies the format of the response. The values html, json, and
xml are recognized. If this parmeter is omitted, or if the value is
html, empty, or invalid, the response is HTML.
1
optionally specifies the URI for a LoggerNet source station to be checked
Example:
http://192.168.24.106/?command=ClockCheck&format=html
Response: checks the host CR1000 real time clock and requests
the response be an HTML table.
ClockCheck Response
The ClockCheck
format
parameter determines the format of the response. If a
format is not specified, the format defaults to HTML. For more detail concerning
data response formats, see the Data File Formats
section.
Responses contain three fields as described in the following table:
Table 100. ClockCheck API Command Response
outcome
Codes that specifies the outcome of the ClockCheck command.
Codes in grey text are not valid inputs for the CR1000:
1 — The clock was checked
2 — The clock was set
1
3 — The LoggerNet session failed
4 — Invalid LoggerNet logon
5 — Blocked by LoggerNet security
6 — Communication with the specified station failed
7 — Communication with the specified station is disabled
8 — Blocked by datalogger security
9 — Invalid LoggerNet station name
10 — The LoggerNet device is busy
11 — The URI specified does not reference a LoggerNet station.