Closed troky closed 4 years ago
Thats a good point. I remember that years ago I stumbled over this too and checked the vscp-firmware and vscp sources, but there was no exception implemented for 0xFF. So I followed them.
The specification on the DM says:
The zone and use sub-zone bits can be activated to have a check on the zone/sub-zone information of an event. That is the zone/sub-zone of the machine must match the one of the event to trigger the DM row. Bits 0/1 are the ninth bit of the filter/mask not enable bits.
Anyway I think you are right. I will update the sources.
Documentation says that if event is for zone/subzone 0xFF it should apply for all zones/subzones.
Question is: should DM ignore VSCP_DM_FLAG_MATCH_ZONE/VSCP_DM_FLAG_MATCH_SUB_ZONE flags and accept event if zone/subzone is set to 0xFF or that should be done by user?
Something like: https://github.com/BlueAndi/vscp-framework/blob/c2227b9b23b08ddba517bef273aed5aec05ce859/vscp/vscp_dm.c#L410 to look like:
... and the same for subzone check.