Index: doc/setup.html =================================================================== RCS file: /afs/psi.ch/user/z/zimoch/.cvsroot/StreamDevice2/doc/setup.html,v retrieving revision 1.10 diff -u -r1.10 setup.html --- doc/setup.html 14 May 2007 15:54:20 -0000 1.10 +++ doc/setup.html 11 Oct 2007 12:38:19 -0000 @@ -36,6 +36,8 @@ Up to calc release R2-6 (synApps release R5_1), the scalcout record needs a fix. (See separate scalcout page.) +Support for the scalcout is optional. StreamDevice works +as well without scalcout or SynApps.
Up to release R3.14.8.2, a fix in EPICS base is required to build @@ -48,15 +50,40 @@
-Make sure that the asyn library and the calc module of
-synApps can be found, e.g. by
+Make sure that the asyn library (and the calc module of
+synApps, if desired) can be found, e.g. by
adding ASYN
and (if installed) CALC
or SYNAPPS
to your <top>/configure/RELEASE file:
+
ASYN=/home/epics/asyn/4-5 CALC=/home/epics/synApps/calc/2-7+
+If you want to enable regular expression matching, you need the PCRE package. +For most Linux systems, it is already installed. In that case add the locations +of the PCRE header and library to your RELEASE file: +
++PCRE_INCLUDE=/usr/include/pcre +PCRE_LIB=/usr/lib ++
+If you want to build StreamDevice for platforms without PCRE support, +it is the easiest to build PCRE as an EPICS application. +Download the PCRE package from www.pcre.org +and compile it with my EPICS compatible +Makefile. +Then define the location of the application in your RELEASE file. +
++PCRE=/home/epics/pcre ++
+Regular expressions are optional. If you don't want them, you don't need this. +
+For details on <top> directories and RELEASE files, please refer to the Index: src/StreamBuffer.cc =================================================================== RCS file: /afs/psi.ch/user/z/zimoch/.cvsroot/StreamDevice2/src/StreamBuffer.cc,v retrieving revision 1.11 diff -u -r1.11 StreamBuffer.cc --- src/StreamBuffer.cc 11 May 2007 12:39:15 -0000 1.11 +++ src/StreamBuffer.cc 11 Oct 2007 12:06:24 -0000 @@ -60,7 +60,8 @@ // make space for minsize + 1 (for termination) bytes char* newbuffer; long newcap; - if (minsize > 10000) +#ifdef EXPLODE + if (minsize > 1000000) { // crude trap against infinite grow error ("StreamBuffer exploded growing from %ld to %ld chars. Exiting\n", @@ -83,6 +84,7 @@ fprintf(stderr, "\n"); abort(); } +#endif if (minsize < cap) { // just move contents to start of buffer and clear end Index: streamApp/regexp.cmd =================================================================== RCS file: streamApp/regexp.cmd diff -N streamApp/regexp.cmd --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ streamApp/regexp.cmd 11 Oct 2007 12:03:58 -0000 @@ -0,0 +1,12 @@ +#!./streamApp + +dbLoadDatabase "O.Common/streamApp.dbd" +streamApp_registerRecordDeviceDriver + +# no autoconnect for web servers (see regexp.proto) +drvAsynIPPortConfigure web epics.web.psi.ch:80 0 1 + +dbLoadRecords regexp.db + +iocInit +# var streamDebug 1 Index: streamApp/regexp.db =================================================================== RCS file: streamApp/regexp.db diff -N streamApp/regexp.db --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ streamApp/regexp.db 11 Oct 2007 12:03:01 -0000 @@ -0,0 +1,5 @@ +record (stringin, "DZ:regexp") +{ + field (DTYP, "stream") + field (INP, "@regexp.proto readTitle web") +} Index: streamApp/regexp.proto =================================================================== RCS file: streamApp/regexp.proto diff -N streamApp/regexp.proto --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ streamApp/regexp.proto 11 Oct 2007 13:01:16 -0000 @@ -0,0 +1,18 @@ +# regular expression example +# extract the title of from a web page + +outterminator = NL; +interminator = "