Open
Description
Set explicit dpt numbers for all DPT transcoder definitions and eliminate the need for DPTBase.has_distinct_dpt_numbers()
(and possibly has_distinct_value_type()
)
DPTs to refactor to achieve this:
- DPT 3 (all)
- 10 - Date
- 11 - Time
- 19 - DateTime
Further set up a unittest to avoid new DPT definitions to break this behaviour - eg. don't have explicit dpt_sub_number
set (dpt_main_number
may be inherited) and to not have base classes in the lookup tree.
assert [
c for c in DPTBase.__recursive_subclasses__() if c.has_distinct_dpt_numbers()
] == [c for c in DPTBase.__recursive_subclasses__()]