From: Kasemir, K. <kas...@or...> - 2016-08-29 13:14:10
|
Hi: Well, if you have many states (> 16), and the strings are long (> 40 chars), and you still want to map a number into a string once and for all so that all CA clients can see that string and do not need to do their own number -> string conversion, then you likely need to put that conversion into C code, place it into a sequence or sub record which read the number record and write to a waveform record, where the wave rec. is of type CHAR[] to hold the long string. By now, most CA clients can display such "long strings": BOY/display builder use Format-String, caget uses -S option etc. -Kay ________________________________________ From: Claudio Rosati <Cla...@es...> Sent: Monday, August 29, 2016 9:08 AM To: Kasemir, Kay; Ralph Lange Cc: cs-...@li...; Nick Levchenko Subject: Re: [Cs-studio-core] Displaying strings instead of integer Hi Kay, 30, 60 and 100 are not Œmagic numbers¹, they are the maximum number of values having string counterparts. The number itself could be continuous in a give range, or a set of samples (magic numbers). The size of the string themselves is long, greater than 40 characters: ³Some special value very, very, very, very longŠ². So, tell me if I¹m wrong, there is not an easy and direct way to map (for visual purpose only inside CS-Studio) a big set of strings with a corresponding series of numbers. Claudio |