add caputlog example
This commit is contained in:
5
iocBoot/iocputlog/Makefile
Normal file
5
iocBoot/iocputlog/Makefile
Normal file
@ -0,0 +1,5 @@
|
||||
TOP = ../..
|
||||
include $(TOP)/configure/CONFIG
|
||||
ARCH = linux-x86_64
|
||||
TARGETS = envPaths
|
||||
include $(TOP)/configure/RULES.ioc
|
15
iocBoot/iocputlog/putlog.acf
Normal file
15
iocBoot/iocputlog/putlog.acf
Normal 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)
|
||||
}
|
26
iocBoot/iocputlog/putlog.db
Normal file
26
iocBoot/iocputlog/putlog.db
Normal 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
35
iocBoot/iocputlog/st.cmd
Executable 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
|
Reference in New Issue
Block a user