In this chapter, all formats of messages are described. Messages of a specified type can be requested using flags (see their list below):
Messages types:
Flag | Description |
---|---|
Unit messages | |
0x0000 | messages with data |
0x0100 | SMS |
0x0200 | command |
0x0600 | event |
Resource messages | |
0x0300 | notification |
0x0500 | billing message |
0x0900 | SMS for driver |
Log | |
0x1000 | Log messages |
In order to delete specific messages you must have the following ACL-flags:
What to delete | Message flag | ACL-flag |
---|---|---|
Data message | 0x0000 | 0x800000 |
SMS | 0x0100 | 0x800000 |
Command | 0x0200 | 0x800000 |
Event | 0x0600 | 0x2000000 |
Log | 0x1000 | 0x800 |
More info you can get from ACL-flags.
Flag - 0x0000
{ "t":<uint>, /* message time (UTC) */ "f":<uint>, /* flags (see below)*/ "tp":"ud", /* message type (ud - message with data) */ "pos":{ /* position */ "y":<double>, /* latitude */ "x":<double>, /* longitude */ "z":<int>, /* altitude */ "s":<uint> /* speed */ "c":<uint>, /* course */ "sc":<ubyte> /* satellites count */ }, "i":<uint>, /* input data */ "o":<uint>, /* output data */ "p":{ /* parameters */ <text>:<double>, ... } }
Flags of messages with data:
Value | Description |
---|---|
0x01 | position information is available |
0x02 | input data information is available |
0x04 | output data information is available |
0x08 | state information is available |
0x10 | message contains alarm bit |
0x20 | message contains information about driver code |
Flag - 0x0100
{ "t":<uint>, /* message time (UTC) */ "f":<uint>, /* flags: SMS messages has no flags, therefore 0 will be placed */ "tp":"us", /* message type (us - SMS message) */ "st":<text>, /* text of message */ "mp":<text>, /* modem phone number */ "p":{} /* parameters */ }
Flag - 0x0200
{ "t":<uint>, /* message time (UTC) */ "f":<uint>, /* flags: messages with commands has no flags, therefore 0 will be placed */ "tp":"ucr", /* message type (ucr - command) */ "ca":<text>, /* command name */ "cn":<text>, /* command type */ "cp":<text>, /* command parameters */ "ui":<uint>, /* user ID */ "ln":<text>, /* link name */ "lt":<text>, /* link type */ "et":<uint>, /* execution time */ "p":{} /* parameters */ }
Link types are described i chapter Commands: create, edit, delete.
Flag - 0x0600
{ "t":<uint>, /* message time (UTC) */ "f":<uint>, /* flags (see below) */ "tp":"evt", /* message type (evt - event) */ "et":<text>, /* text of event */ "x":<double>, /* longitude */ "y":<double>, /* latitude */ "p":{} /* parameters */ }
Event flags:
Value | Description |
---|---|
0x0 | simple event |
0x1 | violation |
0x2 | maintenance event |
0x4 | route control event |
0x10 | is set in addition to flag 0x2: maintenance is registered |
0x20 | is set in addition to flag 0x2: registered filling |
Flag - 0x0300
{ "t":<uint>, /* message time (UTC) */ "f":<uint>, /* flags: messages with notifications has no flags, therefore 0 will be placed */ "tp":"xx", /* message type */ "p":{} /* parameters */ }
Flag - 0x0500
{ "t":<uint>, /* message time (UTC) */ "f":<uint>, /* flags: 0x1 - is set when message contains information about payment */ "tp":"xx", /* message type */ "p":{} /* parameters */ }
Flag - 0x0900
{ "t":<uint>, /* message time (UTC) */ "f":<uint>, /* flags: 0x1 - is set when message is sent */ "tp":"xx", /* message type */ "p":{ /* parameters */ "phone":<text>, /* phone number */ "sms_text":<text>, /* sms text */ "driver_name":<text>, /* driver name */ "driver_id":<uint> /* driver ID */ } }
Flag - 0x1000
{ "t":<uint>, /* message time (UTC) */ "f":4096, /* flags: 4096 - log messages */ "tp":"xx", /* message type */ "p":{ /* parameters */ "user":<text>, /* user name */ "action":<text>, /* action */ "host":<text>, /* host */ "p1":<text>, /* parameters */ ... } }
|