-
Notifications
You must be signed in to change notification settings - Fork 22
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
Add possibility of single signal manipulation #265
Comments
This is an interesting idea. Thanks for your feedback! out_signals = ['Day', 'Hour', 'Minute', 'Month', 'Second', 'Year']
out_session = nixnet.SignalOutSinglePointSession('CAN1', db_name, 'Cluster', out_signals)
out_session.start()
out_session.signals['Hour'].write(5) XNET only supports writing out all signals in one batch. So we'd need to decide
I'd also be curious if there is a reason the C and LV APIs don't support this. Limits in API expressiveness? Result is unacceptable or surprising for enough users? The use case is limited enough that the extra development and maintenance required for widening the API's footprint might be better allocated to helping people solve other problems? RE syntax So if we move forward with this. out_session.signals['Hour'] = 5 # the best way
out_session.signals[1] = 5 # also good The downside with writing to the signals is that Another option is out_session.signals['Hour'].value = 5 # the best way
out_session.signals[1].value = 5 # also good This requires being able to return a value. We could return the cached value we'd write. The other concern is will it be as obvious that signals are being sent out? Personally, I lean towards the solution you list as "acceptable" out_session.signals['Hour'].write(5) # acceptable
out_session.signals[1].write(5) # acceptable btw |
Finally have a while to comment on it... Regarding behavior:
Regarding use case: Regarding syntax: Regarding access: |
It would be nice to have a way to manipulate signal values in Signal Out sessions separately. Currently the way to modify a single signal value is as follows:
This requires to remember indices of the signals in
value_buffer
. That can be cumbersome for people writing e.g. test cases using nixnet. My proposal is to make it as follows (in addition to existing bulk access):The text was updated successfully, but these errors were encountered: