To load messages for some interval, use the command messages/load_interval:
svc=messages/load_interval¶ms={"itemId":<long>, "timeFrom":<uint>, "timeTo":<uint>, "flags":<uint>, "flagsMask":<uint>, "loadCount":<uint>}
Сurrent request can’t be executed simultaneously with following requests:
- report/exec_report,
- report/export_result,
- report/get_result_chart,
- report/get_result_map,
- render/create_messages_layer,
- unit/get_trips,
- resource/get_driver_bindings,
- resource/get_trailer_bindings,
- all requests from chapter Export and import,
- account/get_account_history.
You can find an example of this request in the sample Messages.
Parameters
Name | Description |
---|---|
itemId | unit or resource ID (depends on type of message you want to get) |
timeFrom | interval beginning |
timeTo | interval end |
flags | flags for loading messages (see below) |
flagsMask | mask (see below) |
loadCount | how many messages to return (0xffffffff – all found) |
Examples of mask and flags usage:
Mask | Flag | Result |
---|---|---|
0xFF00 | 0x0000 | all messages with data |
0xFF10 | 0x0010 | messages with data, which contain alarm bit |
0xFFF0 | 0x0010 | messages with data, which contain alarm bit(0x10), but dont’t contain info about driver code(0x20) |
0xFFF2 | 0x0022 | messages with data, which contain info about driver code(0x20) and in which input data information is available(0x02), but these messages don’t contain alarm bit(0x10) |
0xFF01 | 0x0601 | events, which are violations |
Response
{ "count":<uint>, /* messages count */ "messages":[ /* array of messages */ { ... } ] }
You can find message formats in the chapter Data format: Messages.