Open mpo-mjolner opened 4 months ago
Related: We currently don't support multiple commands (process values with entiher entry or choices) based on the same tag. Support for this could be added by explicitly naming the process values rather than just using ther tag names implicitly.
Related: We currently don't support multiple commands (process values with entiher entry or choices) based on the same tag. Support for this could be added by explicitly naming the process values rather than just using ther tag names implicitly.
I don't really see this happening in practice. I'm not sure it's relevant to implement. The original post is certainly relevant though.
Related functionality: When fixing this, we might also add functionality to generate example code for choice commands in addition to what we already have for regex based commands (#524).
Fixed in #596.
There is a bug in the uod builder regarding choice commands. A process value with choices is defined using the
with_process_value_choice()
builder method. When invoked without thecommand_options
argument, it expects that its tag has choices and it should use these choices as command_options. This functionality does not work correctly.Related functionality: When fixing this, we might also add functionality to generate example code for choice commands in addition to what we already have for regex based commands (#524).
Additionally, we should refactor the processing of commands sent from the frontend, so that for choice commands, we accept verbatim pcode instead of accepting a named option and correlating that with readings. This makes the processing simpler and makes it so that generated example command test the same input command processing as used when accepting commands from the frontend.