EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  <20052006  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  2002  2003  2004  <20052006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: ???registrar(function_name)
From: Andrew Johnson <[email protected]>
To: "Liyu, Andrei" <[email protected]>
Cc: [email protected]
Date: Thu, 07 Apr 2005 17:57:36 -0500
Liyu, Andrei wrote:
	As I understand Application Developer's Guide 6.8 I can register
function and call it from iocsh (ioc shell).

	Ok. I build IOC (windows, epics 3.14.7, MVC++.NET) from example
template. Start it ... get

">epics"
type "asSub" or "asSub()"

and read
"command asSub not found"

What is wrong?

A registrar(function) entry in a DBD file does not automatically register a command with the IOC shell itself, it just arranges for the named function to be called during the IOC's startup process. The registrar function can then perform any actions you wish to take place at that time, including registering new iocsh commands (for which you have to provide additional information in C code).


See the various files in the <base>/src/iocsh/ directory for examples of the command tables and the related call to iocshRegister() that you have to make to add a new command. We really should have an example of how to do all this in the example template, but we don't appear to at present.

There is no fundamental reason why we can't provide a way to register commands by just adding them to a .dbd file and have them converted into the appropriate tables automatically, it's just that nobody has had time to write that code yet.

- Andrew
--
Podiabombastic: The tendency to shoot oneself in the foot.

Replies:
Re: ???registrar(function_name) Tim Mooney
References:
???registrar(function_name) Liyu, Andrei

Navigate by Date:
Prev: ???registrar(function_name) Liyu, Andrei
Next: Re: building libraries from only objs and libs in 3.14 Benjamin Franksen
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  <20052006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: ???registrar(function_name) Liyu, Andrei
Next: Re: ???registrar(function_name) Tim Mooney
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  <20052006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 02 Sep 2010 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·