Dear PLC4X followers,
I would like to bring back 3 year old discussion we had on stuff related
to "source time", but not only:
https://lists.apache.org/thread/r3g4y6p7kst7z5bdpmccd8538h3hl80f
The "metadata" term was coined by Ben, kudos for him! :)
For these who missed earlier topic - it was an inquiry of how to acquire
source time for plc values returned by our API. Because this kind of
features is not always present in protocols at the time it was brought,
it was heavily influenced by OPC-UA. For OPC-UA it comes from
application layer, thus we can (relatively easily) propagate it from
driver to our API callers.
Over time we got another case. We have a transport which can do similar
- CAN, if used with socketcan, can provide message level metadata. The
most common metadata there is hardware or software level timestamp of
message. First comes from microcontroller which deals with CAN
transceiver, second one is (AFAIK) assumed at driver level.
Reason why I bring this topic back is plain - we miss API for "source
time", and I would like to bring implement it. I know this idea got
stuck before because of driver level differences and multiple languages.
To be clear - I intend to bring this only for java, because this is
where we have functioning OPC-UA and CAN drivers. Other languages, as
far I know, do not have these, hence benefit of new API there is
non-existent.
This topic was partially touched when we meet in Frankfurt to discuss
1.0 and expected/speculated API changes we are aware of. Given that we
are still before 1.0 release, and new features interesting for 1.0 (i.e.
subscription emulation) might benefit from it I would personally
prioritize this work over other.
Given that we might have metadata for two levels - entire response as
well as individual field/event I wish to provide metadata API for both.
Primary objective for both places is making it possible to enumerate all
available metadata keys (if any), or lookup by predefined key (i.e.
timestamp), as well as let drivers easily define their own metadata keys.
Let me know if you have any notes, intent or suggestions for this API.
Cheers,
Łukasz