-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
use_simulation_option
cmd line option in examples has no effect
#395
Comments
This issue was introduced when the I don't recommend fixing the command line option now, because the driver-specific helper functions will be deleted when we retrofit to use the updated session management API. I guess deleting the command line option is ok, though. |
#348 updated all the readmes for examples to instruct using _constants.py to change the behavior of simulation. I don't know of any instructions to use the command-line option. So I think I'll create a PR just removing the decorator for the command-line option. |
My current plan is to move this configuration into the |
The command line option was removed in #442 #446 We will remove the code from |
Bug Report
The
use_simulation_option
(aka--use-simulation
/--no-use-simulation
) cmd line option has no effect on scope example, and possibly other examples. Even when the--no-use-simulation
option was specified when starting up the measurement service IO Trace showed session initialization was specifyingSimulate=1
, and the captured data from the scope was clearly simulated data. This would occur as long asUSE_SIMULATION
in_constants.py
was true.Repro or Code Sample
The main culprit from what I can gather is that this line in the _niscope_helpers.py which relies solely on a value defined in
_constants.py
. Since this doesn't check the values coming from the cmd line there's no way for it to be accounted for during session creation.Expected Behavior
I would expect
--use-simulation
/--no-use-simulation
to either affect the session behavior, or to not exist as a cmd line arg since this behavior appears to be controlled by theUSE_SIMULATION
value in_constants.py
Current Behavior
py measurement.py --help
will list--use-simulation
/--no-use-simulation
as potential args but these args don't have any affect on the session creation behavior.e.g.
USE_SIMULATION = true
+--no-use-simulation
will create simulated sessionsUSE_SIMULATION = false
+--use-simulation
will create real hw sessionsPossible Solution
Remove
use_simulation_option
as a cmd line arg since this behavior is already controlled by a value in another file.Context
Your Environment
ni-measurementlink-service
version [e.g. 0.12.3]AB#2529511
The text was updated successfully, but these errors were encountered: