To load events for a specified period into session for later processing please use events/load:
svc=events/load¶ms={"itemId":<long>, "ivalType":<int>, "timeFrom":<uint>, "timeTo":<uint>, "detectors":[ { "type":<text>, "filter1":<uint> }, ... ], "selector": {....} }
Param | Description |
---|---|
itemId | unit id |
ivalType | algorithm type (see below) |
timeFrom | interval start, UNIX-time |
timeTo | interval end, UNIX-time |
type | sensors group: lls, sensors, ignition, trips (see here) |
filter1 | sensor id, 0 - add all sensors according to selected type |
selector | selector |
Using signature with optional selector
param is like using both events/load (without selector
) and events/get.
If you need to load another pack of events into session please use events/unload first and then execute this method once more.
Value | Description |
---|---|
1 | history request from timeFrom to timeTo |
2 | history request of timeFrom number of events from timeTo (forward) |
3 | history request of timeFrom number of events from timeTo (backward) |
4 | history request from timeFrom to timeTo plus one message (event) before timeFrom |
5 | history request from timeFrom to timeTo plus one message (event) after timeTo (new mode) |
6 | history request from timeFrom to timeTo plus one message (event) before timeFrom and one message after timeTo (new mode) |
{ "events":{ "counters":{ "0":<uint> /* number of events - counter value updates in history request */ }, "ignition":{ "<sensor_id1>":<uint>, /* number of events in history request for specified sensor */ ... }, "lls":{ "<sensor_id2>":<uint>, /* number of events in history request for specified sensor */ ... }, "sensors":{ "<sensor_id3>":<uint>, /* number of events in history request for specified sensor */ ... "trips":{ "0":<uint> /* number of events in history request for trips */ } }, "selector":[ { ... }, /* selection results, if selector param was skipped then {}; look at server response in events/get */ ... ] }
|