PyramidTechnologies / netPyramid-RS-232

Alpha release of the Pyramid C# .NET RS-232 API
MIT License
6 stars 6 forks source link

Escrow mode now treats escrow state as an event #5

Closed ghost closed 8 years ago

ghost commented 8 years ago

In escrow mode, only raise the escrow event 1 time per escrow sequence

Due to the nature of RS-232 polling, the slave will always report "escrow" immediately after a stack or return command. This commit adds a filter to guarantee that this escrow state change is handled more like a single shot event instead of a state. Since the escrow state change is originally reported, this does not necessarily break the state machine. The only instance in which this change may be problematic is if you are actively switching on the state in client side code. From what I've seen, clients are more passive about state change so I do not anticipate any issues.