68 #include "subRecord.h" 77 #define DBD_FILE "dbd/softIocPVA.dbd" 78 #define EXIT_FILE "db/softIocExit.db" 80 #define DBD_FILE FINAL_LOCATION "/dbd/softIocPVA.dbd" 81 #define EXIT_FILE FINAL_LOCATION "/db/softIocExit.db" 85 #if EPICS_VERSION_INT>=VERSION_INT(3,15,0,1) 86 #define USE_EXIT_LATER 94 static void exitSubroutine(subRecord *precord) {
98 epicsExit((precord->a == 0.0) ? EXIT_SUCCESS : EXIT_FAILURE);
103 printf(
"Usage: %s [-D softIoc.dbd] [-h] [-S] [-a ascf]\n",
arg0);
104 puts(
"\t[-m macro=value,macro2=value2] [-d file.db]");
105 puts(
"\t[-x prefix] [st.cmd]");
106 puts(
"Compiled-in path to softIocPVA.dbd is:");
112 int main(
int argc,
char *argv[])
114 char *dbd_file =
const_cast<char*
>(
base_dbd);
120 arg0 = strrchr(*argv,
'/');
130 if (argc>0 && **argv==
'-' && (*argv)[1]==
'h') {
134 if (argc>1 && **argv==
'-' && (*argv)[1]==
'D') {
140 if (dbLoadDatabase(dbd_file,
NULL,
NULL)) {
147 while (argc>1 && **argv ==
'-') {
148 switch ((*argv)[1]) {
156 if (dbLoadRecords(*++argv, macros)) {
180 if (dbLoadRecords(
exit_db, xmacro)) {
188 printf(
"%s: option '%s' not recognized\n",
arg0, *argv);
195 if (argc>0 && **argv==
'-') {
201 printf(
"%s: missing argument to option '%s'\n",
arg0, *argv);
215 printf(
"%s: option '%s' not recognized\n",
arg0, *argv);
#define PVNAME_STRINGSZ
Size of a record name including the nil terminator.
void(* REGISTRYFUNCTION)(void)
LIBCOM_API void epicsExitLater(int status)
Arrange to call epicsExit() later from a low priority thread.
int asSetSubstitutions(const char *substitutions)
int epicsStdCall iocsh(const char *pathname)
int softIocPVA_registerRecordDeviceDriver(struct dbBase *pdbbase)
LIBCOM_API void epicsExit(int status)
Calls epicsExitCallAtExits(), then the OS exit() routine.
Extended replacement for the Posix exit and atexit routines.
LIBCOM_API void epicsStdCall epicsThreadExitMain(void)
epicsShareFunc int registryFunctionAdd(const char *name, REGISTRYFUNCTION func)
int main(int argc, char *argv[])
LIBCOM_API void epicsStdCall epicsThreadSleep(double seconds)
Block the calling thread for at least the specified time.
C++ and C descriptions for a thread.
int asSetFilename(const char *acf)
LIBCOM_API int epicsStdCall epicsSnprintf(char *str, size_t size, const char *format,...) EPICS_PRINTF_STYLE(3