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  2015  <20162017  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  2015  <20162017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Packed Data Message Formats With Fixed-Length Strings
From: Iain Marcuson <[email protected]>
To: "[email protected]" <[email protected]>
Date: Tue, 8 Nov 2016 16:46:32 +0000
I am writing EPICS code to interface with a custom device.  The device protocol is fixed-length messages.  I can read and write the message parameters with Stream Device, and have done so successfully except for the fixed-length string, which I have had to bypass in assorted ways.

The output command message has the Python struct format "ii128s12i".  The input message has the Python struct format "128s12ii".  The "12i" refers to 12 parameters, passed or returned.

My two questions are:

1) How can I parse the fixed-length string?  The normal string-handling routines fail either because of terminator characters in the string or because the string is two long.
2) I handle the parameters by having a PV for each parameter, and a separate "group" of PVs for each command.  Is this best practice?

Thank you,

Iain Marcuson.


Replies:
RE: Packed Data Message Formats With Fixed-Length Strings Mooney, Tim M.
Re: Packed Data Message Formats With Fixed-Length Strings Dirk Zimoch

Navigate by Date:
Prev: Multiple NDPluginPva issues Alexander Söderqvist
Next: RE: Packed Data Message Formats With Fixed-Length Strings Mooney, Tim M.
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  <20162017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: Multiple NDPluginPva issues Bruno Martins
Next: RE: Packed Data Message Formats With Fixed-Length Strings Mooney, Tim M.
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  <20162017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 10 Nov 2016 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·