add caputlog example

This commit is contained in:
Michael Davidsaver
2022-06-28 18:24:33 -07:00
parent 3df05bf1ce
commit 397a061d72
4 changed files with 81 additions and 0 deletions

View File

@ -0,0 +1,5 @@
TOP = ../..
include $(TOP)/configure/CONFIG
ARCH = linux-x86_64
TARGETS = envPaths
include $(TOP)/configure/RULES.ioc

View File

@ -0,0 +1,15 @@
HAG(MYSELF) {
"$(USER)"
}
ASG(DEFAULT) {
RULE(1,WRITE,TRAPWRITE)
}
ASG(SPECIAL) {
RULE(1,WRITE,TRAPWRITE) {
HAG(MYSELF)
}
}
ASG(RO) {
RULE(1, READ)
}

View File

@ -0,0 +1,26 @@
record(ao, "$(P)A") {
info(Q:group, {
"$(P)G": {
"A": {+channel:"VAL", +putorder:3}
}
})
}
record(ao, "$(P)B") {
field(ASG , "SPECIAL")
info(Q:group, {
"$(P)G": {
"B": {+channel:"VAL", +putorder:2}
}
})
}
record(ao, "$(P)C") {
field(ASG , "RO")
info(Q:group, {
"$(P)G": {
"C": {+channel:"VAL", +putorder:1}
}
})
}

35
iocBoot/iocputlog/st.cmd Executable file
View File

@ -0,0 +1,35 @@
#!../../bin/linux-x86_64-debug/softIocPVA
# Normal IOC executables will be linked against libcaputlog
# at built time. Because pva2pva is usually built before
# caputlog, softIocPVA can't. Instead load dynamically.
#
# Requires a target and configuration w/ dynamic linking support.
#
# registerAllRecordDeviceDrivers added in Base >= 7.0.5
< envPaths
# or
#epicsEnvSet("CAPUTLOG", "/path/to/caputlog")
dlload $(CAPUTLOG)/lib/$(ARCH)/libcaPutLog.so
dbLoadDatabase $(CAPUTLOG)/dbd/caPutLog.dbd
registerAllRecordDeviceDrivers
dbLoadRecords("putlog.db","P=TST:")
asSetFilename("$(PWD)/putlog.acf")
asSetSubstitutions("USER=$(USER)")
asInit
var caPutLogDebug 5
caPutLogInit localhost:3456
iocInit()
# concurrently run:
## nc -l -p 3456
# Then try:
## pvput TST:A 4