This is a two-fold question relating to trended parameters:
In what order are parameter values updated in a connector?
- New value retrieved from device is inserted into the database then read and presented to user in an element card for example.
- New value presented to user in element card then value inserted into the database afterwards.
If I have a visual cue in an element card that a parameter is being updated (i.e. values are changing) but on querying the database the values are not present, what is this an indication of ? or this is a wrong supposition altogether.
Hi Wale,
This happens asynchronously, meaning both actions are being handled by different threads without synchronizing.
When a parameter value is changed, it is forwarded to a queue in SLElement. Then, a thread in SLElement will pick it up and update the internal value, alarms, etc, and notify both SLDataGateway, and SLNet. Both processes then handle this parameter change at their own pace.
Note that the different databases have different implementations in SLDataGateway in regards of caching data temporarily before it is being flushed to the database. So there may be some delay before the value becomes available when querying the database.