Allow ability to assign offset from an input register address
Use Case
Some devices, specifically SEL, assign a value (0 or 1) within bitmaps on a given input register. So, without having to do additional parsing using other plugins, the preferred method would be able to obtain the values directly.
Example: Input register address:3 with an offset of 2 represents the state of LED_1.
Expected behavior
Currently, config allows for something like this: { address=3, name="power", type="UINT32" }
Would like for config to allow for something like this: { address=3, offset=2, name="LED_1", type="BIT" }
Actual behavior
The whole bitmap array is returned with a non-useful value, without further parsing of the binary.
Additional info
This has been initially discussed on Slack with Sven and Hipska.
Thanks for feature request and working with Sven on understanding the issue further.
next steps: Look into how to define this further in the config and investigate impact on overlapping addressing messaging that exists today. This would most likely only get added to the new addressing styles.
Any updates or planned timing for this?
@cfitzw sorry for the late response! Please test the binary in PR #15648, available as soon as CI finished the tests, and let me know if this solves the issue! You need to use the BIT datatype and set the bit setting to the correct value. Zero is the LSB.
@srebhan I was able to pull the binaries from #15648 into my container and successfully retrieve data for individual bits,as expected, on multiple devices.
This is a game changer and I hope it helps with further adoption, as this was a major piece for us. Looking forward to merge.