Skip to content

PhysicalDevice base class - #2

Merged
MaxenceLarose merged 29 commits into
masterfrom
physicalDevice
May 23, 2019
Merged

MaxenceLarose merged 29 commits into
masterfrom
physicalDevice

Conversation

@dccote

@dccote dccote commented May 23, 2019

Copy link
Copy Markdown
Collaborator

Two important things:

  1. Many more tests added and creation of a Debug port for Echo and Cobolt lasers: we test serial communication separately from devices.
  2. Creation of the class hierarchy PhysicalDevice, LaserSourceDevice and CoboltDevice, which expose only the required application-oriented functions. Tests are added for these devices.

dccote and others added 21 commits May 20, 2019 12:10
Added doTurnOn, doTurnOff, doSetPower and doGetPower functions
Modified replyPatterns and
…e functional.

Finally completed the code for PhysicalDevice implementation.
re-opening is an error, but closing twice is not (in pySerial). We do the same.
Added comments to errors when tests fail
More assertion to catch the occasional test failure: written data is not read back with real device.
Language is flush() to drop, drain() to wait until all trasnmitted/received.
dccote added 5 commits May 23, 2019 10:36
Update to match documentation: OK when command does not return any values, Syntax error: cmd when command not recognized. All tests currently fail.
Added reply "OK" and Syntax error. NOt all tests pass.
Final modification so Syntax error is mimicked properly.
@dccote

dccote commented May 23, 2019

Copy link
Copy Markdown
Collaborator Author

@MaxenceLarose @Valeriouus : As observed in the laboratory, the protocol was incorrect: all commands return at least "OK" or "Syntax error : " (manual page. 24). The coboltDebugSerial.py was modified to match this behaviour, tests were all rewritten to also match this behaviour, and the coboltDevice.py was rewritten. Comments by @MaxenceLarose about turning off the laser were removed.

@MaxenceLarose
MaxenceLarose merged commit c1f4b60 into master May 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants