Skip to content
Snippets Groups Projects
Commit 3d219f2a authored by sveseli's avatar sveseli
Browse files

added generic dm integration ioc

parent f146ea3d
No related branches found
No related tags found
No related merge requests found
Showing
with 262 additions and 0 deletions
#Makefile at top of application tree
TOP = .
include $(TOP)/configure/CONFIG
DIRS := dmIntApp iocBoot
iocBoot_DEPEND_DIRS += $(filter %App,$(DIRS))
include $(TOP)/configure/RULES_TOP
deploy:
tidy: distclean
rm -rf $(TOP)/configure/RELEASE.support
O.*
*.local
*.support
# CONFIG - Load build configuration data
#
# Do not make changes to this file!
# Allow user to override where the build rules come from
RULES = $(EPICS_BASE)
# RELEASE files point to other application tops
include $(TOP)/configure/RELEASE
-include $(TOP)/configure/RELEASE.$(EPICS_HOST_ARCH).Common
ifdef T_A
-include $(TOP)/configure/RELEASE.Common.$(T_A)
-include $(TOP)/configure/RELEASE.$(EPICS_HOST_ARCH).$(T_A)
endif
CONFIG = $(RULES)/configure
include $(CONFIG)/CONFIG
# Override the Base definition:
INSTALL_LOCATION = $(TOP)
# CONFIG_SITE files contain other build configuration settings
include $(TOP)/configure/CONFIG_SITE
-include $(TOP)/configure/CONFIG_SITE.$(EPICS_HOST_ARCH).Common
ifdef T_A
-include $(TOP)/configure/CONFIG_SITE.Common.$(T_A)
-include $(TOP)/configure/CONFIG_SITE.$(EPICS_HOST_ARCH).$(T_A)
endif
# CONFIG_SITE
# Make any application-specific changes to the EPICS build
# configuration variables in this file.
#
# Host/target specific settings can be specified in files named
# CONFIG_SITE.$(EPICS_HOST_ARCH).Common
# CONFIG_SITE.Common.$(T_A)
# CONFIG_SITE.$(EPICS_HOST_ARCH).$(T_A)
# CHECK_RELEASE controls the consistency checking of the support
# applications pointed to by the RELEASE* files.
# Normally CHECK_RELEASE should be set to YES.
# Set CHECK_RELEASE to NO to disable checking completely.
# Set CHECK_RELEASE to WARN to perform consistency checking but
# continue building anyway if conflicts are found.
CHECK_RELEASE = WARN
# Set this when you only want to compile this application
# for a subset of the cross-compiled target architectures
# that Base is built for.
#CROSS_COMPILER_TARGET_ARCHS = vxWorks-ppc604
# To install files into a location other than $(TOP) define
# INSTALL_LOCATION here.
#INSTALL_LOCATION=</path/name/to/install/top>
# Set this when your IOC and the host use different paths
# to access the application. This will be needed to boot
# from a Microsoft FTP server or with some NFS mounts.
# You must rebuild in the iocBoot directory for this to
# take effect.
#IOCS_APPL_TOP = </IOC/path/to/application/top>
TOP=..
include $(TOP)/configure/CONFIG
TARGETS = $(CONFIG_TARGETS)
CONFIGS += $(subst ../,,$(wildcard $(CONFIG_INSTALLS)))
include $(TOP)/configure/RULES
tidy: distclean
rm -f RELEASE.support
# RELEASE - Location of external support modules
#
# IF YOU MAKE ANY CHANGES to this file you must subsequently
# do a "gnumake rebuild" in this application's top level
# directory.
#
# The build process does not check dependencies against files
# that are outside this application, thus you should do a
# "gnumake rebuild" in the top level directory after EPICS_BASE
# or any other external module pointed to below is rebuilt.
#
# Host- or target-specific settings can be given in files named
# RELEASE.$(EPICS_HOST_ARCH).Common
# RELEASE.Common.$(T_A)
# RELEASE.$(EPICS_HOST_ARCH).$(T_A)
#
# This file should ONLY define paths to other support modules,
# or include statements that pull in similar RELEASE files.
# Build settings that are NOT module paths should appear in a
# CONFIG_SITE file.
# Write RELEASE.support file before including it
DM_ROOT_DIR=$(TOP)/..
DM_SUPPORT_DIR_PRODUCTION=/
DM_SUPPORT_DIR_DEFAULT=$(DM_ROOT_DIR)/../support
RELEASE_SUPPORT=$(TOP)/configure/RELEASE.support
$(shell if [ ! -z $$DM_SUPPORT_DIR ]; then echo DM_SUPPORT_DIR=$$DM_SUPPORT_DIR > $(RELEASE_SUPPORT); elif [ -d $(DM_SUPPORT_DIR_DEFAULT) ]; then echo DM_SUPPORT_DIR=`realpath $(DM_SUPPORT_DIR_DEFAULT)` > $(RELEASE_SUPPORT) ; else echo DM_SUPPORT_DIR=$(DM_SUPPORT_DIR_PRODUCTION) > $(RELEASE_SUPPORT); fi)
include $(TOP)/configure/RELEASE.support
-include $(TOP)/configure/RELEASE.local
DM_OPT_DIR=$(DM_SUPPORT_DIR)/opt
EPICS_DIR=$(DM_OPT_DIR)/epics
EPICS_MODULES_DIR=$(EPICS_DIR)/modules
EPICS4_DIR=$(EPICS_MODULES_DIR)/epics4-cpp-4-6-0
EPICS_EXTENSIONS_DIR=$(DM_SUPPORT_DIR)/epics/extensions
PVDATA?=$(EPICS4_DIR)/pvDataCPP
PVCOMMON?=$(EPICS4_DIR)/pvCommonCPP
PVACCESS?=$(EPICS4_DIR)/pvAccessCPP
NORMATIVETYPES?=$(EPICS4_DIR)/normativeTypesCPP
PVDATABASE?=$(EPICS4_DIR)/pvDatabaseCPP
####################
# EPICS_BASE usually appears last so other apps can override stuff:
EPICS_BASE?=$(EPICS_DIR)/base
# Set RULES here if you want to take build rules from somewhere
# other than EPICS_BASE:
#RULES=/path/to/epics/support/module/rules/x-y
# RULES
include $(CONFIG)/RULES
# Library should be rebuilt because LIBOBJS may have changed.
$(LIBNAME): ../Makefile
#RULES.ioc
include $(CONFIG)/RULES.ioc
#RULES_DIRS
include $(CONFIG)/RULES_DIRS
#RULES_TOP
include $(CONFIG)/RULES_TOP
TOP = ..
include $(TOP)/configure/CONFIG
DIRS := db src
include $(TOP)/configure/RULES_DIRS
include "base.dbd"
#include "asyn.dbd"
#registrar("DmIntRegister")
// DM Integration IOC
#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);
}
TOP=../..
include $(TOP)/configure/CONFIG
#----------------------------------------
# ADD MACRO DEFINITIONS AFTER THIS LINE
#=============================
# Build the IOC application
PROD_IOC_linux-x86_64 = dmIntIoc
PROD_IOC += $(PROD_IOC_$(T_A))
# DmInt.dbd will be created and installed
DBD += dmInt.dbd
dmInt_DBD += DmInt.dbd
# DmInt_registerRecordDeviceDriver.cpp derives from dmInt.dbd
dmIntIoc_SRCS += DmIntMain.cpp dmInt_registerRecordDeviceDriver.cpp
# Link to the EPICS Base libraries
dmIntIoc_LIBS += $(EPICS_BASE_IOC_LIBS)
#=============================
include $(TOP)/configure/RULES
#----------------------------------------
# ADD RULES AFTER THIS LINE
TOP = ..
include $(TOP)/configure/CONFIG
DIRS += $(wildcard *ioc*)
DIRS += $(wildcard as*)
include $(CONFIG)/RULES_DIRS
O.*
.svnignore
cdCommands.debug
cdCommands
envPaths
TOP = ../..
include $(TOP)/configure/CONFIG
TARGETS = envPaths
ARCH = linux-x86_64
include $(TOP)/configure/RULES.ioc
#!../../bin/linux-x86_64/dmIntIoc
# The following syntax used in dbLoadRecords assigns an empty string to PF if none is provided
#P=${PF=}
< envPaths
##cd ${TOP}
cd ( "../..")
## Register all support components
dbLoadDatabase "dbd/dmInt.dbd"
dmInt_registerRecordDeviceDriver(pdbbase)
## Load record instances
dbLoadRecords("db/Workflow.db", "P=DM:1ID:, R=WORKFLOW:")
cd ${TOP}/iocBoot/${IOC}
iocInit
#!/bin/sh
# to reattach .... 'screen -r'
# to detach ... 'CTL^A d
# Allow this IOC to look at .2 PVs for acquisition conditions
export EPICS_CA_ADDR_LIST="pvgatemain1.aps4.anl.gov"
gnome-terminal -e "screen -xR DaqMonIoc ./st.cmd" &
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment