On 08.11.2012 18:02, Eric Norum wrote:
Although not directly related to this thread, an issue I've encountered when attempting to write StreamDevice support for devices with "esoteric" command/reply formats is the inability to provide a custom conversion routine as provided by devGpib.
I went digging through my (very) old e-mail messages and recovered this one proposing an addition to StreamDevice that would allow for user-supplied conversion code. It's still not quite as general a solution as that provided by the devGpib GPIBCVTIO support but it does allow for message format conversions beyond those provided by StreamDevice.
Perhaps others might find this useful enough that it could be made part of the StreamDevice distribution.
===============================================================================
New format string modifier<function_name>. For example,
%<function_name>ld
%<function_name>f
%<function_name>lf
Where function_name is the name of a conversion function [...]
Hi Eric
This is quite similar to the checksum functions I already have
implemented, and which use the %<...> format. And if I remember
correctly, this was indeed based on your ideas.
Maybe I can modify this a bit in order to allow general user supplied
functions. Checksums would then be a part of the user function model.
I have to think about this and play a bit.
Escaping to user code is of course always "dangerous". You never know
how much stack the call uses, if it blocks, if it throws exceptions etc.
Dirk
- References:
- Problems sending \x0 with devGpib driver Andrew Wagner
- Re: Problems sending \x0 with devGpib driver Eric Norum
- Re: Problems sending \x0 with devGpib driver Andrew Wagner
- Re: Problems sending \x0 with devGpib driver Eric Norum
- Re: Problems sending \x0 with devGpib driver Dirk Zimoch
- Re: Problems sending \x0 with devGpib driver Eric Norum
- Navigate by Date:
- Prev:
Re: compile EPICS base on Mac OS (Snow Leopard) using GCC from macport Shen, Guobao
- Next:
Linkam temperature controller CI94 serial programming 洪春霞
- 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: Problems sending \x0 with devGpib driver Eric Norum
- Next:
EPICS Collaboration Meeting October 2012 : Update Ilyou Kim
- 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
|