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

Fix get_limits documentation #1536

Closed
ryanmelt opened this issue Sep 13, 2024 · 0 comments · Fixed by #1538
Closed

Fix get_limits documentation #1536

ryanmelt opened this issue Sep 13, 2024 · 0 comments · Fixed by #1538
Assignees
Labels
documentation Improvements or additions to documentation

Comments

@ryanmelt
Copy link
Member

ryanmelt commented Sep 13, 2024

The get_limits documentation is incorrect in stating how it operates.

I have tried this syntax (as listed in docs):
get_limits(<Target Name>, <Packet Name>, <Item Name>, <Limits Set (optional)>)

but I get:
ArgumentError : wrong number of arguments (given 4, expected 3)

The code definition is:
def get_limits(target_name, packet_name, item_name, cache_timeout: nil, manual: false, scope: $openc3_scope, token: $openc3_token)

That definition does not appear to allow for providing the limits set name as an arg or kwarg. The get_limits method returns a hash of all defined limits for that target, packet, item which I can then do this with:
get_limits(<Target Name>, <Packet Name>, <Item Name>)[<Limits Set>]

That gets the particular limits set information I required.

@ryanmelt ryanmelt added the documentation Improvements or additions to documentation label Sep 13, 2024
@jmthomas jmthomas self-assigned this Sep 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants