We have a problem with a device that sends (only) unsolicited data (on a serial interface, accessed via terminal server). We process the record via SCAN="I/O Intr" and we have this simple protocol file:
ReadTimeout = 1200;
PollPeriod = 100;
InTerminator = "#";
ExtraInput = Ignore;
inDisplay {
in "DISPLAY:=%dBA:=%(\$1)d";
}
When the terminalserver becomes disconnected the IOC issues messages at a rate that, at least to me, looks like "as fast as possible". Here is an excerpt:
[Mon Jan 27 13:08:49 2025]2025/01/27 13:08:49.618156 RADDZ4R RADDZ4R:inVal: I/O error after reading 0 bytes: ""
[Mon Jan 27 13:08:49 2025]2025/01/27 13:08:49.618165 RADDZ4R RADDZ4R:inVal: Protocol aborted
[Mon Jan 27 13:08:49 2025]2025/01/27 13:08:49.618195 RADDZ4R RADDZ4R:inVal: asynError in read: serialc1s15g.ctl.bessy.de:4004 disconnected:
[Mon Jan 27 13:08:49 2025]2025/01/27 13:08:49.618203 RADDZ4R RADDZ4R:inVal: I/O error after reading 0 bytes: ""
[Mon Jan 27 13:08:49 2025]2025/01/27 13:08:49.618212 RADDZ4R RADDZ4R:inVal: Protocol aborted
[Mon Jan 27 13:08:49 2025]2025/01/27 13:08:49.618236 RADDZ4R RADDZ4R:inVal: asynError in read: serialc1s15g.ctl.bessy.de:4004 disconnected:
[Mon Jan 27 13:08:49 2025]2025/01/27 13:08:49.618257 RADDZ4R RADDZ4R:inVal: I/O error after reading 0 bytes: ""
[Mon Jan 27 13:08:49 2025]2025/01/27 13:08:49.618272 RADDZ4R RADDZ4R:inVal: Protocol aborted
[Mon Jan 27 13:08:49 2025]2025/01/27 13:08:49.618301 RADDZ4R RADDZ4R:inVal: asynError in read: serialc1s15g.ctl.bessy.de:4004 disconnected:
[Mon Jan 27 13:08:49 2025]2025/01/27 13:08:49.618313 RADDZ4R RADDZ4R:inVal: I/O error after reading 0 bytes: ""
[Mon Jan 27 13:08:49 2025]2025/01/27 13:08:49.618328 RADDZ4R RADDZ4R:inVal: Protocol aborted
[Mon Jan 27 13:08:49 2025]2025/01/27 13:08:49.618358 RADDZ4R RADDZ4R:inVal: asynError in read: serialc1s15g.ctl.bessy.de:4004 disconnected:
[Mon Jan 27 13:08:49 2025]2025/01/27 13:08:49.618369 RADDZ4R RADDZ4R:inVal: I/O error after reading 0 bytes: ""
[Mon Jan 27 13:08:49 2025]2025/01/27 13:08:49.618377 RADDZ4R RADDZ4R:inVal: Protocol aborted
[Mon Jan 27 13:08:49 2025]2025/01/27 13:08:49.618408 RADDZ4R RADDZ4R:inVal: asynError in read: serialc1s15g.ctl.bessy.de:4004 disconnected:
[Mon Jan 27 13:08:49 2025]2025/01/27 13:08:49.618423 RADDZ4R RADDZ4R:inVal: I/O error after reading 0 bytes: ""
[Mon Jan 27 13:08:49 2025]2025/01/27 13:08:49.618435 RADDZ4R RADDZ4R:inVal: Protocol aborted
[Mon Jan 27 13:08:49 2025]2025/01/27 13:08:49.618459 RADDZ4R RADDZ4R:inVal: asynError in read: serialc1s15g.ctl.bessy.de:4004 disconnected:
[Mon Jan 27 13:08:49 2025]2025/01/27 13:08:49.618472 RADDZ4R RADDZ4R:inVal: I/O error after reading 0 bytes: ""
[Mon Jan 27 13:08:49 2025]2025/01/27 13:08:49.618480 RADDZ4R RADDZ4R:inVal: Protocol aborted
[Mon Jan 27 13:08:49 2025]2025/01/27 13:08:49.618506 RADDZ4R RADDZ4R:inVal: asynError in read: serialc1s15g.ctl.bessy.de:4004 disconnected:
[Mon Jan 27 13:08:49 2025]2025/01/27 13:08:49.618514 RADDZ4R RADDZ4R:inVal: I/O error after reading 0 bytes: ""
[Mon Jan 27 13:08:49 2025]2025/01/27 13:08:49.618524 RADDZ4R RADDZ4R:inVal: Protocol aborted
[Mon Jan 27 13:08:49 2025]2025/01/27 13:08:49.618549 RADDZ4R RADDZ4R:inVal: asynError in read: serialc1s15g.ctl.bessy.de:4004 disconnected:
Note how the timestamps from streamDevice are all within the same millisecond(!)
I have looked at the interface code between asyn and streamDevice. While I have no explanation for the (apparent) endless loop here, I did notice that the asynDisconnected status is returned only by asyn's queueRequest method, whereas streamDevice seems to expect it being returned from the read and write methods.
We have a problem with a device that sends (only) unsolicited data (on a serial interface, accessed via terminal server). We process the record via SCAN="I/O Intr" and we have this simple protocol file:
When the terminalserver becomes disconnected the IOC issues messages at a rate that, at least to me, looks like "as fast as possible". Here is an excerpt:
Note how the timestamps from streamDevice are all within the same millisecond(!)
I have looked at the interface code between asyn and streamDevice. While I have no explanation for the (apparent) endless loop here, I did notice that the
asynDisconnectedstatus is returned only by asyn'squeueRequestmethod, whereas streamDevice seems to expect it being returned from thereadandwritemethods.