Skip to content
Draft
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
40 changes: 40 additions & 0 deletions DAS240/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# SPDX-FileCopyrightText: 2022 Argonne National Laboratory
#
# SPDX-License-Identifier: EPICS

# 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
7 changes: 7 additions & 0 deletions DAS240/DAS240-IOC-01App/Db/Analogue.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
record(ai, "$(P)C$(C):A$(N)") {
field(DTYP,"asynFloat64")
field(DESC, "Analogue Input $(N) on card $(C)")
field(INP,"@asyn($(PORT) $(OFFSET))FLOAT32_BE")
field(PREC,"3")
field(SCAN,"I/O Intr")
}
25 changes: 25 additions & 0 deletions DAS240/DAS240-IOC-01App/Db/DAS240.substitutions
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
global{P=\$(P)}

file "LogData.template" {
pattern{ N, OFFSET }
{ 1, 0 }
{ 2, 1 }
{ 3, 2 }
{ 4, 3 }
{ 5, 4 }
{ 6, 5 }
{ 7, 6 }
{ 8, 7 }
{ 9, 8 }
{ 10, 9 }
{ 11, 10 }
{ 12, 11 }
}

file "LogFunc.template" {
pattern{ N, OFFSET }
{ 1, 0 }
{ 2, 2 }
{ 3, 4 }
{ 4, 6 }
}
25 changes: 25 additions & 0 deletions DAS240/DAS240-IOC-01App/Db/DAS240A.substitutions
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
global{P=\$(P),C=\$(C),PORT=\$(PORT)}

file "Analogue.template" {
pattern{ N, OFFSET }
{ 1, 0 }
{ 2, 2 }
{ 3, 4 }
{ 4, 6 }
{ 5, 8 }
{ 6, 10 }
{ 7, 12 }
{ 8, 14 }
{ 9, 16 }
{ 10, 18 }
{ 11, 20 }
{ 12, 22 }
{ 13, 24 }
{ 14, 26 }
{ 15, 28 }
{ 16, 30 }
{ 17, 32 }
{ 18, 34 }
{ 19, 36 }
{ 20, 38 }
}
8 changes: 8 additions & 0 deletions DAS240/DAS240-IOC-01App/Db/LogData.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
record(bi, "$(P)DI$(N)") {
field(DESC, "Logical Input $(N)")
field(DTYP,"asynInt32")
field(INP,"@asyn(LOGD $(OFFSET))UINT16")
field(ZNAM, "Off")
field(ONAM, "On")
field(SCAN,"I/O Intr")
}
7 changes: 7 additions & 0 deletions DAS240/DAS240-IOC-01App/Db/LogFunc.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
record(ai, "$(P)K$(N)") {
field(DESC, "Logical Func $(N)")
field(DTYP,"asynFloat64")
field(INP,"@asyn(LOGF $(OFFSET))FLOAT32_BE")
field(PREC,"3")
field(SCAN,"I/O Intr")
}
22 changes: 22 additions & 0 deletions DAS240/DAS240-IOC-01App/Db/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# SPDX-FileCopyrightText: 1998 Argonne National Laboratory
#
# SPDX-License-Identifier: EPICS

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 += DAS240.db DAS240A.db

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

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

20 changes: 20 additions & 0 deletions DAS240/DAS240-IOC-01App/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# SPDX-FileCopyrightText: 1997 Argonne National Laboratory
#
# SPDX-License-Identifier: EPICS

# 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
27 changes: 27 additions & 0 deletions DAS240/DAS240-IOC-01App/src/DAS240-IOC-01Main.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
// SPDX-FileCopyrightText: 2000 Argonne National Laboratory
//
// SPDX-License-Identifier: EPICS

/* DAS240Main.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);
}
13 changes: 13 additions & 0 deletions DAS240/DAS240-IOC-01App/src/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# SPDX-FileCopyrightText: 2003 Argonne National Laboratory
#
# SPDX-License-Identifier: EPICS

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=DAS240-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)/DAS240-IOC-01App/src/build.mak
85 changes: 85 additions & 0 deletions DAS240/DAS240-IOC-01App/src/build.mak
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
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 DAS240
# We actually use $(APPNAME) below so this file can be included by multiple IOCs

PROD_IOC = $(APPNAME)
# DAS240.dbd will be created and installed
DBD += $(APPNAME).dbd

# DAS240.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 += modbusSupport.dbd
$(APPNAME)_DBD += asubFunctions.dbd
#$(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 += modbus
$(APPNAME)_LIBS += stream
$(APPNAME)_LIBS += lua
$(APPNAME)_LIBS += asyn
$(APPNAME)_LIBS += asubFunctions
## 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

# DAS240_registerRecordDeviceDriver.cpp derives from DAS240.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

35 changes: 35 additions & 0 deletions DAS240/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# SPDX-FileCopyrightText: 1997 Argonne National Laboratory
#
# SPDX-License-Identifier: EPICS

# 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
1 change: 1 addition & 0 deletions DAS240/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
IOC for Sefram DAS240
49 changes: 49 additions & 0 deletions DAS240/configure/CONFIG
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# SPDX-FileCopyrightText: 1997 Argonne National Laboratory
#
# SPDX-License-Identifier: EPICS

# 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

Loading