Experimental Physics and Industrial Control System
> I just found out that every time I request a large buffer, I get a received byte count of 1448 which is the maximum data size in a TCP packet. I'll try to handle such case and see what happens.
Previously you sent a "test.cpp" file. In that code you are directly doing TCP calls like "write", "read", and "poll". That is not how one typically writes an asyn driver. Rather you would first create a drvAsynIPPort driver and then your specific device driver would communicate with that lower level drvAsynIPPort driver. That is simpler and more portable. It also takes care of issues like reading multiple packets, looking for terminators, etc.
Mark
________________________________
From: Abdalla Ahmad <Abdalla.Ahmad at sesame.org.jo>
Sent: Thursday, November 5, 2020 10:23 AM
To: Mark Rivers; Michael Davidsaver; tech-talk at aps.anl.gov
Subject: Re: AsynPortDriver separate thread causes Segmentation fault with "dbGetLinkValue" error message
Hi Mark
I meant is it possible to set the NORD field in asyn port driver? Right now I can't get my machine to enable core dumps in order to view the gdb backtrace, but I just found out that every time I request a large buffer, I get a received byte count of 1448 which is the maximum data size in a TCP packet. I'll try to handle such case and see what happens.
Best Regards,
Abdalla.
________________________________
From: Mark Rivers <rivers at cars.uchicago.edu>
Sent: Thursday, November 5, 2020 6:15 PM
To: Abdalla Ahmad <Abdalla.Ahmad at sesame.org.jo>; Michael Davidsaver <mdavidsaver at gmail.com>; tech-talk at aps.anl.gov <tech-talk at aps.anl.gov>
Subject: Re: AsynPortDriver separate thread causes Segmentation fault with "dbGetLinkValue" error message
> Regarding EPICS waveforms, what I meant is variable length from the client side;
> For example I set a buffer size in a PV and based on that PV value I read a specific length so that a plotter for example reads data with that specific length only.
> Does NORD achieve this?
NORD controls the maximum number of elements that can be read from the record. It is the number of "available" elements. You can request fewer elements in a read requests as well.
> If yes, how does asyn access individual record's fields?.
I am not sure what you mean by that question.
Have you been able to get a gdb traceback of your access violation problem?
Mark
________________________________
From: Abdalla Ahmad <Abdalla.Ahmad at sesame.org.jo>
Sent: Thursday, November 5, 2020 9:46 AM
To: Michael Davidsaver; Mark Rivers; tech-talk at aps.anl.gov
Subject: Re: AsynPortDriver separate thread causes Segmentation fault with "dbGetLinkValue" error message
Hi all.
Buffer size is 48 because the device sends waveform data in lines so I read each line separately by reading 48 bytes, If I request ADC 200 for example I receive 200 lines where each line is 48 bytes. I even did a test where I used a buffer size of 1M to receive the full 20000 lines and still got the same error.
Regarding EPICS waveforms, what I meant is variable length from the client side; For example I set a buffer size in a PV and based on that PV value I read a specific length so that a plotter for example reads data with that specific length only. Does NORD achieve this? If yes, how does asyn access individual record's fields?.
Best Regards,
Abdalla.
________________________________
From: Michael Davidsaver <mdavidsaver at gmail.com>
Sent: Tuesday, November 3, 2020 7:18 PM
To: Mark Rivers <rivers at cars.uchicago.edu>; Abdalla Ahmad <Abdalla.Ahmad at sesame.org.jo>; tech-talk at aps.anl.gov <tech-talk at aps.anl.gov>
Subject: Re: AsynPortDriver separate thread causes Segmentation fault with "dbGetLinkValue" error message
On 11/3/20 8:49 AM, Mark Rivers via Tech-talk wrote:
> - I don’t think EPICS supports variable length waveform records. You need to create the waveform record in dbLoadRecords with a size that is the largest you plan to use. That is what areaDetector does with NDPluginStdArrays.
To clarify, waveform records have a _maximum_ size which is fixed
on initialization (eg. NELM). Actually size (NORD) has long been
changeable at runtime in the range [0, NELM].
Some caveats about NORD==0 apply wrt. CA specifically (works fine with PVA).
- References:
- AsynPortDriver separate thread causes Segmentation fault with "dbGetLinkValue" error message Abdalla Ahmad via Tech-talk
- RE: AsynPortDriver separate thread causes Segmentation fault with "dbGetLinkValue" error message Mark Rivers via Tech-talk
- Re: AsynPortDriver separate thread causes Segmentation fault with "dbGetLinkValue" error message Michael Davidsaver via Tech-talk
- Re: AsynPortDriver separate thread causes Segmentation fault with "dbGetLinkValue" error message Abdalla Ahmad via Tech-talk
- Re: AsynPortDriver separate thread causes Segmentation fault with "dbGetLinkValue" error message Mark Rivers via Tech-talk
- Re: AsynPortDriver separate thread causes Segmentation fault with "dbGetLinkValue" error message Abdalla Ahmad via Tech-talk
- Navigate by Date:
- Prev:
Re: AsynPortDriver separate thread causes Segmentation fault with "dbGetLinkValue" error message Abdalla Ahmad via Tech-talk
- Next:
Re: AsynPortDriver separate thread causes Segmentation fault with "dbGetLinkValue" error message Mark Rivers 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
2019
<2020>
2021
2022
2023
2024
- Navigate by Thread:
- Prev:
Re: AsynPortDriver separate thread causes Segmentation fault with "dbGetLinkValue" error message Abdalla Ahmad via Tech-talk
- Next:
Re: AsynPortDriver separate thread causes Segmentation fault with "dbGetLinkValue" error message Mark Rivers 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
2019
<2020>
2021
2022
2023
2024