Differences

This shows you the differences between two versions of the page.

Link to this comparison view

en:local:remoteapi1504:apiref:messages:load_interval [20/05/2014 11:49]
en:local:remoteapi1504:apiref:messages:load_interval [20/05/2014 11:49] (current)
Line 1: Line 1:
 +====== Load messages for interval ======
  
 +To load messages for some interval, use the command **messages/​load_interval**: ​
 +<code javascript>​
 +svc=messages/​load_interval&​params={"​itemId":<​long>,​
 +    "​timeFrom":<​uint>,​
 +    "​timeTo":<​uint>,​
 +    "​flags":<​uint>,​
 +    "​flagsMask":<​uint>,​
 +    "​loadCount":<​uint>​}
 +</​code>​
 +
 +:!: Сurrent request can't be executed simultaneously with following requests:
 +  * [[../​report/​exec_report|report/​exec_report]],​
 +  * [[../​report/​export_result|report/​export_result]],​
 +  * [[../​report/​get_result_chart|report/​get_result_chart]],​
 +  * [[../​report/​get_result_map|report/​get_result_map]],​
 +  * [[../​render/​create_messages_layer|render/​create_messages_layer]],​
 +  * [[../​unit/​get_trips|unit/​get_trips]],​
 +  * [[../​resource/​get_driver_bindings|resource/​get_driver_bindings]],​
 +  * [[../​resource/​get_trailer_bindings|resource/​get_trailer_bindings]],​
 +  * all requests from chapter [[../​exchange/​exchange]],​
 +  * [[../​account/​get_account_history|account/​get_account_history]].
 +
 +:!: You can find an example of this request in the sample [[../​../​codesamples/​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 =====
 +<​code=javascript>​
 +{
 + "​count":<​uint>,​ /​* messages count */
 + "​messages":​[ /​* array of messages */
 + {
 + ...
 + }
 + ]
 +}
 +</​code>​
 +
 +You can find message formats in the chapter [[../​format/​messages | Data format: Messages]].
Follow us on Facebook Gurtam Wialon Twitter Gurtam Wialon info@gurtam.com   |   Copyright © 2002-2024 Gurtam