This is Unofficial EPICS BASE Doxygen Site
dbtoolsIocRegister.c
Go to the documentation of this file.
1 /*************************************************************************\
2 * Copyright (c) 2007 UChicago Argonne LLC, as Operator of Argonne
3 * National Laboratory.
4 * EPICS BASE is distributed subject to a Software License Agreement found
5 * in file LICENSE that is included with this distribution.
6 \*************************************************************************/
7 
8 #include "iocsh.h"
9 
10 #define epicsExportSharedSymbols
11 #include "dbtoolsIocRegister.h"
12 #include "dbLoadTemplate.h"
13 
14 
15 /* dbLoadTemplate */
16 static const iocshArg dbLoadTemplateArg0 = {"filename", iocshArgString};
17 static const iocshArg dbLoadTemplateArg1 = {"var=value", iocshArgString};
18 static const iocshArg * const dbLoadTemplateArgs[2] = {
19  &dbLoadTemplateArg0, &dbLoadTemplateArg1
20 };
21 static const iocshFuncDef dbLoadTemplateFuncDef =
22  {"dbLoadTemplate", 2, dbLoadTemplateArgs};
23 static void dbLoadTemplateCallFunc(const iocshArgBuf *args)
24 {
25  iocshSetError(dbLoadTemplate(args[0].sval, args[1].sval));
26 }
27 
28 
30 {
31  iocshRegister(&dbLoadTemplateFuncDef, dbLoadTemplateCallFunc);
32 }
epicsShareFunc int dbLoadTemplate(const char *sub_file, const char *cmd_collect)
void epicsStdCall iocshRegister(const iocshFuncDef *piocshFuncDef, iocshCallFunc func)
Definition: iocsh.cpp:111
void dbtoolsIocRegister(void)
int iocshSetError(int err)
Signal error from an IOC shell function.
Definition: iocsh.cpp:536
Definition: iocsh.h:56