I realised my implementation of the event filters could be slightly improved – the InstanceEventFilter enum is an IntEnum, so it makes sense for the SetEventFilters sequence to be able to handle using a plain int as well as the proper enum type. This mostly is useful for the higher-level application code I'm writing, by allowing it to be able to run SetEventFilters with filter_value=0 to disable all filters regardless of type (assuming that the filters are only 8 bits wide, which is so far the case for all types I've seen).
I realised my implementation of the event filters could be slightly improved – the
InstanceEventFilter
enum is anIntEnum
, so it makes sense for theSetEventFilters
sequence to be able to handle using a plainint
as well as the proper enum type. This mostly is useful for the higher-level application code I'm writing, by allowing it to be able to runSetEventFilters
withfilter_value=0
to disable all filters regardless of type (assuming that the filters are only 8 bits wide, which is so far the case for all types I've seen).