rscada / libmbus

Meter-bus library and utility programs
http://www.rscada.se/libmbus
BSD 3-Clause "New" or "Revised" License
217 stars 137 forks source link

Implement type I CP48 (date and time) #111

Closed lategoodbye closed 7 years ago

lategoodbye commented 7 years ago

This pull requests fixes the year handling and also implement type I decoding (6 byte, Cp48) for date/time values. This should fix issue #110 .

Rico-van-Dongen commented 7 years ago

I think this is OK to merge. I’m not sure if E011 0000 Start (date/time) of tariff and E111 0000 Date and time of battery change can also be send as CP48. This should be documented in EN13757-3. However, it seems unlikely that a sensor will use these vif and vife combinations and intend it to be a regular 6 byte integer. Thanks for adding the test frame as well.

Rico-van-Dongen commented 7 years ago

Thanks for the merge. The gas meter is working perfectly now.