-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Implement ykush auxiliary #225
Conversation
Codecov Report
@@ Coverage Diff @@
## master #225 +/- ##
==========================================
+ Coverage 95.43% 95.53% +0.09%
==========================================
Files 72 73 +1
Lines 5547 5688 +141
==========================================
+ Hits 5294 5434 +140
- Misses 253 254 +1
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
:return: True if succesful | ||
""" | ||
log.internal_info("Create auxiliary instance") | ||
self.set_all_ports_on() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should the auxiliary switch ports implicitly?
"""Power on all port to restore the ports. | ||
:return: always True | ||
""" | ||
self.set_all_ports_on() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should the auxiliary switch ports implicitly?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought if for example you do a test with the ykush auxiliary where you put a port off and it stays off at the end of the test. And after you want to do other tests without the auxiliary then you will not be able to communicate with the device on the port off. Which is why I reset port at the end of the test.
docs/auxiliaries/ykush_auxiliary.rst
Outdated
.. automodule:: pykiso.lib.auxiliaries.ykush_auxiliary | ||
:members: | ||
|
||
.. note:: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.. note:: | |
.. warning:: |
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
pass | ||
|
||
|
||
class YkushAuxiliary(DTAuxiliaryInterface): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Somehow I feel like a neat API would be:
ykush_aux.ports[0].on()
ykush_aux.ports[0].is_on()
for port in ykush_aux.ports:
port.off()
Auxiliary that connect to an Ykush device : https://www.yepkit.com/products/ykush .
The auxiliary give the possibility to switch ports on and off individually and get the state of the port.