This is an old revision of the document!
When you loaded events into session with events/load and want to get selections please use events/get:
By time:
svc=events/get¶ms={"selector":{ "type":<text>, "expr":<text>, "timeFrom":<uint>, "timeTo":<uint>, "detalization":<uint> }, ... }
By index:
svc=events/get¶ms={"selector":[ { "type":<text>, "expr":<text>, "indexFrom":<uint>, "indexTo":<uint>, "detalization":<uint>, "filter1":<uint> }, ... ]}
Param | Description |
---|---|
type | sensor group: lls, trips, ignition, sensors, counters * (all groups) |
expr | intervals expression, it used instead of "type" param to get custom events intervals |
timeFrom | interval start, UNIX-time |
timeTo | interval end, UNIX-time |
detalization | output flags |
indexFrom | index of the first event requested |
indexTo | index of the last event requested |
filter1 | sensor ID |
Flag | Descrition |
---|---|
0x1 | Basic JSON: event start - event end |
0x2 | Specified detector data |
0x4 | User parameters (those which user stated for this event) |
0x10 | Full JSON. Every detector treats it its own way |
0x20 | Formatted value |
0x40 | grouping the intersections of intervals with tf и tt |
0x80 | add summary |
Reponse depends on type
specified.
Look at events/check_updates response.
To get custom events intervals use expression in "expr":<text> param instead type param.
Operator | Description | Example |
---|---|---|
& | AND | trips&ignition |
| | OR | trips|ignition |
~ | NOT | trips&~ignition |
[] | choise of sensor id | sensors[3], default first |
() | brackets | trips&~ignition&(~sensors[3]|sensors[5]) |
- | hyphenated custom interval | 1451953325-1451953525&trips&ignition |
{} | selection intervals by the value of detalization | trips{s<20}&ignition |
"selector": [ { "tf": <uint>, /* intersections interval, time from (unix time) */ "tt": <uint>, /* intersections interval, time to (unix time) */ "d": { "<type_name>":{ "<sensor_id>":[ { }, ] }, } }, ]
"selector":{ "<type_name>":{ "<sensor_id>":[ { }, ] }, }, "summary":{ "<type_name>":{ "<sensor_id>":{ "<summary_param_value>:<uint>", /* summary, different for different detectors */ } }
|