$ telnet etraxXYZ $ cat /dev/ttyS1 $ echo "VERS" > /dev/ttyS1 $ RECV VERS 4.3 $ mkdir -p <myTopDir> && cd <myTopDir> $ makeBaseApp.pl -t ioc <myApp>
$ makeBaseApp.pl -t ioc <myApp> configure/RELEASE file for streamDevice support ASYN=$(EPICS_HOME)/modules/soft/asyn/asyn-4.9 STREAM=$(EPICS_HOME)/modules/soft/StreamDevice $ cd <myTopDir> && make $ mkdir -p <myApp>App/protocols && cd <myAppr>App/protocols <myProto>.proto Terminator = LF;
LockTimeout = 5000;
ReplyTimeout = 4000;
ReadTimeout = 500;
WriteTimeout = 3000;
ExtraInput = Ignore;
# Connect a stringin record to this to get
# a generic command interface.
# After processing finishes, the record contains the reply.
debug {
ExtraInput = Ignore;
out "%s";
in "%39c";
}
VERS command %s or float %f
Db database directory $ cd <myTopDir>App/Db db file <myDb>.db (by hand or by using vdct: stringin debug record: record(stringin, "$(PREFIX)$(HADCON):debug)") {
field(DTYP, "stream")
field(SCAN, "Passive")
field(OUT, "@<myProto>.proto debug $(device)")
}
stringin, ai
%%s or float %%f
Makefile <myDb>.db
$ make st.cmd ioc database directory $ cd iocBoot/ioc<myAppr> st.cmd epicsEnvSet("STREAM_PROTOCOL_PATH", "$(TOP)/<myAppr>App/protocols") streamHadcon_registerRecordDeviceDriver pdbbase drvAsynSerialPortConfigure("hadcon","/dev/ttyS1",0,0,0)
asynSetOption("hadcon",0,"baud","115200")
asynSetOption("hadcon",0,"bits","8")
asynSetOption("hadcon",0,"parity","none")
asynSetOption("hadcon",0,"stop","1")
asynSetOption("hadcon",0,"clocal","Y")
asynSetOption("hadcon",0,"crtscts","N") <myDb>.db, e.g. dbLoadRecords ("db/<myDb>.db", "HADCON=${HOSTNAME}, PREFIX=PANDA:IOC:, device=hadcon") dbl > ${TOP}/iocBoot/${IOC}/${HOSTNAME}.dbl $ cd iocBoot/ioc<myAppr>
$ ../../bin/<operating system>-<architecture>\<myApp> st.cmd caput, caget, camonitor, or CSS, or any other client to test it
Copyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.