Whoops, that was a typo! It should be
The asyn record does NOT work with SCAN=I/O Intr for TCP devices.
Hi Christophe,
The asyn record does work with SCAN=I/O Intr for TCP devices. The problem is that drvAsynIPPort does not have a mechanism to do callbacks when there is new data, so asyn client needs to poll. The only
code I know of that does this is StreamDevice.
However, I think you could probably do what you want with the asyn record. Rather than setting it to periodically poll (which is limited to 10 Hz) use a seq record whose link 1 processes the asyn record with
a short delay (is .01 or .001 seconds) and link 2 back to processing itself.
Mark
Hello everyone,
I have a device, that sends unsolicited binary data at a rather high
rate to a TCP/IP client. All blocks have the same length and are not
terminated. Since I just want to read them, my Idea was to use the
asynRecord and it's asynRecordDevice support / the asynOctet interface.
The documentation states, that I/O Intr is fully supported, but it
doesn't seem to work. I made a small test setup with netcat and asyn
R4-35 to reproduce this:
in the startup script:
#drvAsynIPPortConfigure("portName","hostInfo",priority,noAutoConnect,noProcessEos)
drvAsynIPPortConfigure("ASYNTEST","localhost:60000",0,0,1)
template:
record(asyn,"$(DEVN):rdRawData") {
field(DESC, "asyn record test")
field(DTYP, "asynRecordDevice")
field(PORT, "$(P)")
field(ADDR, "$(A)")
field(IFACE,"asynOctet")
field(TMOD, "Read")
field(TMOT, "-1")
field(IFMT, "Binary")
field(IMAX, "4")
field(NRRD, "4")
field(SCAN, "I/O Intr")
}
If I send data it keeps getting buffered by the socket and is only read,
if I force processing e.g. by caput to the PROC field. Is this a bug or
is it simply not supported?
Tanks and best regards,
Christoph
--
(bb|[^b]{2})
________________________________
Helmholtz-Zentrum Berlin für Materialien und Energie GmbH
Mitglied der Hermann von Helmholtz-Gemeinschaft Deutscher Forschungszentren e.V.
Aufsichtsrat: Vorsitzender Dr. Karl Eugen Huthmacher, stv. Vorsitzende Dr. Jutta Koch-Unterseher
Geschäftsführung: Prof. Dr. Bernd Rech (kommissarisch), Thomas Frederking
Sitz Berlin, AG Charlottenburg, 89 HRB 5583
Postadresse:
Hahn-Meitner-Platz 1
D-14109 Berlin
|