We plan to make some changes to ASYN so that port options and end-of-
string settings can be changed even when the port is disconnected.
Until now attempts to change these settings have been rejected if the
port is disconnected. Here's an example of why the current behaviour
is undesirable:
1) The IOC connects to a serial instrument through a USB/Serial adapter.
2) The USB/serial adapter is currently unplugged.
3) The IOC starts up and the st.cmd script issues a
drvAsynSerialPortConfigure("L0","/dev/ttyUSB0",0,0,0) command
4) Since the hardware is unplugged any subsequent autoConnect attempts
will fail.
5) The asynSetOption calls in the st.cmd file fail since the port is
not connected.
6) Time passes
7) The USB/serial adapter is plugged in.
8) Asyn autoConnects to the adapter -- but the desired serial port
settings have been lost
Similar scenarios exist for the asynOctet end-of-string settings.
To allow these settings to be changed even when the port is
disconnected we need some way to tell the 'lockPort()' method to lock
the port even when the port is not connected. After some discussion
we're proposing that this be done by passing a special 'reason' in the
asynUser structure passed to the lockPort() method.
We propose that a block of 'reason' values be reserved for use by the
ASYN internals:
#define ASYN_REASON_RESERVED_LOW 0x70000000
#define ASYN_REASON_RESERVED_HIGH 0x7FFFFFFF
#define ASYN_REASON_LOCKPORT_EVEN_IF_NOT_CONNECTED
ASYN_REASON_RESERVED_LOW
This change has a (remote) possibility of impacting existing code so
we want to hear from you if this going to cause you problems.
--
Eric Norum <[email protected]>
Advanced Photon Source
Argonne National Laboratory
(630) 252-4793
- Navigate by Date:
- Prev:
File Chooser Szalata, Zenon M.
- Next:
RE: File Chooser Munro Jr, John K.
- 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: Detecting data lost from a subscriber Andrew Johnson
- Next:
compiled asyn-4.10 with ipac-2.10 marco_hair
- 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
|