PVM plugins now have access to the device telemetry. Thus the very common task for detecting parameter value change can now be easily solved with the following PVM code:
if optional #engine.ignition.status != optional telemetry[#engine.ignition.status]:
// param in the message is not equal to its last known value
true ==> #engine.ignition.changed
Here is an advanced example demonstrating check for the message timestamp, required if your device can send messages from the black box/history:
if is_set #engine.ignition.status && optional telemetry[#engine.ignition.status].timestamp < #timestamp:
// we have "engine.ignition.status" parameter in current "fresh" message (not from black box)
if #engine.ignition.status != telemetry[#engine.ignition.status]:
// param in the message is not equal to its last known value
true ==> #engine.ignition.changed
And here are few more examples of the device telemetry access syntax:
telemetry["driver.message"] ==> ... // param name can be a string
telemetry[$param_name] ==> ... // param name can be a variable
telemetry[#driver.message, boolean] ==> ... // return value type override
telemetry[$param_name].timestamp ==> ... // time of the last parameter value