Skip to content
New issue

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

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

Already on GitHub? # to your account

Best practices for sequences of events #811

Open
reconbot opened this issue May 16, 2016 · 4 comments
Open

Best practices for sequences of events #811

reconbot opened this issue May 16, 2016 · 4 comments
Labels

Comments

@reconbot
Copy link
Member

reconbot commented May 16, 2016

We should have more documentation and examples around handling sequences of events that parsers doesn't quite cover.

For example.

  • Waiting for a ready byte or bytes before switching to a parser.
  • Using serialport to implement simple protocols (eg, data encapsulation and command passing)
  • Using serialport to implement more complex protocols like firmata
  • Modem commands that respond with an OK
  • Manage a queue of requests (writes) and expected response lengths. and send each request sequentially
@reconbot reconbot changed the title [docs] Best practices for sequences of events Best practices for sequences of events May 23, 2016
@edmont
Copy link

edmont commented Dec 9, 2016

Yes, I can't figure out how to handle a sequence of commands. I'm able to send the first one and read it's response data, but how can I send a second command and read it's response?

@arthurmoises
Copy link

Hi @edmont! Had any success sending a second command? I'm managing to create a simple protocol, to send a big message from one device to another. The idea is to divide the message. In this case the slave must sent some info to signal that the first message was received allowing the master to send the second part.

@edmont
Copy link

edmont commented Oct 17, 2017

@arthurmoises, I managed to make it work with await, but I finally moved to Python :)

@erikkallen
Copy link
Contributor

I use seq-queue for this

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Development

No branches or pull requests

4 participants