Subject: |
Re: Stream device: how to send waveform of chars without null terminator? |
From: |
Ralph Lange <[email protected]> |
To: |
EPICS Tech-Talk <[email protected]> |
Date: |
Wed, 01 Apr 2015 11:44:28 +0200 |
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? Isabella Rey
- References:
- Stream device: how to send waveform of chars without null terminator? Isabella Rey
- Navigate by Date:
- Prev:
Stream device: how to send waveform of chars without null terminator? Isabella Rey
- Next:
Re: Stream device: how to send waveform of chars without null terminator? Isabella Rey
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
<2015>
2016
2017
2018
2019
2020
2021
2022
2023
2024
- Navigate by Thread:
- Prev:
Stream device: how to send waveform of chars without null terminator? Isabella Rey
- Next:
Re: Stream device: how to send waveform of chars without null terminator? Isabella Rey
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
<2015>
2016
2017
2018
2019
2020
2021
2022
2023
2024
|