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 | 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 |
<== Date ==> | <== Thread ==> |
---|
Subject: | Re: ???registrar(function_name) |
From: | Tim Mooney <[email protected]> |
To: | [email protected] |
Cc: | "Liyu, Andrei" <[email protected]> |
Date: | Fri, 08 Apr 2005 05:55:52 -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.
-- Tim Mooney ([email protected]; 630-252-5417) Advanced Photon Source APS Operations Division Beamline Controls & Data Acquisition Group