stlehmann / pyads

Python wrapper for TwinCAT ADS
MIT License
254 stars 94 forks source link

Make the AdvancedHandler less magical #216

Closed stlehmann closed 3 years ago

stlehmann commented 3 years ago

This PR removes some of the magic from the AdvancedHandler of the AdsTestserver. Namely this is:

  1. PLCVariables will need to be added to the handler before they can be written to or read from This gives more control over the creation process and makes it more explicit.

  2. PLCVariables need name, value, ads_type and symbol_type on initialisation. This mirrors more the situation we have with a real plc where we create variables upfront with all necessary type informations at hand. Also it brings more clarity in the tests. One can see which values and types are used by simply looking at the test. No need to search for the default values.

coveralls commented 3 years ago

Pull Request Test Coverage Report for Build 668


Totals Coverage Status
Change from base Build 666: 0.0%
Covered Lines: 1164
Relevant Lines: 1230

💛 - Coveralls
coveralls commented 3 years ago

Pull Request Test Coverage Report for Build 668


Totals Coverage Status
Change from base Build 666: 0.0%
Covered Lines: 1164
Relevant Lines: 1230

💛 - Coveralls