all register setters and getters share the same logic. Initially, I created a handler for each register's SCPI commands.
They have the same code, except for the register name.
This pull request refactors this into 1 setter and 1 getter.
It reduces each SCPI command handler to a 1 line function body. And the common code is placed in 2 helper functions.
It saves lines of code, but the main goal is to not have almost identical code in a number of functions.
Can also be used for any addition register support we add.
all register setters and getters share the same logic. Initially, I created a handler for each register's SCPI commands.
They have the same code, except for the register name.
This pull request refactors this into 1 setter and 1 getter. It reduces each SCPI command handler to a 1 line function body. And the common code is placed in 2 helper functions.
It saves lines of code, but the main goal is to not have almost identical code in a number of functions.
Can also be used for any addition register support we add.
closes #53