EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

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

Subject: Re: Stream device: how to send waveform of chars without null terminator?
From: Isabella Rey <[email protected]>
To: Dirk Zimoch <[email protected]>
Cc: "[email protected]" <[email protected]>
Date: Thu, 2 Apr 2015 15:08:20 +0100
Hi Dirk,

Thanks for the file.

I have replaced it in the StreamDevice src directory, but when I ran make it gave me this error:

../StreamEpics.cc: In static member function ‘static long int Stream::report(int)’:
../StreamEpics.cc:356:26: error: ‘class Stream’ has no member named ‘printStatus’
make[2]: *** [StreamEpics.o] Error 1

I tried commenting out the line 356, and got no error - Should I just remove the line, or do I need to update StreamCore? I am running on StreamDevice 2.6

Apart from that, with the line 356 commented out, I've changed the protocol to use %s and I don't get the null character anymore.  :)

Cheers,
Isabella



On 2 April 2015 at 14:03, Dirk Zimoch <[email protected]> wrote:
Here is the bug fix.
Dirk



On 01.04.2015 14:03, Dirk Zimoch wrote:
On 01.04.2015 12:07, Isabella Rey wrote:
Hi Ralph,

Yes, but with %s the device receives something like:

load_curve 675892112117108115101461161201160 3870\r\n

You are right. And I think that is a bug.

Dirk




The null character corresponds to the 0 at the end of the waveform (I've
checked it with small strings)

Isabella

On 1 April 2015 at 10:44, Ralph Lange <[email protected]
<mailto:[email protected]>> wrote:

    Have you tried using "%s" for the string output?

    ~Ralph



    On 01/04/2015 10:44, Isabella Rey wrote:

        Hi All,

        I have a device to which I need to send a file path followed by
        a number:

        example:
        load_curve C:\pulse.txt 3870

        The file path is stored in the database as a waveform of chars.
        When I run the protocol stream device sends (what I think is) a
        null terminator after the file path:

        device receives:
        load_curve C:\pulse.txt\x00 3870

        Is there any way of getting rid of the \x00 terminator?

        Below I copy my protocol and the database records.

        Cheers,
        Isabella


        I've defined the protocol in stream device as:
        load_curve
        {
             out "load_curve %(\$1)c %(\$2)i";
             in "%(\$1:\$2)b";
        }

        and in the database I have:

        record(bo, "DEV:LOAD_CURVE") {
           field(DTYP, "stream")
           field(OUT, "@my.proto load_curve(DEV:CURVE_FILE, DEV:VPI)
        $(PORT)")
        }

        record(waveform, "DEV:CURVE_FILE") {
           field(DESC, "File path")
           field(DTYP, "Soft Channel")
           field(NELM, "256")
           field(FTVL, "CHAR")
        }









Replies:
Re: Stream device: how to send waveform of chars without null terminator? Dirk Zimoch
References:
Stream device: how to send waveform of chars without null terminator? Isabella Rey
Re: Stream device: how to send waveform of chars without null terminator? Ralph Lange
Re: Stream device: how to send waveform of chars without null terminator? Isabella Rey
Re: Stream device: how to send waveform of chars without null terminator? Dirk Zimoch
Re: Stream device: how to send waveform of chars without null terminator? Dirk Zimoch

Navigate by Date:
Prev: Remember to Register for the Spring 2015 EPICS Collaboration Meeting Spring 2015 EPICS Collaboration Meeting
Next: Re: Stream device problem with redirection in @mismatch Dirk Zimoch
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  <20152016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: Stream device: how to send waveform of chars without null terminator? Dirk Zimoch
Next: Re: Stream device: how to send waveform of chars without null terminator? Dirk Zimoch
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  <20152016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 16 Dec 2015 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·