Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions doc/configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -303,15 +303,16 @@ hub.

YKUSHPowerPort:
serial: 'YK12345'
index: 1
index: '1'

The example describes port 1 on the YKUSH USB hub with the
serial ``YK12345``.
Use ``ykushcmd -l`` to get your serial number.

Arguments:
- serial (str): serial number of the YKUSH hub
- index (int): number of the port to switch
- index (str): number of the port to switch, use ``a`` to control the whole hub as one logical
port

Used by:
- `YKUSHPowerDriver`_
Expand Down
12 changes: 6 additions & 6 deletions labgrid/resource/ykushpowerport.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ class YKUSHPowerPort(Resource):

Args:
serial (str): serial of the YKUSH device
index (int): port index"""
index (str): port index"""
serial = attr.ib(validator=attr.validators.instance_of(str))
index = attr.ib(validator=attr.validators.instance_of(int),
converter=int)
index = attr.ib(validator=attr.validators.instance_of(str),
converter=str)

@target_factory.reg_resource
@attr.s(eq=False)
Expand All @@ -23,7 +23,7 @@ class NetworkYKUSHPowerPort(NetworkResource):

Args:
serial (str): serial of the YKUSH device
index (int): port index"""
index (str): port index"""
serial = attr.ib(validator=attr.validators.instance_of(str))
index = attr.ib(validator=attr.validators.instance_of(int),
converter=int)
index = attr.ib(validator=attr.validators.instance_of(str),
converter=str)
Loading