add demo of building an NTEnum with a group

This commit is contained in:
Michael Davidsaver
2021-10-19 11:14:23 -07:00
parent b3d37e7f39
commit 8be883f98b
2 changed files with 27 additions and 0 deletions

View File

@ -0,0 +1,26 @@
# Example of constructing an NTEnum with a longer choices list.
record(longout, "$(P):ENUM:INDEX") {
field(VAL, "1")
field(PINI, "YES")
info(Q:group, {
"$(P):ENUM":{
+id:"epics:nt/NTEnum:1.0",
"value":{+type:"structure", +id:"enum_t"},
"value.index":{+type:"plain", +channel:"VAL"},
"":{+type:"meta", +channel:"VAL"}
}
})
}
record(aai, "$(P):ENUM:CHOICES") {
field(FTVL, "STRING")
field(NELM, "64")
field(INP , {const:["ZERO", "ONE"]})
info(Q:group, {
"$(P):ENUM":{
+id:"epics:nt/NTEnum:1.0",
"value.choices":{+type:"plain", +channel:"VAL"}
}
})
}

View File

@ -2,5 +2,6 @@
dbLoadRecords("image.db","N=TST:image1")
dbLoadRecords("table.db","N=TST:table1")
dbLoadRecords("ntenum.db","P=TST:enum1")
iocInit()