EPICS Controls 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  <20182019  2020  2021  2022  2023  2024  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  <20182019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: RE: streamdevice I/O Intr
From: Mark Rivers via Tech-talk <[email protected]>
To: 'William Kirstaedter' <[email protected]>, Dirk Zimoch <[email protected]>
Cc: "EPICS Tech-Talk \([email protected]\)" <[email protected]>
Date: Thu, 29 Nov 2018 16:51:55 +0000
> well I dont. I only see the start String "STM\r" but never the stop String "ETM\r"

That's what I thought.

Here is the start of code for writeHandler.  You should definitely enable debug, and see if you see these messages ("reading old input", etc.).  One possibility is that it gets stuck in that loop if the input is arriving so fast that "received" is never 0.

// now, we can write (called by asynManager)
void AsynDriverInterface::
writeHandler()
{
    debug("AsynDriverInterface::writeHandler(%s)\n",
        clientName());
    asynStatus status;
    size_t written = 0;

    pasynUser->timeout = 0;
    if (!pasynGpib)
    // discard any early input, but forward it to potential async records
    // thus do not use pasynOctet->flush()
    // unfortunately we cannot do this with GPIB because addressing a device as talker
    // when it has nothing to say is an error. Also timeout=0 does not help here (would need
    // a change in asynGPIB), thus use flush() for GPIB.
    do {
        char buffer [256];
        size_t received = 0;
        int eomReason = 0;
        debug("AsynDriverInterface::writeHandler(%s): reading old input\n",
            clientName());
        status = pasynOctet->read(pvtOctet, pasynUser,
            buffer, sizeof(buffer), &received, &eomReason);
        if (status == asynError || received == 0) break;
#ifndef NO_TEMPORARY
        if (received) debug("AsynDriverInterface::writeHandler(%s): flushing %ld bytes: \"%s\"\n",
            clientName(), (long)received, StreamBuffer(buffer, received).expand()());
#endif
    } while (status == asynSuccess);
    else
    {
        debug("AsynDriverInterface::writeHandler(%s): flushing old input\n",
            clientName());
         pasynOctet->flush(pvtOctet, pasynUser);
    }
        
    // discard any early events
    receivedEvent = 0;
    
    pasynUser->timeout = writeTimeout;
    
    // has stream already added a terminator or should
    // asyn do so?
    
    size_t streameoslen;
    const char* streameos = getOutTerminator(streameoslen);
    int oldeoslen = -1;
    char oldeos[16];
    if (streameos) // stream has already added eos, don't do it again in asyn
    {
        // clear terminator for asyn
        status = pasynOctet->getOutputEos(pvtOctet,
            pasynUser, oldeos, sizeof(oldeos)-1, &oldeoslen);
        if (status != asynSuccess)
        {
            oldeoslen = -1;
            // No EOS support?
        }
        pasynOctet->setOutputEos(pvtOctet, pasynUser,
            NULL, 0);
    }
    status = pasynOctet->write(pvtOctet, pasynUser,
        outputBuffer, outputSize, &written);
    debug("AsynDriverInterface::writeHandler(%s): "
        "write(..., outputSize=%ld, written=%ld) "
        "[timeout=%g sec] = %s\n",
        clientName(), (long)outputSize,  (long)written,
        pasynUser->timeout, asynStatusStr[status]);


-----Original Message-----
From: [email protected] <[email protected]> On Behalf Of William Kirstaedter via Tech-talk
Sent: Thursday, November 29, 2018 10:48 AM
To: Dirk Zimoch <[email protected]>; [email protected]
Subject: Re: streamdevice I/O Intr

well I dont. I only see the start String "STM\r" but never the stop String "ETM\r"

William Kirstaedter (PP&B)
Fritz-Haber-Institut der MPG
Faradayweg 4-6
14195 Berlin
Tel: 030 8413 5405
Mail: [email protected]

Am 29.11.2018 um 17:46 schrieb Dirk Zimoch via Tech-talk:
>
>
> On 29.11.2018 17:44, Dirk Zimoch via Tech-talk wrote:
>> Are you seeing any error messages on the IOC console?  If the problem 
>> is what I describe then I would expect to see queueRequest timeout 
>> error messages.
>
> If StreamDevice could not queue the request, he would not see the 
> output string in asynTrace.

----------------------------------------------------------------------
Das FHI verarbeitet, speichert und loescht Daten im Rahmen seiner Geschaeftstaetigkeit gemaess der Datenschutz-Grundverordnung (DSGVO) [General Data Protection Regulation (GDPR)] der Europaeischen Union.


Replies:
Re: streamdevice I/O Intr Dirk Zimoch via Tech-talk
Re: streamdevice I/O Intr Dirk Zimoch via Tech-talk
References:
Re: streamdevice I/O Intr William Kirstaedter via Tech-talk
Re: streamdevice I/O Intr Dirk Zimoch via Tech-talk
Re: streamdevice I/O Intr William Kirstaedter via Tech-talk
Re: streamdevice I/O Intr Michael Westfall via Tech-talk
Re: streamdevice I/O Intr William Kirstaedter via Tech-talk
RE: streamdevice I/O Intr Mark Rivers via Tech-talk
Re: streamdevice I/O Intr William Kirstaedter via Tech-talk
Re: streamdevice I/O Intr Dirk Zimoch via Tech-talk
Re: streamdevice I/O Intr Dirk Zimoch via Tech-talk
Re: streamdevice I/O Intr William Kirstaedter via Tech-talk

Navigate by Date:
Prev: Re: streamdevice I/O Intr William Kirstaedter via Tech-talk
Next: Re: streamdevice I/O Intr Dirk Zimoch 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  <20182019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: streamdevice I/O Intr William Kirstaedter via Tech-talk
Next: Re: streamdevice I/O Intr Dirk Zimoch 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  <20182019  2020  2021  2022  2023  2024 
ANJ, 30 Nov 2018 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·