Hi Martin,
> There is only one IOC shell thread. Assuming that IOC shell commands are executed in a synchronous way there is no risk of corrupting messages printed by printf
> as long as you stick to Andrews rule and use printf only in IOC shell commands.
Here is an example of garbled output coming simply from the dbLoadTemplate command. It happens that DAC.template is trying to load a non-existent singleDAC.db file. Note that the messages from dbLoadTemplate are garbled in with subsequent comments and commands in the startup script. Is this because dbLoadTemplate is actually loading the database file in another thread? If not why is it garbled?
**********************************************
initIpUnidig("Unidig1", 0, 1, 100, 116, 0xffffff, 0xffffff)
value = 0 = 0x0
dbLoadTemplate "ipUnidig.substitutions"
value = 0 = 0x0
# Initialize Systran DAC
# initDAC128V(char *portName, int carrier, int slot)
# portName = name to give this asyn port
# carrier = IPAC carrier number (0, 1, etc.)
# slot = IPAC slot (0,1,2,3, etc.)
initDAC128V("DAC1", 0, 3)
value = 0 = 0x0
dbLoadTemplate "DAC.template"
filename="value = ../dbStatic/0dbLexRoutines.c" li = ne number=264
S_n0xfsLib_NFSERR_NOENT0
dbRead open Acromag IP-330 ADC
home/epe /corvette/# initIp330(
-9/db/singlac128V-2# const char *portName, int carrier, int slot,
eDAC.db
filename="../dbStapeString, const char *rangeString,
" line exRoutines.c# int firstChan, int lastChan,
number=264
_NFSsLib# int intVec)
ening file /corv op# portName = name to give this asyn port
el/dac128V-pics/dev# carrier = IPAC carrier number (0, 1, etc.)
2-9/db/singleDAC.db# slot = IPAC slot (0,1,2,3, etc.)
filename="../dbS"D" or "S" for differential or single-ended
.c" linbLexRoutines# rangeString = "-5to5","-10to10","0to5", or "0to10"
e number=264
ib_NFSERR_NOENT This value must match hardware setting selected
/cord opening file# firstChan = first channel to be digitized. This must be in the range:
vette/home/epics/de# 0 to 31 (single-ended)
il/dac128V-2-9/db/s# 0 to 15 (differential)
ngleDAC.db
filastChan = last channel to be digitized
dbLexRo../dbStatic/# intVec Interrupt vector
er=264.c" line numbinitIp330("Ip330_1",0,2,"D","-5to5",0,15,120)
S_nfsLi
**********************************************
Mark
-----Original Message-----
From: Tech-talk <tech-talk-bounces at aps.anl.gov> On Behalf Of Konrad, Martin via Tech-talk
Sent: Thursday, March 26, 2020 5:26 PM
To: J. Lewis Muir <jlmuir at imca-cat.org>; Johnson, Andrew N. <anj at anl.gov>
Cc: EPICS tech-talk <tech-talk at aps.anl.gov>
Subject: Re: Filtering messages print on the IOC shell console
Hi Lewis,
> A problem I often see on VxWorks VME crate IOC consoles is that output
> is corrupted. It looks as if two or more threads or processes are
> writing to the console at the same time. Does your suggestion about
> where you consider it appropriate to use printf and fprintf include
> this situation? How can this be avoided?
There is only one IOC shell thread. Assuming that IOC shell commands are executed in a synchronous way there is no risk of corrupting messages printed by printf as long as you stick to Andrews rule and use printf only in IOC shell commands.
Cheers,
Martin
--
Martin Konrad
Facility for Rare Isotope Beams
Michigan State University
640 South Shaw Lane
East Lansing, MI 48824-1321, USA
Tel. 517-908-7253
Email: konrad at frib.msu.edu
- References:
- Filtering messages print on the IOC shell console Paduan Donadio, Marcio via Tech-talk
- Re: Filtering messages print on the IOC shell console Johnson, Andrew N. via Tech-talk
- Re: Filtering messages print on the IOC shell console Konrad, Martin via Tech-talk
- Navigate by Date:
- Prev:
Re: Filtering messages print on the IOC shell console Konrad, Martin via Tech-talk
- Next:
Re: Filtering messages print on the IOC shell console Konrad, Martin via Tech-talk
- 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
2025
- Navigate by Thread:
- Prev:
Re: Filtering messages print on the IOC shell console Konrad, Martin via Tech-talk
- Next:
Re: Filtering messages print on the IOC shell console Konrad, Martin via Tech-talk
- 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
2025
|