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 | 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 |
<== Date ==> | <== Thread ==> |
---|
Subject: | Question regarding a waveform record and writeOctet |
From: | "Wlodek, Jakub via Tech-talk" <[email protected]> |
To: | "[email protected]" <[email protected]> |
Date: | Tue, 2 Jul 2019 15:15:31 +0000 |
Hi all,
I have run into an issue with a waveform record I added to one of my IOCs. It simply stores a filename, and there is a writeOctet function that catches writing to it and makes sure that the filepath is valid. This all seems to work OK - the filepath is checked
correctly, and the code is able to access it as expected later on. It all works, aside from the following error message displayed in the IOC shell:
2019/07/02 10:47:37.910 13SIM1:{SimDetector-Cam:1}CV1:FilePath devAsynOctet::writeIt requested 22 but sent 94456003460432 bytes
The entered filepath does in fact have a length of 22 bytes, but I have no idea where the 94456003460432 came from, especially since the remainder of the code seems to be reading the entered string correctly. After further testing, I wrote to the filepath PV
again, and got:
2019/07/02 10:47:46.220 13SIM1:{SimDetector-Cam:1}CV1:FilePath devAsynOctet::writeIt requested 23 but sent 0 bytes
Once again, the filepath was processed correctly and worked fine in my code, and it was 23 characters long. After some searching I identified the printout to be in the asyn library here:
https://github.com/epics-modules/asyn/blob/187b0a03e5d2cdd696c4203147aebe83ef049cb9/asyn/devEpics/devAsynOctet.c#L636.
My record definition looks as follows:
-----------------------------------------------------
record(waveform, "$(P)$(R)FilePath"){
field(PINI, "YES")
field(DTYP, "asynOctetWrite")
field(INP, "@asyn($(PORT),$(ADDR=0),$(TIMEOUT=1))NDCV_FILEPATH")
field(FTVL, "CHAR")
field(NELM, "256")
field(autosaveFields, "VAL")
}
record(waveform, "$(P)$(R)FilePath_RBV"){
field(DTYP, "asynOctetRead")
field(INP, "@asyn($(PORT),$(ADDR=0),$(TIMEOUT=1))NDCV_FILEPATH")
field(FTVL, "CHAR")
field(NELM, "256")
field(SCAN, "I/O Intr")
}
If anyone could help me identify what might be causing this issue it would be much appreciated.
Regards
-Jakub Wlodek
|