EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  <20022003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  <20022003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: Access to device support debugging vars via iocsh (3.14b2)
From: Eric Norum <[email protected]>
To: "S. Joshua Stein" <[email protected]>
Cc: [email protected]
Date: Mon, 19 Aug 2002 09:55:21 -0600

On Monday, August 19, 2002, at 08:52 AM, S. Joshua Stein wrote:


I would like to set a (global) debugging variable which is part of my device
support running on a solaris IOC (3.14b2). In the vxWorks world, I would just
type:


deviceDebugVar=1

This, however, won't work with iocsh. Does anyone know if/how I can gain access
to these variables?

Non-vxWorks IOCs don't have access to the executable symbol table (at the moment) so this trick of assigning to variables doesn't work. About the only thing I can suggest for now is to register a command to set the variable:


/* setDebug */
static const iocshArg setDebugArg0 = { "level",iocshArgInt};
static const iocshArg * const setDebugArgs[1] = {&setDebugArg0};
static const iocshFuncDef setDebugFuncDef = {"setDebug",1,setDebugArgs};
static void setDebugCallFunc(const iocshArgBuf *args)
{
    deviceDebugVar( args[0].ival);
}


Then, somewhere in your device initialization, register the command: iocshRegister(&setDebugFuncDef,setDebugCallFunc);



Or, you can use a C++ static constructor to register the command for you when the application starts. For example,
class SetDebugRegister {
public:
SetDebugRegister() { iocshRegister(&setDebugFuncDef,setDebugCallFunc); }
};
static SetDebugRegister setDebugRegisterObj;



-- Eric Norum <[email protected]> Department of Electrical Engineering University of Saskatchewan Saskatoon, Canada. Phone: (306) 966-5394 FAX: (306) 966-5407


Replies:
Re: Access to device support debugging vars via iocsh (3.14b2) Eric Norum
References:
Access to device support debugging vars via iocsh (3.14b2) S. Joshua Stein

Navigate by Date:
Prev: Re: Capfast Symbol for Motor Record Benjamin Franksen
Next: Re: Access to device support debugging vars via iocsh (3.14b2) Eric Norum
Index: 1994  1995  1996  1997  1998  1999  2000  2001  <20022003  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: Access to device support debugging vars via iocsh (3.14b2) S. Joshua Stein
Next: Re: Access to device support debugging vars via iocsh (3.14b2) Eric Norum
Index: 1994  1995  1996  1997  1998  1999  2000  2001  <20022003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 10 Aug 2010 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·