make examples executable from (Linux) command line
This commit is contained in:
9
streamApp/example.cmd
Normal file → Executable file
9
streamApp/example.cmd
Normal file → Executable file
@ -1,3 +1,5 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
exec O.$EPICS_HOST_ARCH/streamApp $0
|
||||||
dbLoadDatabase "O.Common/streamApp.dbd"
|
dbLoadDatabase "O.Common/streamApp.dbd"
|
||||||
streamApp_registerRecordDeviceDriver
|
streamApp_registerRecordDeviceDriver
|
||||||
|
|
||||||
@ -19,6 +21,8 @@ epicsEnvSet "STREAM_PROTOCOL_PATH", ".:protocols:../protocols/"
|
|||||||
|
|
||||||
#example telnet style IP port setup
|
#example telnet style IP port setup
|
||||||
drvAsynIPPortConfigure "terminal", "localhost:40000"
|
drvAsynIPPortConfigure "terminal", "localhost:40000"
|
||||||
|
|
||||||
|
# Either set terminators here or in the protocol
|
||||||
asynOctetSetInputEos "terminal",0,"\r\n"
|
asynOctetSetInputEos "terminal",0,"\r\n"
|
||||||
asynOctetSetOutputEos "terminal",0,"\r\n"
|
asynOctetSetOutputEos "terminal",0,"\r\n"
|
||||||
|
|
||||||
@ -27,12 +31,11 @@ asynOctetSetOutputEos "terminal",0,"\r\n"
|
|||||||
|
|
||||||
#load the records
|
#load the records
|
||||||
dbLoadRecords "example.db","PREFIX=DZ"
|
dbLoadRecords "example.db","PREFIX=DZ"
|
||||||
#dbLoadRecords "scalcout.db","PREFIX=DZ"
|
|
||||||
|
|
||||||
#lots! of debug output
|
#lots(!) of debug output before iocInit
|
||||||
#var streamDebug 1
|
#var streamDebug 1
|
||||||
|
|
||||||
iocInit
|
iocInit
|
||||||
|
|
||||||
#enable debug output
|
#enable debug output
|
||||||
var streamDebug 1
|
#var streamDebug 1
|
||||||
|
4
streamApp/regexp.cmd
Normal file → Executable file
4
streamApp/regexp.cmd
Normal file → Executable file
@ -1,3 +1,5 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
exec O.$EPICS_HOST_ARCH/streamApp $0
|
||||||
dbLoadDatabase "O.Common/streamApp.dbd"
|
dbLoadDatabase "O.Common/streamApp.dbd"
|
||||||
streamApp_registerRecordDeviceDriver
|
streamApp_registerRecordDeviceDriver
|
||||||
|
|
||||||
@ -8,3 +10,5 @@ dbLoadRecords regexp.db
|
|||||||
|
|
||||||
iocInit
|
iocInit
|
||||||
#var streamDebug 1
|
#var streamDebug 1
|
||||||
|
|
||||||
|
dbgf DZ:regexp
|
||||||
|
@ -2,4 +2,5 @@ record (stringin, "DZ:regexp")
|
|||||||
{
|
{
|
||||||
field (DTYP, "stream")
|
field (DTYP, "stream")
|
||||||
field (INP, "@regexp.proto readTitle web")
|
field (INP, "@regexp.proto readTitle web")
|
||||||
|
field (PINI, "YES")
|
||||||
}
|
}
|
||||||
|
9
streamApp/simple.cmd
Normal file → Executable file
9
streamApp/simple.cmd
Normal file → Executable file
@ -1,18 +1,19 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
exec O.$EPICS_HOST_ARCH/streamApp $0
|
||||||
dbLoadDatabase "O.Common/streamApp.dbd"
|
dbLoadDatabase "O.Common/streamApp.dbd"
|
||||||
streamApp_registerRecordDeviceDriver
|
streamApp_registerRecordDeviceDriver
|
||||||
|
|
||||||
#where can protocols be located?
|
#where can protocols be located?
|
||||||
epicsEnvSet "STREAM_PROTOCOL_PATH", ".:protocols:../protocols/"
|
epicsEnvSet "STREAM_PROTOCOL_PATH", ".:protocols:../protocols/"
|
||||||
|
|
||||||
#setup the busses
|
#setup the hardware
|
||||||
|
|
||||||
#drvAsynIPPortConfigure "L0", "localhost:40000"
|
drvAsynIPPortConfigure "L0", "localhost:40000"
|
||||||
vxi11Configure "L0","gpib-dz-1",0,0.0,"gpib0",0,0
|
#vxi11Configure "L0","gpib-hostname-or-ip",0,0.0,"gpib0"
|
||||||
|
|
||||||
#load the records
|
#load the records
|
||||||
dbLoadRecords "simple.db","P=DZ,BUS=L0 28"
|
dbLoadRecords "simple.db","P=DZ,BUS=L0 28"
|
||||||
|
|
||||||
var streamDebug 1
|
|
||||||
iocInit
|
iocInit
|
||||||
|
|
||||||
#enable debug output
|
#enable debug output
|
||||||
|
4
streamApp/test.cmd
Normal file → Executable file
4
streamApp/test.cmd
Normal file → Executable file
@ -1,3 +1,5 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
exec O.$EPICS_HOST_ARCH/streamApp $0
|
||||||
dbLoadDatabase "O.Common/streamApp.dbd"
|
dbLoadDatabase "O.Common/streamApp.dbd"
|
||||||
streamApp_registerRecordDeviceDriver
|
streamApp_registerRecordDeviceDriver
|
||||||
|
|
||||||
@ -7,4 +9,4 @@ drvAsynIPPortConfigure "terminal", "localhost:40000"
|
|||||||
|
|
||||||
dbLoadRecords "test.db","P=TEST"
|
dbLoadRecords "test.db","P=TEST"
|
||||||
iocInit
|
iocInit
|
||||||
var streamDebug 1
|
#var streamDebug 1
|
||||||
|
Reference in New Issue
Block a user