Skip to content

Refactored ATG CLI, combined info() and set() into execute() function.#1

Open
eredden wants to merge 1 commit intoX3N0V3RS3:mainfrom
eredden:main
Open

Refactored ATG CLI, combined info() and set() into execute() function.#1
eredden wants to merge 1 commit intoX3N0V3RS3:mainfrom
eredden:main

Conversation

@eredden
Copy link
Copy Markdown

@eredden eredden commented Dec 31, 2023

I have modified the code for this program in these ways:

  • Added IP address, port, and message code parameters to existing functions rather than direct calls to the atg_list array and port variable.
  • Renamed several variables in accordance with PEP8 standards, e.x. atglist to atg_list.
  • Eliminated duplicate time.sleep() statements across all socket connection functions.
  • Combined the info and set modes and functions into one unified mode/function called execute. This mode allows for a given command to be executed on a ATG system.

Keeping info() and set() as separate functions does not make much sense since info() could already run any command including the commands ran in set(). All you would need to do in order to replicate the set() function's purpose would be to run execute() (formerly info) twice on each ATG system, once with a set function message code (like s601000) and again with a display function message code (like I20100).

Let me know if you have any questions or concerns.

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