driver: add modbus rtu driver#806
Conversation
01a5919 to
8cad450
Compare
|
@Emantor, @Bastian-Krause would you take a look at this? |
| """ | ||
| port = attr.ib(validator=attr.validators.instance_of(str)) | ||
| address = attr.ib(validator=attr.validators.instance_of(int)) | ||
| speed = attr.ib(default=115200, |
There was a problem hiding this comment.
The SerialPort baseclass already has port & speed, why is this redefined here?
|
|
||
| ModbusRTU | ||
| +++++++++ | ||
| Descriped the resource required to use the Modbus RTU driver |
There was a problem hiding this comment.
A bit more explanation would be helpful, maybe a link to a Modbus RTU protocol description. Is Modbus RTU always used over serial interfaces?
Codecov Report
@@ Coverage Diff @@
## master #806 +/- ##
========================================
+ Coverage 56.7% 56.9% +0.1%
========================================
Files 146 147 +1
Lines 10915 10942 +27
========================================
+ Hits 6193 6228 +35
+ Misses 4722 4714 -8
Continue to review full report at Codecov.
|
be635f7 to
565c401
Compare
|
@Emantor Could you have another look at this? |
565c401 to
52ab8da
Compare
There was a problem hiding this comment.
I've fixed some typos in the docs and think we can merge this as is.
@b2vn, if you have some time, you could add @Driver.check_active to the driver functions to avoid failing only when trying to access the instrument property.
Also, the checks in the resource __attrs_post_init__ should be better handled via attrs.
52ab8da to
8428a0b
Compare
Signed-off-by: Nikolaj Rahbek <nikolaj@b2vn.org>
8428a0b to
2cfbd82
Compare
|
Although the GitHub UI doesn't show it, the CI run was successful: https://github.com/labgrid-project/labgrid/actions/runs/1506655629 |
Description
Added a Modbus RTU driver to allow for labgrid tests to control modbus devices.
Checklist