-
Notifications
You must be signed in to change notification settings - Fork 318
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
Param parse #25
Param parse #25
Conversation
param_count=self._param_count, | ||
cmd=call_cmd, acmd=async_call_cmd, | ||
exec_str=ask_or_write, aexec_str=ask_or_write_async, | ||
input_parser=parameter_parser, output_parser=return_parser) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
syncable_command
has too many parameters... much more comprehensible AND robust to call it with only kwargs.
In general I think having a set and a get parser makes perfect sense 👍 |
Thanks @AdriaanRol - any comments about |
I think val_mapping itself is clear, the only thing that is not clear to me form the example is which end of the command is the user end (I assume '0' and '1') and which end is the instrument side (I assume 'one' and 'zero'). Maybe a one line comment to the test case there and all should be good. |
Yes, that's always a concern with bidirectional mappings... - how's this? |
(and a tiny bit more) |
💃 (or was there something else here?) |
Only generate individual pdfs if more than one subplot
Only generate individual pdfs if more than one subplot
Only generate individual pdfs if more than one subplot
Only generate individual pdfs if more than one subplot
Only generate individual pdfs if more than one subplot
Only generate individual pdfs if more than one subplot
Only generate individual pdfs if more than one subplot
Only generate individual pdfs if more than one subplot
Only generate individual pdfs if more than one subplot
Only generate individual pdfs if more than one subplot
Only generate individual pdfs if more than one subplot
Only generate individual pdfs if more than one subplot
Only generate individual pdfs if more than one subplot
Only generate individual pdfs if more than one subplot
Only generate individual pdfs if more than one subplot
Only generate individual pdfs if more than one subplot
Only generate individual pdfs if more than one subplot
Only generate individual pdfs if more than one subplot
Only generate individual pdfs if more than one subplot
Only generate individual pdfs if more than one subplot
Only generate individual pdfs if more than one subplot
@AdriaanRol @MarkusJacobsen Some more parsing options for
Parameter
s:set_parser
to transform the input value, andget_parser
to transform the instrument response (replacesparse_function
)Function
, where I called themparameter_parser
andreturn_parser
because it's not really set and get there.val_mapping
for cases where there are a fixed set of possible values that need to be passed to the instrument in coded form - a single dictionary takes care of translating for bothset
andget
, as well as generating the correctValidator
parse_function
still works but is marked deprecated - I'll take out existingparse_function
instances and the compatibility code in a later PR - after this PR is merged and you've had a chance to merge master into any branches you're working on - so the change doesn't conflict with things you are doing now.