Experimental Physics and
| |||||||||||||||||
|
it sounds like you have a char array, but want to parse a string in the gensub: memset(0,) will do that but you could also check your output is \0 terminated. Matthieu Szalata, Zenon M. wrote: In my soft IOC a waveform record reads a string of numeric data from an instrument in ASCII format separated by ','. This string varies in length from one reading to the next. I use genSub to convert the ASCII data to floating point data. I bring the ASCII data into genSub via INPA, for which I set FTA="CHAR". I discovered that if a shorter string follows a longer string, in INPA the new string data is followed by the remainder of the previous string! I fixed that by using memset() function after the string was converted. Is this a design behavior of genSub? Is there a better way to get rid of leftover data from previous read than I am doing? -- Matthieu Bec Gemini Observatory Tel: +56 51 205785 c/o AURA, Casilla 603 Fax: +56 51 205650 La Serena, Chile
| ||||||||||||||||
ANJ, 02 Sep 2010 |
·
Home
·
News
·
About
·
Base
·
Modules
·
Extensions
·
Distributions
·
Download
·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing · |