Experimental Physics and
| |||||||||||||||
|
I have created a new snapshot of StreamDevice which I will make version 2.5 if nobody complains. The link is here: http://epics.web.psi.ch/software/streamdevice/StreamDevice-2-snapshot20101129.tgz Changes: * Compatibility with latest versions of base and asyn (earlier versions gave compiler errors because of missing header files) * Missing input values default to 0 e.g %?i returns 0 when no integer is found * Enums with assignment e.g. %#{fback=-10|back=-1|fwd=1|ffwd=10|stop=0} * Comparison of input with record fields e.g %=.2f compares the input with VAL formatted with %.2f This is a string compare. Thus format carefully. * Re-work of array handling A bug in the earlier versions caused a O(n^2) performance instead of O(n). That was a killer for any array with a few hundred thousand elements or more. * In that context: re-work of standard formats %s, %f, %i, %[] etc. because of a bad implementation of GNU's sscanf. Additional features added: - Count leading whitespace if space flag is given e.g. % 4i reads a maximum of 4 characters including leading space, in opposite to %4i where character counting only starts after leading whitespace - Allow negative hex and oct values if - flag is given e.g. %-x matches "-0x23" - Allow space between sign and number if # flag is given e.g %#f matches "- 3.14" - Allow spaces in strings if # flag is given e.g %#s matches "This is a string", not only "This" as usual * Also in array context: Separators are now checked first before the element is matched. As a result, string arrays are possible with simple %s match instead of constructs like %[^,] * Timestamp support and access to .TIME field e.g. %(TIME)T(%H:%M:%.3S %d.%m.%Y %z) Timestamps are internally handled as DOUBLE converters, counting seconds past 1970 (UNIX time stamp). This allows a precision of 1e-6 seconds. When accessing the .TIME field, the timestamp is converted to EPICS timestamps (seconds and nanoseconds past 1990). * A simple space in a literal match now matches any amount of whitespace. To force a match of exactly one space, use "\ ". This is a potential incompatibility. e.g. "Hello World" matches "Hello World", "Hello World", "HelloWorld" and "Hello\nWorld" Documentation is not yet finished. You could help me by checking for compiler errors or otherwise strange behavior on non-linux-x86 machines. Especially Mac and the several flavors of Windows. Dirk
| ||||||||||||||
ANJ, 02 Dec 2010 |
·
Home
·
News
·
About
·
Base
·
Modules
·
Extensions
·
Distributions
·
Download
·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing · |