Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  <20192020  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  <20192020 
<== Date ==> <== Thread ==>

Subject: using stream failed
From: =?gb18030?b?t+fQ0Muu?= via Tech-talk <tech-talk@aps.anl.gov>
To: "=?gb18030?b?dGVjaC10YWxr?=" <tech-talk@aps.anl.gov>
Date: Sun, 10 Nov 2019 20:17:21 +0800
Hi all,
   I met a series of problems when using stream.
   centOS 7(64). asyn and stream, both them was downloaded in git, so i have no idea about version.

I did£º
makeBaseApp.pl -t example test    
makeBaseApp.pl -i -t example test    (I want create the example first)
modify configre/RELEASE(add asyn,sream), testApp/src/xxxSupport.dbd(following), testApp/src/Makefile(following), st.cmd(following).  

Answer:
Test example was good, but failed after modify.

My quesiton:
The test(example) worked well when I did not add the stream. Why the message came out,"unknow type ai,aai,..." after add stream.

I did set epicsEnvSet "STREAM_PROTOCOL_PATH" "/opt/test/db" in st.cmd. But it seem that did not work, the PATH was still ".".

Thank you so much
Feng W


Here is some information of mine.
-------------
Directory
---------
/opt
   base-3.15.6/
   extensions/
   base@
   .swp
   modules/
      asyn/
      calc/
      seq/
      stream/
   test/           # my file
      bin/
      configure/
      db/
      dbd/
      include/
      iocBoot/
      lib/
      testApp/
      Makefile


-------------------
testApp/src/xxxSupport.dbd
--------------------
include "xxxRecord.dbd"
device(xxx,CONSTANT,devXxxSoft,"SoftChannel")
include "stream.dbd"
registrar(drvAsynIPPortRegisterCommands)
registrar(drvAsynSerialPortRegisterCommands)

#include "base.dbd"
##include "asyn.dbd"


------------------
testApp/src/Makefile
------------------
TOP=../..

include $(TOP)/configure/CONFIG
#----------------------------------------
#  ADD MACRO DEFINITIONS BELOW HERE

# xxxRecord.h will be created from xxxRecord.dbd
DBDINC += xxxRecord

# Install xxxSupport.dbd into <top>/dbd
DBD += xxxSupport.dbd

# Build an IOC support library
LIBRARY_IOC += testSupport

# Compile and add the code to the support library
testSupport_SRCS += xxxRecord.c
testSupport_SRCS += devXxxSoft.c

# Link locally-provided code into the support library,
# rather than directly into the IOC application.
# This is required for Windows DLL builds.
testSupport_SRCS += dbSubExample.c
testSupport_SRCS += testHello.c
testSupport_SRCS += initTrace.c

testSupport_LIBS += $(EPICS_BASE_IOC_LIBS)


# Build the IOC application
PROD_IOC = test

# test.dbd will be created and installed
DBD += test.dbd

# test.dbd will include these files:
test_DBD += base.dbd
test_DBD += xxxSupport.dbd
test_DBD += dbSubExample.dbd
test_DBD += testHello.dbd
test_DBD += initTrace.dbd

test_DBD += stream.dbd
test_DBD += asyn.dbd
test_DBD += drvAsynSerialPort.dbd

# test_registerRecordDeviceDriver.cpp derives from test.dbd
test_SRCS += test_registerRecordDeviceDriver.cpp

# Build the main IOC entry point where needed
test_SRCS_DEFAULT += testMain.cpp
test_SRCS_vxWorks += -nil-

# Link in the code from our support library
test_LIBS += testSupport

test_LIBS += asyn stream
#test_LIBS += calc

# To build SNL programs, SNCSEQ must be defined
# in the <top>/configure/RELEASE file
ifneq ($(SNCSEQ),)
    # Build sncExample into testSupport
    sncExample_SNCFLAGS += +r
    test_DBD += sncExample.dbd
    # A .stt sequence program is *not* pre-processed:
    testSupport_SRCS += sncExample.stt
    testSupport_LIBS += seq pv
    test_LIBS += seq pv

    # Build sncProgram as a standalone program
    PROD_HOST += sncProgram
    sncProgram_SNCFLAGS += +m
    # A .st sequence program *is* pre-processed:
    sncProgram_SRCS += sncProgram.st
    sncProgram_LIBS += seq pv
    sncProgram_LIBS += $(EPICS_BASE_HOST_LIBS)
endif

# Finally link IOC to the EPICS Base libraries
test_LIBS += $(EPICS_BASE_IOC_LIBS)

include $(TOP)/configure/RULES
#----------------------------------------
#  ADD EXTRA GNUMAKE RULES BELOW HERE

include $(TOP)/configure/CONFIG
#----------------------------------------
#  ADD MACRO DEFINITIONS BELOW HERE

# xxxRecord.h will be created from xxxRecord.dbd
DBDINC += xxxRecord

# Install xxxSupport.dbd into <top>/dbd
DBD += xxxSupport.dbd

# Build an IOC support library
LIBRARY_IOC += testSupport

# Compile and add the code to the support library
testSupport_SRCS += xxxRecord.c
testSupport_SRCS += devXxxSoft.c
# Link locally-provided code into the support library,
# rather than directly into the IOC application.
# This is required for Windows DLL builds.
testSupport_SRCS += dbSubExample.c
testSupport_SRCS += testHello.c
testSupport_SRCS += initTrace.c

testSupport_LIBS += $(EPICS_BASE_IOC_LIBS)


# Build the IOC application
PROD_IOC = test

# test.dbd will be created and installed
DBD += test.dbd
# test.dbd will include these files:
test_DBD += base.dbd
test_DBD += xxxSupport.dbd
test_DBD += dbSubExample.dbd
test_DBD += testHello.dbd
test_DBD += initTrace.dbd

test_DBD += stream.dbd
test_DBD += asyn.dbd
test_DBD += drvAsynSerialPort.dbd

# test_registerRecordDeviceDriver.cpp derives from test.dbd
test_SRCS += test_registerRecordDeviceDriver.cpp

# Build the main IOC entry point where needed
test_SRCS_DEFAULT += testMain.cpp
test_SRCS_vxWorks += -nil-

# Link in the code from our support library
test_LIBS += testSupport

test_LIBS += asyn stream
#test_LIBS += calc

# To build SNL programs, SNCSEQ must be defined
# in the <top>/configure/RELEASE file
ifneq ($(SNCSEQ),)
    # Build sncExample into testSupport
    sncExample_SNCFLAGS += +r
    test_DBD += sncExample.dbd
    # A .stt sequence program is *not* pre-processed:
    testSupport_SRCS += sncExample.stt
   testSupport_LIBS += seq pv
    test_LIBS += seq pv

    # Build sncProgram as a standalone program
    PROD_HOST += sncProgram
    sncProgram_SNCFLAGS += +m
    # A .st sequence program *is* pre-processed:
    sncProgram_SRCS += sncProgram.st
    sncProgram_LIBS += seq pv
    sncProgram_LIBS += $(EPICS_BASE_HOST_LIBS)
endif

# Finally link IOC to the EPICS Base libraries
test_LIBS += $(EPICS_BASE_IOC_LIBS)

include $(TOP)/configure/RULES
#----------------------------------------
#  ADD EXTRA GNUMAKE RULES BELOW HERE





-----------------
output of st.cmd
-----------------
../../bin/linux-x86_64/test st.cmd
#!../../bin/linux-x86_64/test
## You may have to change test to something else
## everywhere it appears in this file
< envPaths
epicsEnvSet("IOC","ioctest")
epicsEnvSet("TOP","/opt/test")
epicsEnvSet("EPICS_BASE","/opt/base")
epicsEnvSet("ASYN","/opt/modules/asyn")
epicsEnvSet("STREAM","/opt/modules/stream")
epicsEnvSet("SNCSEQ","/opt/modules/seq")
epicsEnvSet "STREAM_PROTOCOL_PATH" "/opt/test/db"
epicsEnvSet "P" "Meter"
epicsEnvSet "R" ""
cd "/opt/test"
## Register all support components
dbLoadDatabase "dbd/test.dbd"
Declaration of recordtype(scalcout) preceeded full definition.
Error at or before "}" in file "dbd/test.dbd" line 13647
test_registerRecordDeviceDriver pdbbase
registerRecordDeviceDriver failed aSub
registerRecordDeviceDriver failed ai
registerRecordDeviceDriver failed stringin
registerRecordDeviceDriver failed sub
## Load record instances
dbLoadTemplate "db/user.substitutions"
Record "lyx:aiExample" is of unknown type "ai"
Error at or before ")" in file "db/dbExample1.db" line 1
Record "lyx:aiExample1" is of unknown type "ai"
Error at or before ")" in file "db/dbExample2.db" line 23
Record "lyx:aiExample2" is of unknown type "ai"
Error at or before ")" in file "db/dbExample2.db" line 23
Record "lyx:aiExample3" is of unknown type "ai"
Error at or before ")" in file "db/dbExample2.db" line 23
dbLoadRecords "db/dbSubExample.db", "user=lyx"
Record "lyx:subExample" is of unknown type "sub"
Error at or before ")" in file "db/dbSubExample.db" line 1
dbLoadRecords "db/devMeter.db", "P=Meter,R=,PORT=L0,A=0"
## Set this to see messages from mySub
#var mySubDebug 1
drvAsynSerialPortConfigure("L0",/dev/ttyS0,0,0,0)
asynSetOption("L0",-1,"baud","115200")
asynSetOption("L0",-1,"bits","8")
asynSetOption("L0",-1,"parity","none")
asynSetOption("L0",-1,"stop","1")
asynSetOption("L0",-1,"baud","115200")
asynOctetSetInputEos("L0",-1,"\r\n")
asynOctetSetOutputEos("L0",-1,"\r\n")
asynSetTraceIOMask("L0",-1,0x2)
asynSetTraceIOMask("L0",-1,0x9)
## Run this to trace the stages of iocInit
#traceIocInit
cd "/opt/test/iocBoot/ioctest"
iocInit
Starting iocInit
############################################################################
## EPICS R3.15.6
## EPICS Base built Nov  8 2019
############################################################################
Forward-link uses Channel Access without pointing to PROC field
    lyx:calcExample1.FLNK => lyx:aiExample1
Forward-link uses Channel Access without pointing to PROC field
    lyx:calcExample2.FLNK => lyx:aiExample2
Forward-link uses Channel Access without pointing to PROC field
    lyx:calcExample3.FLNK => lyx:aiExample3
2019/11/10 08:56:55 Can't find readable file 'devMeter.proto' in '.'
2019/11/10 08:56:55 while reading protocol 'range1' for 'range1'
2019/11/10 08:56:55 range1: Protocol parse error
2019/11/10 08:56:55 range1: Record initialization failed
Bad init_rec return value  PV: range1 ao: init_record

iocRun: All initialization complete
## Start any sequence programs
#seq sncExample, "user=lyx"
epics>




--------------
grep -i stream dbd/test.dbd
------------
device(calcout, INST_IO, devcalcoutStream, "stream")
device(lsi, INST_IO, devlsiStream, "stream")
device(stringout, INST_IO, devstringoutStream, "stream")
device(aai, INST_IO, devaaiStream, "stream")
device(bo, INST_IO, devboStream, "stream")
device(mbbi, INST_IO, devmbbiStream, "stream")
device(mbbo, INST_IO, devmbboStream, "stream")
device(ao, INST_IO, devaoStream, "stream")
device(aao, INST_IO, devaaoStream, "stream")
device(mbbiDirect, INST_IO, devmbbiDirectStream, "stream")
device(waveform, INST_IO, devwaveformStream, "stream")
device(longin, INST_IO, devlonginStream, "stream")
device(bi, INST_IO, devbiStream, "stream")
device(lso, INST_IO, devlsoStream, "stream")
device(mbboDirect, INST_IO, devmbboDirectStream, "stream")
device(longout, INST_IO, devlongoutStream, "stream")
device(scalcout, INST_IO, devscalcoutStream, "stream")
device(ai, INST_IO, devaiStream, "stream")
device(stringin, INST_IO, devstringinStream, "stream")
driver(stream)
registrar(streamRegistrar)
variable(streamDebug, int)
variable(streamError, int)


----------------
dbior
----------------
no output


Navigate by Date:
Prev: Re: Linux DMA driver and device support for Xilinx FPGA Mooney, Tim M. via Tech-talk
Next: Re: Linux DMA driver and device support for Xilinx FPGA Hinko Kocevar via Tech-talk
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  <20192020 
Navigate by Thread:
Prev: Re: Re: Linux DMA driver and device support for Xilinx FPGA Madden, Timothy J. via Tech-talk
Next: Segmentation fault when Record Processing in StreamDevice Donny Domagoj Cosic via Tech-talk
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  <20192020 
ANJ, 11 Nov 2019 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·