RIAPS / riaps-pycom

Python implementation of the RIAPS component model
Apache License 2.0
7 stars 8 forks source link

For ModbusDevice driver - add a start/stop periodic read request #54

Closed MMetelko closed 6 years ago

MMetelko commented 6 years ago

Setup an option to start/stop a period read request of a Modbus register from inside the ModbusDevice driver. This should allow applications to request a periodic sampling of a specified modbus register value and that value will be published out for the application to hear (subscribe). The request should include the Modbus command and a periodic timeframe. The application should be able to start and stop this sampling.

MMetelko commented 6 years ago

Coded the commands to setup, start and stop the polling in riaps-pycom/tests/ModbusTesting/ModbusUartPollTesting/. Code to consider the time used in processing is not yet integrated. This code has not yet been tested since testing of running a single command (which works) showed that this method took longer to process than the straight request/reply blocking method (30 ms vs. 20 ms). So, set this aside for now. Need to revisit the documentation in the code to make sure it accurately reflects the current code direction.

MMetelko commented 6 years ago

Setting aside this implementation for now. This may come back as a good option in a different user scenario.