Hi Andrew
Am Mittwoch, 9. Oktober 2013, 16:38:53 schrieb Johnson, Andrew N.:
> Question for core developers: Should we modify the Enum string parser
> to try using case-independent or other fuzzy string comparisons if a
> string value doesn't match using the case-dependent comparison or
> after trying to convert the string to an integer? We could make the
> IOC dwim ("do what I mean", a Perl term) in the case below, but the
> result is a less precise database so I'm not sure if this is a good
> idea or not and how far we should take it.
I share your reservations about making the parser more dwim. My main
objective is that it makes the specification more complex. I like a
nice, clean spec that allows independent (and still correct)
implementations. Case insensitivity for enum strings would be fine with
me, but I would definitely stop there.
An alternative is to give better error messages. For instance, propose
alternatives based on some similarity heuristics. Taking the example
below, a message like
"CLOSED_LOOP" is not a valid value for the enumeration "menuOmsl",
which is the type of the field "OMSL" in record "xxx".
Perhaps you meant "closed_loop"?
would, I think, make the whole thing crystal clear, even to a newcomer.
Cheers
Ben
> Begin forwarded message:
>
> From: Dirk Zimoch <[email protected]<mailto:[email protected]>>
> Date: October 8, 2013, 11:50:11 PM PDT
> To: Christian Pauly
> <[email protected]<mailto:[email protected]>>
> Cc: EPICS Tech Talk
> <[email protected]<mailto:[email protected]>> Subject: Re:
> how to issue a shell command from EPICS record ?
>
> On 08.10.2013 18:05, Christian Pauly wrote:
>
> field(OMSL, "CLOSED_LOOP")
>
>
> Any idea what i am doing wrong ?
> This is the last piece i am missing to get it running...
>
>
>
> It is not "CLOSED_LOOP" but "closed_loop". You should see an error
> message when loading the record and a caget on the OMSL field should
> show that it is still "supervisory".
>
> Dirk
--
"Make it so they have to reboot after every typo." -- Scott Adams
Attachment:
signature.asc
Description: This is a digitally signed message part.
- Replies:
- Re: Enumerated string comparisons Michael Davidsaver
- References:
- Enumerated string comparisons Johnson, Andrew N.
- Navigate by Date:
- Prev:
Re: [Merge] lp:~epics-core/epics-base/thread-pool into lp:epics-base Ralph Lange
- Next:
Re: Enumerated string comparisons Michael Davidsaver
- Index:
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
<2013>
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
- Navigate by Thread:
- Prev:
Enumerated string comparisons Johnson, Andrew N.
- Next:
Re: Enumerated string comparisons Michael Davidsaver
- Index:
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
<2013>
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
|