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: | Re: A question on asyn application |
From: | Torsten Bögershausen via Tech-talk <tech-talk at aps.anl.gov> |
To: | cxy <ycx810212 at 163.com>, "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov> |
Date: | Mon, 22 Jan 2024 06:44:36 +0000 |
I think you are missing this mask: | asynEnumMask, here: ct08::ct08(const char *portName, const char *IPPortName, const char *outputString) : asynPortDriver(portName, 1, /* maxAddr */ asynOctetMask | asynInt32Mask | asynFloat64Mask |asynFloat64ArrayMask |asynEnumMask |asynDrvUserMask,/* Interface mask */ asynOctetMask | asynInt32Mask | asynFloat64Mask |asynFloat64ArrayMask |asynEnumMask |asynDrvUserMask, /* Interrupt mask */ 0, ASYN_CANBLOCK, /* asynFlags. This driver does block and it is not multi-device*/ 1, /* Autoconnect */ 0, /* Default priority */ 0) /* Default stack size*/ { From: Tech-talk <tech-talk-bounces at aps.anl.gov> on behalf of cxy via Tech-talk <tech-talk at aps.anl.gov> Hello everyone, I am using the asyn module to write a device IOC. I want to set the SCAN field as Intr I/O to adapt to the application requirement. The db file is like this: record(stringin,"$(P)Ver") { field(DESC,"Firmware version") field(DTYP, "asynOctetRead") field(INP, "@asyn($(PORT),$(ADDR)) VERSION") field(SCAN,"I/O Intr") } record(stringin,"$(P)Mod") { field(DESC,"Get counter mod") field(DTYP, "asynOctetRead") field(INP, "@asyn($(PORT),$(ADDR)) MOD") field(SCAN,"I/O Intr") } record(stringout,"$(P)Reboot") { field(DESC,"Reboot Device") field(DTYP,"asynOctetWrite") field(OUT,"@asyn($(PORT),$(ADDR))REBOOT") field(VAL, "REST") } record(stringin, "$(P)GateInStatus") { field(DESC,"DS:AlwaysON/EN:Need Input") field(DTYP,"asynOctetRead") field(INP,"@asyn($(PORT),$(ADDR)) GATEINSTATUS") field(SCAN,"I/O Intr") } record(longin,"$(P)Count07") { field(DESC,"Counter 07") field(DTYP, "asynInt32") field(INP, "@asyn($(PORT),$(ADDR)) COUNT07") field(SCAN,"I/O Intr") } ... ... When I run the st.cmd file, it prompt: ”initCommon enum registerInterruptUser asynManager: getInterruptPvt Driver does not support interrupts on intterface asynEnum”.
All the test-error picture, st.cmd and the complete .cpp files are attatched. I don't know where the problem is and how to correct it. Maybe a polling function is necessary in the .cpp file when the SCAN filed is "I/O Intr", and the write or read functions
should be called in the polling function? Looking forward to your feedback. Thank you very much. Best wishes, Yoon |