EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  <20072008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  <20072008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: Stream protocol configuration
From: Emmanuel Mayssat <[email protected]>
To: Dirk Zimoch <[email protected]>
Cc: [email protected]
Date: Thu, 06 Dec 2007 10:06:33 -0800
On Thu, 2007-12-06 at 10:02 +0100, Dirk Zimoch wrote:

> readSomething { maxInput=10; out "..."; in "..."; }
> writeSomething {
> 	maxInput=25;
>          out "...";
> 	@init {readSomething;}
> }
> 
> The @init handler uses the setting maxInput=25.

Obviously there is something wrong with the above.
It is actually the situation I am facing where my protocol has no
terminator and read and write protocols are fundamentally different.

Some of the protocols I have to program are also a bit more complex than
write-once and read-once. They are acknowledgments and some other
features involved.

> In the current implementation, a protocol (including all its handlers) has only 
> one set of settings. It is not possible to change settings at run time. 

That would be a nice addition and would be more intuitive.
As I mentioned earlier I was able to find work-arounds for the issues I
have. BTW, I found streamDevice to work intuitively and as-is for 95% of
my drivers. I love it!

> > 
> > 2/ Parameter passing
> > I am able to refer to another protocol entry in the exception handler
> > Example:
> > writeRegister {
> >   ...
> >   @init {
> >      readRegister;
> >   }
> > }
> > 
> You can consider this a two-stage macro substitution. First readRegister in the 
> @init handler is replaced with all the commands (but NOT the settings) of the 
> readRegister protocol. Then all parameters in the writeRegister protocol and all 
> its handlers are replaced with the values passed in the link, including those 
> parameters which came originally from the readRegister protocol.
> 

In the @init
readRegister($1);
readRegister $1;
did not work for me. Are you saying I should try again? Ok ...

Thanks,

--
Emmanuel




Replies:
Re: Stream protocol configuration Dirk Zimoch
References:
writing your own stream cronverter Emmanuel Mayssat
Re: writing your own stream cronverter Emmanuel Mayssat
Re: writing your own stream converter Emmanuel Mayssat
Stream protocol configuration Emmanuel Mayssat
Re: Stream protocol configuration Dirk Zimoch

Navigate by Date:
Prev: Re: A patch for medm Andrew Johnson
Next: genSub and EFLG John Dobbins
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  <20072008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: Stream protocol configuration Dirk Zimoch
Next: Re: Stream protocol configuration Dirk Zimoch
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  <20072008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 10 Nov 2011 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·