Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
e3-require
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Anders Lindh Olsson
e3-require
Commits
8b7f2162
Commit
8b7f2162
authored
5 years ago
by
Jeong Han Lee
Browse files
Options
Downloads
Patches
Plain Diff
softIoc support for the future release
parent
d5ac822f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
tools/iocsh.bash
+19
-9
19 additions, 9 deletions
tools/iocsh.bash
tools/iocsh_functions
+15
-7
15 additions, 7 deletions
tools/iocsh_functions
with
34 additions
and
16 deletions
tools/iocsh.bash
+
19
−
9
View file @
8b7f2162
...
...
@@ -44,11 +44,12 @@
# term if each IOC cannot be closed properly
# 0.4.3 : - Tune REQUIRE-* PV in order to replace - with . easily
# 0.4.4 : - Replace the absolute bash path with env one
# 0.5.0 : - Introduce EPICSV3 to use softIoc instead of softIocPVA after BASE 7.0.3.1
#
declare
-gr
SC_SCRIPT
=
"
$(
realpath
"
$0
"
)
"
;
declare
-gr
SC_SCRIPTNAME
=
${
0
##*/
}
;
declare
-gr
SC_TOP
=
"
${
SC_SCRIPT
%/*
}
"
;
declare
-g
SC_VERSION
=
"0.
4.4
"
;
declare
-g
SC_VERSION
=
"0.
5.0
"
;
declare
-g
STARTUP
=
""
;
declare
-g
BASECODE
=
""
;
declare
-gr
TMP_PATH
=
"/tmp/systemd-private-e3-iocsh"
;
...
...
@@ -106,12 +107,11 @@ trap "softIoc_end ${IOC_STARTUP}" EXIT HUP INT TERM
printf
"# Set REQUIRE_IOC for its internal PVs
\n
"
;
printf
"epicsEnvSet REQUIRE_IOC
\"
${
REQUIRE_IOC
}
\"\n
"
;
printf
"#
\n
"
;
printf
"# Enable an exit subroutine
for sotfioc
\n
"
;
printf
"# Enable an exit subroutine
.
\n
"
printf
"dbLoadRecords
\"
${
EPICS_BASE
}
/db/softIocExit.db
\"
\"
IOC=
${
REQUIRE_IOC
}
\"\n
"
;
printf
"#
\n
"
;
printf
"# Set E3_IOCSH_TOP for the absolute path where %s is executed.
\n
"
"
${
SC_SCRIPTNAME
}
"
printf
"epicsEnvSet E3_IOCSH_TOP
\"
${
IOCSH_TOP
}
\"\n
"
;
printf
"#
\n
"
;
loadRequire
;
...
...
@@ -124,7 +124,7 @@ trap "softIoc_end ${IOC_STARTUP}" EXIT HUP INT TERM
if
[
"
$REALTIME
"
==
"RT"
]
;
then
printf
"# Real Time
\"
$REALTIME
\"\n
"
;
fi
if
[
"
$init
"
!=
NO
]
;
then
printf
"#
\n
"
;
printf
"iocInit
\n
"
...
...
@@ -147,13 +147,23 @@ else
__CHRT__
=
""
;
fi
if
[[
${
BASECODE
}
-ge
07000101
]]
;
then
__PVA__
=
"PVA"
if
[
"
$EPICSV3
"
==
"V3"
]
;
then
SOFTIOC_NAME
=
"softIoc"
else
SOFTIOC_NAME
=
"softIocPVA"
fi
else
__PVA__
=
"
"
SOFTIOC_NAME
=
"softIoc
"
fi
#
#
${
__CHRT__
}${
EPICS_BASE
}
/bin/
${
EPICS_HOST_ARCH
}
/softIoc
${
__PVA__
}
-D
${
EPICS_BASE
}
/dbd/softIoc
${
__PVA__
}
.dbd
"
${
IOC_STARTUP
}
"
2>&1
if
[[
${
BASECODE
}
-eq
07000301
]]
&&
[
"
$EPICSV3
"
==
"V3"
]
;
then
SOFTIOC_NAME
=
"softIocPVA"
printf
"##
\n
"
;
printf
"## Unfornately, EPICS_BASE %s doesn't support the softIoc feature.
\n
"
"
${
EPICS_BASE
}
"
;
printf
"## Force to use %s
\n
"
"
${
SOFTIOC_NAME
}
"
;
printf
"##
\n
"
;
fi
${
__CHRT__
}${
EPICS_BASE
}
/bin/
${
EPICS_HOST_ARCH
}
/
${
SOFTIOC_NAME
}
-D
${
EPICS_BASE
}
/dbd/
${
SOFTIOC_NAME
}
.dbd
"
${
IOC_STARTUP
}
"
2>&1
This diff is collapsed.
Click to expand it.
tools/iocsh_functions
+
15
−
7
View file @
8b7f2162
...
...
@@ -29,6 +29,8 @@ E_NOTROOT=101
EXIST
=
1
NON_EXIST
=
0
REALTIME
=
EPICSV3
=
SOFTIOC_NAME
=
function
pushd
{
builtin pushd
"
$@
"
>
/dev/null
;
}
function
popd
{
builtin popd
"
$@
"
>
/dev/null
;
}
...
...
@@ -223,21 +225,24 @@ function printIocEnv
var_list+
=(
PATH
)
;
var_list+
=(
LD_LIBRARY_PATH
)
;
printf
"#
\n
"
;
printf
"# Start at
\"
$(
date
+%Y-W%V-%b%d-%H%M-%S-%Z
)
\"\n
"
printf
"#
\n
"
;
printf
"# Version information:
\n
"
;
printf
"# %s : %s%s
\n
"
"European Spallation Source ERIC"
"
$SC_SCRIPTNAME
"
${
SC_VERSION
:+
" (
$SC_VERSION
)"
}
;
printf
"# ------>-----> snip ----->------>
\n
"
;
printf
"#
\n
"
;
printf
"# --->--> snip -->-->
\n
"
;
printf
"# Please Use Version and other environment variables
\n
"
;
printf
"# in order to report or debug this shell
\n
"
;
printf
"#
\n
"
;
printf
"# The IOC is started at
\"
$(
date
+%Y-W%V-%b%d-%H%M-%S-%Z
)
\"\n
"
;
printf
"#
\n
"
;
printf
"# Version information:
\n
"
;
printf
"# %s : %s%s
\n
"
"European Spallation Source ERIC"
"
$SC_SCRIPTNAME
"
${
SC_VERSION
:+
" (
$SC_VERSION
)"
}
;
printf
"#
\n
"
;
for
var
in
${
var_list
[@]
}
;
do
printf
"#
$var
=
\"
${
!var
}
\"\n
"
done
printf
"# --->--> snip -->-->
\n
"
;
printf
"#
\n
"
;
printf
"# ------>-----> snip ----->------>
\n
"
;
printf
"#
\n
"
;
}
;
...
...
@@ -393,6 +398,9 @@ function loadFiles
(
-rt
|
-RT
|
-realtime
|
--realtime
)
REALTIME
=
"RT"
;;
(
-v3
|
-V3
|
-epicsv3
|
--EPICSV3
)
EPICSV3
=
"V3"
;;
(
@
*
)
loadFiles
$(
cat
${
file
#@
}
)
;;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment