1

Messages with filteration

(edited by hhamedk 26/07/2021 17:58:29)

Topic: Messages with filteration

Hi GT

As for getting messages for a time interval I call:

svc=messages/load_interval&params={"itemId":XXX,"timeFrom":1626554699,"timeTo":1626557699,"flags":0,"flagsMask":65280,"loadCount":4294967295}

and then:

svc=messages/get_messages&params={"indexFrom":1,"indexTo":XXX,"filter":"pos.x,pos.y","flags":0,"flagsMask":65280,"loadCount":4294967295}

I need to get all messages for a period and then only have Time and X and Y. Please let me know if I am using the correct procedure?

In messages/get_messages I have used the same flags and flagsMask as messages/load_interval, Is it correct?

Can't I use messages/get_messages and get messages without calling messages/load_interval?

I have used "filter":"pos.x,pos.y" but still we receive below parameters for each message:

    {
        "t": 1626554758,
        "f": 1073741825,
        "tp": "ud",
        "pos": {
            "y": 35.7346233,
            "x": -5.8214516
        },
        "lc": 0,
        "rt": 1626554803,
        "p": {}

How can I get ONLY Time, X and Y?

2

Messages with filteration

Re: Messages with filteration

Hi Hamed!

you do everything is correct.

In messages/get_messages I have used the same flags and flagsMask as messages/load_interval, Is it correct?

you can skip "flags":0,"flagsMask":65280,"loadCount":4294967295 parameters, just specify "indexFrom":1,"indexTo":XXX,"filter"
Please note the messages index starts from 0

Can't I use messages/get_messages and get messages without calling messages/load_interval?

No, it needs to load messages to messages loader, so first you need to execute request messages/load_last or messages/load_interval

I have used "filter":"pos.x,pos.y" but still we receive below parameters for each message:.....
How can I get ONLY Time, X and Y?

The following parameters - "t" (time), 'f' (flags), "tp" (type), 'rt' (registration time), 'lc' (lbs checksum)  are default , and cannot be filtered.
You can filter only parameters from  'pos' and 'p'

Diana Cheley
Wialon Hosting Expert
Gurtam