You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After using the new API over the last few months, I have to admit I miss the ability to specify the message type directly as a property on FilterRegister. I keep having to add an extra filter node simply to ensure only events or writes are picked up. This discussion is related to closed issue #61.
The proposal is to expose back MessageType as a nullable property in all FilterRegister operators. There are a few possible semantics given the existence of the FilterType property (include / exclude), but I think there is only one option that would make overall the most sense. Here is the reasoning:
For Include, I think really the only option that makes sense is the logical AND of conditions, so Event and TimestampSeconds should always give me the stream of device heartbeat events. I don't think there is much of a discussion to have here?
For Exclude, there might be a few options:
Logical NAND: Exclude [Event, Register] excludes only messages that are events AND of the specific register, i.e. a "Write" message to "TimestampSeconds" would be included. This one seems extremely confusing to me and I don't think anybody would expect this to apply.
Logical NOR: Exclude [Event, Register] excludes all messages that are either events OR that have the specific register address, i.e. a "Write" message to "TimestampSeconds" would also be excluded. This is somewhat reasonable, but inconsistent with the negation of the Include behavior above.
NOT REGISTER: Exclude [Event, Register] would select ONLY event messages that are NOT of the specified register, i.e. the exclude applies only to the register property.
I believe the last option is the one that makes the most sense, for the following reasons:
If we consider Include / Exclude to apply only to the register property, then the truth table for Exclude would be the exact complement of the truth table for Include. Otherwise the exact negation of AND is NAND which I argue above is the only option that never makes sense.
Applying Include / Exclude only to the register address would make it consistent to add an optional MessageType property also to Parse operators, without a FilterType property (in that case the register is always fixed and the semantics has to be Include).
The expected semantics would need to be clarified in documentation.
The text was updated successfully, but these errors were encountered:
After using the new API over the last few months, I have to admit I miss the ability to specify the message type directly as a property on
FilterRegister
. I keep having to add an extra filter node simply to ensure only events or writes are picked up. This discussion is related to closed issue #61.The proposal is to expose back
MessageType
as a nullable property in allFilterRegister
operators. There are a few possible semantics given the existence of theFilterType
property (include / exclude), but I think there is only one option that would make overall the most sense. Here is the reasoning:Include
, I think really the only option that makes sense is the logical AND of conditions, soEvent
andTimestampSeconds
should always give me the stream of device heartbeat events. I don't think there is much of a discussion to have here?Exclude
, there might be a few options:Exclude [Event, Register]
excludes only messages that are events AND of the specific register, i.e. a "Write" message to "TimestampSeconds" would be included. This one seems extremely confusing to me and I don't think anybody would expect this to apply.Exclude [Event, Register]
excludes all messages that are either events OR that have the specific register address, i.e. a "Write" message to "TimestampSeconds" would also be excluded. This is somewhat reasonable, but inconsistent with the negation of theInclude
behavior above.Exclude [Event, Register]
would select ONLY event messages that are NOT of the specified register, i.e. the exclude applies only to the register property.I believe the last option is the one that makes the most sense, for the following reasons:
Include / Exclude
to apply only to the register property, then the truth table forExclude
would be the exact complement of the truth table forInclude
. Otherwise the exact negation of AND is NAND which I argue above is the only option that never makes sense.Include / Exclude
only to the register address would make it consistent to add an optionalMessageType
property also toParse
operators, without aFilterType
property (in that case the register is always fixed and the semantics has to beInclude
).The expected semantics would need to be clarified in documentation.
The text was updated successfully, but these errors were encountered: