N
Nick W
Hi all,
I will be using a C++ program to control a robot, and would like to
"accept" keyboard-entered commands (strings) while the program is
running and controlling the robot as a part of the control cycle. What
is the best way of doing this please?
Also, for the bulk of the time I will be running one particular block
of code each cycle, which will vary depending on what the robot is
doing. Is it best to use a strategy pattern for this, and pass the
robot object to the currently switched strategy object, eg
this.strategy.execute(this), or simply have different functions within
the robot object and vary which run is run.
Thanks,
Nick
I will be using a C++ program to control a robot, and would like to
"accept" keyboard-entered commands (strings) while the program is
running and controlling the robot as a part of the control cycle. What
is the best way of doing this please?
Also, for the bulk of the time I will be running one particular block
of code each cycle, which will vary depending on what the robot is
doing. Is it best to use a strategy pattern for this, and pass the
robot object to the currently switched strategy object, eg
this.strategy.execute(this), or simply have different functions within
the robot object and vary which run is run.
Thanks,
Nick