Unit has flag 0x400 which contains latest message and position of it. You can use search_items or update_data_flags with flags=0x1|0x400=1025(Decimal). Example of search_items params:
params={
"spec": {
"itemsType":"avl_unit", /* type of object to look for - unit */
"propName":"sys_name", /* search by name - "sys_name" */
"propValueMask":"*", /* asterisk means to find units with any names */
"sortType":"" /* empty value means to sort results by name */
},
"force":1, /* cache is not used */
"flags":1025, /* object flags to be returned */
"from":0, /* starting index for returning result */
"to":0 /* return maximum number of objects */
}
update_data_flags params example:
params={
"spec":[ /* array of requests to the server */
{
"type":"type", /* get objects by type */
"data":"avl_unit", /* type is set to "avl_unit" (so, get units) */
"flags":1025, /* get common information */
"mode":0 /* set flags */
}
]
}
Search_items always returns data, but update_data_flags should be called once and after you can get events at avl_evts request. In the documentation we have an example of Get Objects.
Mobile Development
Gurtam