Handle serialErrors

Authored by rizzitello on Aug 25 2018, 2:31 PM.



Solve T9485 by

  • SerialLayer: emit serialErrors
  • AtCore: handleErrors from serialLayer
  • TestClient: Improve change to disconnect state

Most serial Errors are shown. Unless you get the error for device removal in that case, you will get a serial error about not being able to read from the device Then after some time about 2 minutes for my test device you will be disconnected from the device and atcore will close the serial layer.

Diff Detail

R232 AtCore
No Linters Available
No Unit Test Coverage
Build Status
Buildable 2338
Build 2356: arc lint + arc unit
rizzitello requested review of this revision.Aug 25 2018, 2:31 PM
rizzitello created this revision.
rizzitello edited the summary of this revision. (Show Details)Aug 25 2018, 2:35 PM
patrickelectric requested changes to this revision.Aug 25 2018, 2:59 PM
patrickelectric added inline comments.

You should emit only the error enum and create a function that translate this enum to human string.
Emitting strings will make harder to any printer host to identify if the error is really serious or not.

This revision now requires changes to proceed.Aug 25 2018, 2:59 PM
rizzitello added inline comments.Aug 25 2018, 3:09 PM

The host will only need to worry about the atcore state . If the error is serious atcore will change its state and the client will react. Most of the errors will just be logged.


The emitting of enum approach will make the API more flexible and powerful.. Giving liberty to the printer host.

rizzitello updated this revision to Diff 40431.Aug 25 2018, 3:35 PM
rizzitello edited the summary of this revision. (Show Details)
  • patrick suggestions
rizzitello marked 2 inline comments as done.Aug 25 2018, 3:38 PM
rizzitello updated this revision to Diff 40432.Aug 25 2018, 3:42 PM
  • update copyright year
  • remove empty line in mainwindow
  • update atcoreMessage docs to include device errors
patrickelectric accepted this revision.Aug 27 2018, 11:36 AM
This revision is now accepted and ready to land.Aug 27 2018, 11:36 AM
laysrodrigues accepted this revision.Aug 29 2018, 4:47 PM
rizzitello closed this revision.Aug 29 2018, 8:53 PM