Skip to content

Conversation

@LeanderBlume
Copy link
Contributor

@LeanderBlume LeanderBlume commented Jan 10, 2025

Changes

  • Removed hardcoded list of commands and query the device for available commands instead.
    • These commands, once queried, are stored in a file khtool_commands.json
    • We store the osc/limits data for each parameter. This is used to check writability of parameters and could be used by external tools to check acceptable ranges, units etc.
  • Changed format of files generated by --backup. They now store device parameters in a json object hierarchy instead of a list of command strings. This better reflects the structure of the parameters better and improves interoperability with other tools.

TODOs

  • Use device.ip instead of device.name in khtool_commands.json? Probably yes, if only to keep consistent with --backup behavior.
  • _query_by_dict currently populates the command dictionary with values and returns the corresponding list of command strings. This might be confusing. Split up? Decided it's fine.
  • Function order: Put restore_device next to backup_device.

Instead of hard-coding commands for query and backup, ask the device
which commands it supports using osc/schema requests.
Instead of a list of command strings, store data in backup as json
object hierarchy. This reflects the structure of the commands better and
improves interoperability with other tools.
@LeanderBlume LeanderBlume force-pushed the query-available-commands branch from a50dc94 to 69da744 Compare January 10, 2025 19:51
@LeanderBlume
Copy link
Contributor Author

Any update on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant