updates from code review
- broke out setup command into parameters
- reset parameters on entering command mode
- check the parameters before issuing setup command
- use encode_value to setup parsed values
- added checks for parameters (get/set, in/out of range)