Skip to content
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

ykushcmd: Add string support to ykushcmd command #1272

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

redzynix
Copy link

Description
By default ykushcmd command supports option to [on, off, cycle] whole ykush yepkit.

ykushcmd -u a # 'a' stands for all ports
ykushcmd -d a # 'a' stands for all ports

In current build only int is supported for port number, changing it to string allows to control power on all ports with one command instead of 3 if there are 3 ports.
Tested locally.

Checklist

  • [ - ] Documentation for the feature
  • [ x ] Tests for the feature
  • [ - ] The arguments and description in doc/configuration.rst have been updated
  • [ - ] Add a section on how to use the feature to doc/usage.rst
  • [ - ] Add a section on how to use the feature to doc/development.rst
  • [ x ] PR has been tested
  • [ - ] Man pages have been regenerated

By default ykushcmd command supports option to [on, off, cycle] whole
ykush yepkit.
> ykushcmd -u a  # 'a' stands for all ports
> ykushcmd -d a  # 'a' stands for all ports
In current build only int is supported for port number, changing it
to string allows to control power on all ports with one command instead
of 3 if there are 3 ports.

Signed-off-by: Redzynia, MateuszX <mateuszx.redzynia@intel.com>
@redzynix redzynix force-pushed the redzynix-add-string-support-to-ykushpowerport branch from de62b3a to af7f668 Compare September 25, 2023 09:24
@Bastian-Krause
Copy link
Member

I don't see how this change would be useful in the context of labgrid. As far as I understand, this would allow exporting a YEPKIT Switchable USB Hub as a single resource. I cannot imagine a case where that would be useful. Could you please elaborate why it is?

@Bastian-Krause Bastian-Krause added the needs author info Requires more information from the PR/Issue author label Oct 19, 2023
@Bastian-Krause
Copy link
Member

Are you still interested in this PR?

@cgturner1
Copy link

Are you still interested in this PR?

We are still interested in this functionality mainly our scenario focus on controlling the power to individual all ports on a ykush machine to power on/off a single device connected to a ykush multiple times over having to power on/off all devices at once. This change would preserve the individual functionality as it works now but allowing for a string would enable the 'a' command to power cycle all ports on the device.

@Bastian-Krause
Copy link
Member

@cgturner1 Can you explain your board setup a bit more? I can't really see how this would be useful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs author info Requires more information from the PR/Issue author
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants