Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a way to packetize incoming data even in the absence of a pending ORSSerialRequest. #55

Closed
armadsen opened this issue May 11, 2015 · 1 comment
Assignees
Milestone

Comments

@armadsen
Copy link
Owner

A common scenario for serial communications is a device that automatically sends packets of data periodically or in response to (real world) events, rather than as a response to some request from the computer. ORSSerialPort doesn't currently provide any help with parsing/packetizing this kind of incoming data, like it does for structured request/response scenarios.

It would be valuable to provide an API so that a user of ORSSerialPort could install a "packetizer", then be notified of incoming packets that have been validated. This could look quite similar to the existing response part of ORSSerialRequest support, including the use of a response evaluator block (could be called a "packet evaluator" block).

Some requirements for the API:

  • Should not interfere with the existing raw data receipt mechanism (-serialPort:didReceiveData:).
  • Should work simultaneously with the request response API.
  • Should allow for multiple packetizers to be used at once, for cases where a serial device sends packets in more than one format.
  • Should allow for removal of specific packetizers in order to cease notification for incoming packets of a given type.

I think this may warrant some refactoring of the existing request response API, so I think it should wait until the next major update (ie. 2.0).

@armadsen armadsen added this to the 2.0 milestone May 11, 2015
@armadsen armadsen self-assigned this Jul 22, 2015
armadsen pushed a commit that referenced this issue Aug 3, 2015
armadsen added a commit that referenced this issue Aug 8, 2015
…fixString:userInfo:] and associated tests.
armadsen added a commit that referenced this issue Aug 10, 2015
@armadsen
Copy link
Owner Author

Implemented by pull request #66.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant