In modules/telemetry/v1/block.py, the version and src_addr fields in PacketHeader should be constructed using the enums for packet versions and device addresses.
This will validate fields instead of having plain integers which could contain erroneous values (1000 for source address).
As always, tests may need to be updated to reflect this changes.
Packet header field versions will be checked against the range of valid versions in this pr. We also don't currently use src_addr anywhere, should it even be kept?
Packet header field versions will be checked against the range of valid versions in this pr. We also don't currently use src_addr anywhere, should it even be kept?
Source address must be kept since it is a packet field.
In modules/telemetry/v1/block.py, the
version
andsrc_addr
fields inPacketHeader
should be constructed using the enums for packet versions and device addresses.This will validate fields instead of having plain integers which could contain erroneous values (1000 for source address).
As always, tests may need to be updated to reflect this changes.