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
<2016>
2017
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
<2016>
2017
2018
2019
2020
2021
2022
2023
2024
|