initial commit

This commit is contained in:
vagrant
2022-03-16 21:34:15 +01:00
commit 46325d0ddf
8 changed files with 215 additions and 0 deletions
+4
View File
@@ -0,0 +1,4 @@
O.*
/bin
/db
/dbd
+138
View File
@@ -0,0 +1,138 @@
#
# Copyright (c) 2019 - 2022, European Spallation Source ERIC
#
# The program is free software: you can redistribute it and/or modify it
# under the terms of the BSD 3-Clause license.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE.
#
# Author : Tomasz Brys
# email : tomasz.brys@ess.eu
# Date : 2022-03-16
# version : 0.0.0
#
# This template file is based on one generated by e3TemplateGenerator.bash.
# Please look at many other module_name.Makefile in the https://gitlab.esss.lu.se/epics-modules/
# repositories.
#
## The following lines are mandatory, please don't change them.
where_am_I := $(dir $(abspath $(lastword $(MAKEFILE_LIST))))
include $(E3_REQUIRE_TOOLS)/driver.makefile
############################################################################
#
# Add any required modules here that come from startup scripts, etc.
#
############################################################################
# REQUIRED += stream
############################################################################
#
# If you want to exclude any architectures:
#
############################################################################
# EXCLUDE_ARCHS += linux-ppc64e6500
############################################################################
#
# Relevant directories to point to files
#
############################################################################
APP:=ADHamaApp
#APPDB:=$(APP)/Db
APPSRC:=$(APP)/src
#APPCMDS:=$(APP)/cmds
############################################################################
#
# Add any files that should be copied to $(module)/Db
#
############################################################################
# TEMPLATES += $(wildcard $(APPDB)/*.db)
# TEMPLATES += $(wildcard $(APPDB)/*.proto)
# TEMPLATES += $(wildcard $(APPDB)/*.template)
# USR_INCLUDES += -I$(where_am_I)$(APPSRC)
############################################################################
#
# Add any files that need to be compiled (e.g. .c, .cpp, .st, .stt)
#
############################################################################
SOURCES += $(APPSRC)/ADHamaMain.cpp
############################################################################
#
# Add any .dbd files that should be included (e.g. from user-defined functions, etc.)
#
############################################################################
#DBDS +=
############################################################################
#
# Add any header files that should be included in the install (e.g.
# StreamDevice or asyn header files that are used by other modules)
#
############################################################################
#HEADERS +=
############################################################################
#
# Add any startup scripts that should be installed in the base directory
#
############################################################################
SCRIPTS += $(wildcard iocsh/*.iocsh)
############################################################################
#
# If you have any .substitution files, and template files, add them here.
#
############################################################################
# SUBS=$(wildcard $(APPDB)/*.substitutions)
# TMPS=$(wildcard $(APPDB)/*.template)
USR_DBFLAGS += -I . -I ..
USR_DBFLAGS += -I $(EPICS_BASE)/db
USR_DBFLAGS += -I $(APPDB)
db: $(SUBS) $(TMPS)
$(SUBS):
@printf "Inflating database ... %44s >>> %40s \n" "$@" "$(basename $(@)).db"
@rm -f $(basename $(@)).db.d $(basename $(@)).db
@$(MSI) -D $(USR_DBFLAGS) -o $(basename $(@)).db -S $@ > $(basename $(@)).db.d
@$(MSI) $(USR_DBFLAGS) -o $(basename $(@)).db -S $@
$(TMPS):
@printf "Inflating database ... %44s >>> %40s \n" "$@" "$(basename $(@)).db"
@rm -f $(basename $(@)).db.d $(basename $(@)).db
@$(MSI) -D $(USR_DBFLAGS) -o $(basename $(@)).db $@ > $(basename $(@)).db.d
@$(MSI) $(USR_DBFLAGS) -o $(basename $(@)).db $@
.PHONY: db $(SUBS) $(TMPS)
vlibs:
.PHONY: vlibs
+24
View File
@@ -0,0 +1,24 @@
/* ADHamaMain.cpp */
/* Author: Tomasz Brys */
/* Date: 2022-03-16 */
#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);
}
+29
View File
@@ -0,0 +1,29 @@
BSD 3-Clause License
Copyright (c) 2022, European Spallation Source ERIC
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+11
View File
@@ -0,0 +1,11 @@
ADHama
======
European Spallation Source ERIC Site-specific EPICS module : ADHama
Additonal information:
* [Documentation](https://confluence.esss.lu.se/display/IS/Integration+by+ICS)
* [Release notes](RELEASE.md)
* [Requirements](https://gitlab.esss.lu.se/e3-recipes/ADHama-recipe/-/blob/master/recipe/meta.yaml#L18)
* [Building and Testing](https://confluence.esss.lu.se/display/IS/1.+Development+locally+with+e3+and+Conda#id-1.Developmentlocallywithe3andConda-BuildanEPICSmoduleandtestitlocally)
+2
View File
@@ -0,0 +1,2 @@
Release Notes
=============
+4
View File
@@ -0,0 +1,4 @@
# This should be a test startup script
require ADHama
iocshLoad("$(ADHama_DIR)/ADHama.iocsh")
+3
View File
@@ -0,0 +1,3 @@
# This should be the included snippet to configure and run the deployed IOC. It should be loaded with
#
# iocshLoad("$(ADHama_DIR)/ADHama.iocsh")