Imported files from METIS SVN

This commit is contained in:
Bernardo Carvalho
2019-10-09 10:59:54 +01:00
parent 61d1517c44
commit 70c9ee4b76
473 changed files with 10804 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
/* ISTTOKrpiMain.cpp */
/* Author: Marty Kraimer Date: 17MAR2000 */
#include <stddef.h>
#include <stdlib.h>
#include <stddef.h>
#include <string.h>
#include <stdio.h>
#include "epicsExit.h"
#include "epicsThread.h"
#include "iocsh.h"
int main(int argc,char *argv[])
{
if(argc>=2) {
iocsh(argv[1]);
epicsThreadSleep(.2);
}
iocsh(NULL);
epicsExit(0);
return(0);
}

View File

@@ -0,0 +1 @@
registrar(IsttokSeqExecRegistrar)

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,70 @@
TOP=../..
include $(TOP)/configure/CONFIG
#----------------------------------------
# ADD MACRO DEFINITIONS BELOW HERE
# Build an IOC support library
LIBRARY_IOC += ISTTOKrpiSupport
# Compile and add the code to the support library
# Link locally-provided code into the support library,
# rather than directly into the IOC application.
# This is required for Windows DLL builds.
ISTTOKrpiSupport_SRCS += initTrace.c
ISTTOKrpiSupport_LIBS += $(EPICS_BASE_IOC_LIBS)
# Build the IOC application
PROD_IOC = ISTTOKrpi
# ISTTOKrpi.dbd will be created and installed
DBD += ISTTOKrpi.dbd
# ISTTOKrpi.dbd will include these files:
ISTTOKrpi_DBD += base.dbd
ISTTOKrpi_DBD += initTrace.dbd
# Include dbd files from all support applications:
ISTTOKrpi_DBD += asyn.dbd
ISTTOKrpi_DBD += stream.dbd
ISTTOKrpi_DBD += drvAsynI2C.dbd
ISTTOKrpi_DBD += drvAsynSerialPort.dbd
ISTTOKrpi_DBD += asSupport.dbd
# Add all the support libraries needed by this IOC
ISTTOKrpi_LIBS += asyn
ISTTOKrpi_LIBS += stream
ISTTOKrpi_LIBS += drvAsynI2C
ISTTOKrpi_LIBS += autosave
# ISTTOKrpi_registerRecordDeviceDriver.cpp derives from ISTTOKrpi.dbd
ISTTOKrpi_SRCS += ISTTOKrpi_registerRecordDeviceDriver.cpp
# Build the main IOC entry point where needed
ISTTOKrpi_SRCS_DEFAULT += ISTTOKrpiMain.cpp
ISTTOKrpi_SRCS_vxWorks += -nil-
# Link in the code from our support library
ISTTOKrpi_LIBS += ISTTOKrpiSupport
# To build SNL programs, SNCSEQ must be defined
# in the <top>/configure/RELEASE file
ifneq ($(SNCSEQ),)
# Build sncExample into ISTTOKrpiSupport
IsttokSeqExec_SNCFLAGS += +r
ISTTOKrpi_DBD += IsttokSeqExec.dbd
# A .stt sequence program is *not* pre-processed:
ISTTOKrpiSupport_SRCS += IsttokSeqExec.stt
ISTTOKrpiSupport_LIBS += seq pv
ISTTOKrpi_LIBS += seq pv
endif
# Finally link IOC to the EPICS Base libraries
ISTTOKrpi_LIBS += $(EPICS_BASE_IOC_LIBS)
include $(TOP)/configure/RULES
#----------------------------------------
# ADD EXTRA GNUMAKE RULES BELOW HERE

View File

@@ -0,0 +1,39 @@
/* initTrace.c */
/*
* An initHook routine to trace the iocInit() process.
* Prints out the name of each state as it is reached.
*/
#include <stdio.h>
#include "initHooks.h"
#include "epicsExport.h"
#include "iocsh.h"
static void trace(initHookState state) {
printf("iocInit: Reached %s\n", initHookName(state));
}
int traceIocInit(void) {
static int done = 0;
if (done)
return -1;
done = 1;
initHookRegister(trace);
puts("iocInit will be traced");
return 0;
}
static const iocshFuncDef traceInitFuncDef = {"traceIocInit", 0, NULL};
static void traceInitFunc(const iocshArgBuf *args) {
traceIocInit();
}
static void initTraceRegister(void) {
iocshRegister(&traceInitFuncDef, traceInitFunc);
}
epicsExportRegistrar(initTraceRegister);

View File

@@ -0,0 +1 @@
registrar(initTraceRegister)