Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Litron IOC #902

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions LITRON/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Install directories
/bin/
/cfg/
/db/
/dbd/
/html/
/include/
/lib/
/templates/
/data/

# Local configuration files
/configure/*.local

# iocBoot generated files
/iocBoot/*ioc*/cdCommands
/iocBoot/*ioc*/dllPath*.bat
/iocBoot/*ioc*/dllCopy.bat
/iocBoot/*ioc*/runIOC.bat
/iocBoot/*ioc*/runIOC.sh
/iocBoot/*ioc*/envPaths
/iocBoot/*ioc*/relPaths.sh

# iocsh
.iocsh_history

# Build directories
O.*/

# Common files created by other tools
/QtC-*
/.vscode/
*.orig
*.log
.*.swp
.DS_Store
18 changes: 18 additions & 0 deletions LITRON/LITRON-IOC-01App/Db/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
TOP=../..
include $(TOP)/configure/CONFIG
#----------------------------------------
# ADD MACRO DEFINITIONS AFTER THIS LINE

#----------------------------------------------------
# Create and install (or just install) into <top>/db
# databases, templates, substitutions like this
#DB += xxx.db

#----------------------------------------------------
# If <anyname>.db template is not named <anyname>*.template add
# <anyname>_template = <templatename>

include $(TOP)/configure/RULES
#----------------------------------------
# ADD RULES AFTER THIS LINE

16 changes: 16 additions & 0 deletions LITRON/LITRON-IOC-01App/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Makefile at top of application tree
TOP = ..
include $(TOP)/configure/CONFIG

# Directories to be built, in any order.
# You can replace these wildcards with an explicit list
DIRS += $(wildcard src* *Src*)
DIRS += $(wildcard db* *Db*)
DIRS += $(wildcard *protocol*)


# If the build order matters, add dependency rules like this,
# which specifies that xxxSrc must be built after src:
#xxxSrc_DEPEND_DIRS += src

include $(TOP)/configure/RULES_DIRS
23 changes: 23 additions & 0 deletions LITRON/LITRON-IOC-01App/src/LITRON-IOC-01Main.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/* LITRON-IOC-01Main.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);
}
9 changes: 9 additions & 0 deletions LITRON/LITRON-IOC-01App/src/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
TOP=../..
# This file should do very little - it's purpose is to set the APPNAME and then load build.mak

# this definition is used in build.mak
APPNAME=LITRON-IOC-01

# If we are ###-IOC-01 leave this as is, if we are ###-IOC-02 or higher change to ###-IOC-01 and delete build.mak from this directory
# there should only be a single build.mak for all IOCs of a given family and it is located in the ###-IOC-01 directory
include $(TOP)/LITRON-IOC-01App/src/build.mak
81 changes: 81 additions & 0 deletions LITRON/LITRON-IOC-01App/src/build.mak
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
TOP=../..

include $(TOP)/configure/CONFIG
#----------------------------------------
# ADD MACRO DEFINITIONS AFTER THIS LINE
#=============================

### NOTE: there should only be one build.mak for a given IOC family and this should be located in the ###-IOC-01 directory

#=============================
# Build the IOC application LITRON-IOC-01
# We actually use $(APPNAME) below so this file can be included by multiple IOCs

PROD_IOC = $(APPNAME)
# LITRON-IOC-01.dbd will be created and installed
DBD += $(APPNAME).dbd

# LITRON-IOC-01.dbd will be made up from these files:
$(APPNAME)_DBD += base.dbd
## ISIS standard dbd ##
$(APPNAME)_DBD += icpconfig.dbd
$(APPNAME)_DBD += pvdump.dbd
$(APPNAME)_DBD += asSupport.dbd
$(APPNAME)_DBD += devIocStats.dbd
$(APPNAME)_DBD += caPutLog.dbd
$(APPNAME)_DBD += calcSupport.dbd
$(APPNAME)_DBD += utilities.dbd
## Stream device support ##
$(APPNAME)_DBD += asyn.dbd
$(APPNAME)_DBD += drvAsynSerialPort.dbd
$(APPNAME)_DBD += drvAsynIPPort.dbd
$(APPNAME)_DBD += luaSupport.dbd
$(APPNAME)_DBD += stream.dbd
## add other dbd here ##
#$(APPNAME)_DBD += xxx.dbd

# Add all the support libraries needed by this IOC

## Add additional libraries here ##
#$(APPNAME)_LIBS += xxx

## ISIS standard libraries ##
## Stream device libraries ##
$(APPNAME)_LIBS += stream
$(APPNAME)_LIBS += lua
$(APPNAME)_LIBS += asyn
## other standard libraries here ##
$(APPNAME)_LIBS += devIocStats
$(APPNAME)_LIBS += pvdump $(MYSQLLIB) easySQLite sqlite
$(APPNAME)_LIBS += caPutLog
$(APPNAME)_LIBS += icpconfig
$(APPNAME)_LIBS += autosave
$(APPNAME)_LIBS += utilities pugixml libjson zlib
$(APPNAME)_LIBS += calc sscan
$(APPNAME)_LIBS += pcrecpp pcre
$(APPNAME)_LIBS += seq pv

# LITRON-IOC-01_registerRecordDeviceDriver.cpp derives from LITRON-IOC-01.dbd
$(APPNAME)_SRCS += $(APPNAME)_registerRecordDeviceDriver.cpp

# Build the main IOC entry point on workstation OSs.
$(APPNAME)_SRCS_DEFAULT += $(APPNAME)Main.cpp
$(APPNAME)_SRCS_vxWorks += -nil-

# Add support from base/src/vxWorks if needed
#$(APPNAME)_OBJS_vxWorks += $(EPICS_BASE_BIN)/vxComLibrary

## area detector already includes PVA, so avoid including it twice
ifeq ($(AREA_DETECTOR),)
include $(CONFIG)/CONFIG_PVA_ISIS
endif

# Finally link to the EPICS Base libraries
$(APPNAME)_LIBS += $(EPICS_BASE_IOC_LIBS)

#===========================

include $(TOP)/configure/RULES
#----------------------------------------
# ADD RULES AFTER THIS LINE

31 changes: 31 additions & 0 deletions LITRON/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Makefile at top of application tree
TOP = .
include $(TOP)/configure/CONFIG

# Directories to build, any order
DIRS += configure
DIRS += $(wildcard *Sup)
DIRS += $(wildcard *App)
DIRS += $(wildcard *Top)
DIRS += $(wildcard iocBoot)

# The build order is controlled by these dependency rules:

# All dirs except configure depend on configure
$(foreach dir, $(filter-out configure, $(DIRS)), \
$(eval $(dir)_DEPEND_DIRS += configure))

# Any *App dirs depend on all *Sup dirs
$(foreach dir, $(filter %App, $(DIRS)), \
$(eval $(dir)_DEPEND_DIRS += $(filter %Sup, $(DIRS))))

# Any *Top dirs depend on all *Sup and *App dirs
$(foreach dir, $(filter %Top, $(DIRS)), \
$(eval $(dir)_DEPEND_DIRS += $(filter %Sup %App, $(DIRS))))

# iocBoot depends on all *App dirs
iocBoot_DEPEND_DIRS += $(filter %App,$(DIRS))

# Add any additional dependency rules here:

include $(TOP)/configure/RULES_TOP
45 changes: 45 additions & 0 deletions LITRON/configure/CONFIG
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# 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

# Check EPICS_BASE is set properly
ifneq (file,$(origin EPICS_BASE))
$(error EPICS_BASE must be set in a configure/RELEASE file)
else
ifeq ($(wildcard $(EPICS_BASE)/configure/CONFIG_BASE),)
$(error EPICS_BASE does not point to an EPICS installation)
endif
endif

CONFIG = $(RULES)/configure
include $(CONFIG)/CONFIG

# Override the Base definition:
INSTALL_LOCATION = $(TOP)

# CONFIG_SITE files contain local build configuration settings
include $(TOP)/configure/CONFIG_SITE

# Host-arch specific settings
-include $(TOP)/configure/CONFIG_SITE.$(EPICS_HOST_ARCH).Common

ifdef T_A
# Target-arch specific settings
-include $(TOP)/configure/CONFIG_SITE.Common.$(T_A)

# Host & target specific settings
-include $(TOP)/configure/CONFIG_SITE.$(EPICS_HOST_ARCH).$(T_A)
endif

43 changes: 43 additions & 0 deletions LITRON/configure/CONFIG_SITE
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# 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 even if conflicts are found.
CHECK_RELEASE = YES

# 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-ppc32

# To install files into a location other than $(TOP) define
# INSTALL_LOCATION here.
#INSTALL_LOCATION=</absolute/path/to/install/top>

# Set this when the IOC and build host use different paths
# to the install location. This may be needed to boot from
# a Microsoft FTP server say, or on some NFS configurations.
#IOCS_APPL_TOP = </IOC's/absolute/path/to/install/top>

# For application debugging purposes, override the HOST_OPT and/
# or CROSS_OPT settings from base/configure/CONFIG_SITE
#HOST_OPT = NO
#CROSS_OPT = NO

# These allow developers to override the CONFIG_SITE variable
# settings without having to modify the configure/CONFIG_SITE
# file itself.
-include $(TOP)/../CONFIG_SITE.local
-include $(TOP)/configure/CONFIG_SITE.local

8 changes: 8 additions & 0 deletions LITRON/configure/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
TOP=..

include $(TOP)/configure/CONFIG

TARGETS = $(CONFIG_TARGETS)
CONFIGS += $(subst ../,,$(wildcard $(CONFIG_INSTALLS)))

include $(TOP)/configure/RULES
74 changes: 74 additions & 0 deletions LITRON/configure/RELEASE
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# RELEASE - Location of external support modules
#
# IF YOU CHANGE ANY PATHS in this file or make API changes to
# any modules it refers to, you should do a "make rebuild" in
# this application's top level directory.
#
# The EPICS build process does not check dependencies against
# any files from outside the application, so it is safest to
# rebuild it completely if any modules it depends on change.
#
# 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 is parsed by both GNUmake and an EPICS Perl script,
# so it may ONLY contain definititions of paths to other support
# modules, variable definitions that are used in module paths,
# and include statements that pull in other RELEASE files.
# Variables may be used before their values have been set.
# Build variables that are NOT used in paths should be set in
# the CONFIG_SITE file.

# Variables and paths to dependent modules:
#MODULES = /path/to/modules
#MYMODULE = $(MODULES)/my-module

# If using the sequencer, point SNCSEQ at its top directory:
#SNCSEQ = $(MODULES)/seq-ver

# EPICS_BASE should appear last so earlier modules can override stuff:
EPICS_BASE = C:/Instrument/Apps/EPICS/base/master

# Set RULES here if you want to use build rules from somewhere
# other than EPICS_BASE:
#RULES = $(MODULES)/build-rules

# These lines allow developers to override these RELEASE settings
# without having to modify this file directly.
-include $(TOP)/../RELEASE.local
-include $(TOP)/../RELEASE.$(EPICS_HOST_ARCH).local
-include $(TOP)/configure/RELEASE.local

# Macros required for basic ioc/stream device
ACCESSSECURITY=$(SUPPORT)/AccessSecurity/master
ASUBFUNCTIONS=$(SUPPORT)/asubFunctions/master
ASYN=$(SUPPORT)/asyn/master
AUTOSAVE=$(SUPPORT)/autosave/master
CALC=$(SUPPORT)/calc/master
CAPUTLOG=$(SUPPORT)/caPutLog/master
DEVIOCSTATS=$(SUPPORT)/devIocStats/master
ICPCONFIG=$(SUPPORT)/icpconfig/master
LIBJSON=$(SUPPORT)/libjson/master
LUA=$(SUPPORT)/lua/master
MYSQL=$(SUPPORT)/MySQL/master
ONCRPC=$(SUPPORT)/oncrpc/master
PCRE=$(SUPPORT)/pcre/master
PUGIXML=$(SUPPORT)/pugixml/master
PVDUMP=$(SUPPORT)/pvdump/master
SNCSEQ=$(SUPPORT)/seq/master
SQLITE=$(SUPPORT)/sqlite/master
SSCAN=$(SUPPORT)/sscan/master
STREAMDEVICE=$(SUPPORT)/StreamDevice/master
UTILITIES=$(SUPPORT)/utilities/master
ZLIB=$(SUPPORT)/zlib/master

# optional extra local definitions here
-include $(TOP)/configure/RELEASE.private

include $(TOP)/../../../ISIS_CONFIG
-include $(TOP)/../../../ISIS_CONFIG.$(EPICS_HOST_ARCH)

# IOC-specific support module
LITRON=$(SUPPORT)/litron/master
Loading