Hi Torsten and Yoon,
Yoon’s original message DOES have the asynEnumMask in both the interface mask and the interrupt mask. This is from his original message, I have added red highlighting.
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*/
So I don’t understand why that message is appearing.
Yoon, please send the output of this command after the IOC has booted:
asynReport 3 PORT1
That will show what interfaces are configured to do callbacks.
Mark
From: Tech-talk <tech-talk-bounces at aps.anl.gov> On Behalf Of
Torsten Bögershausen via Tech-talk
Sent: Monday, January 22, 2024 12:45 AM
To: cxy <ycx810212 at 163.com>; tech-talk at aps.anl.gov
Subject: Re: A question on asyn application
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*/
{
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")
record(stringin,"$(P)Mod")
field(DESC,"Get counter mod")
field(DTYP, "asynOctetRead")
field(INP, "@asyn($(PORT),$(ADDR)) MOD")
record(stringout,"$(P)Reboot")
field(DESC,"Reboot Device")
field(DTYP,"asynOctetWrite")
field(OUT,"@asyn($(PORT),$(ADDR))REBOOT")
record(stringin, "$(P)GateInStatus")
field(DESC,"DS:AlwaysON/EN:Need Input")
field(DTYP,"asynOctetRead")
field(INP,"@asyn($(PORT),$(ADDR)) GATEINSTATUS")
record(longin,"$(P)Count07")
field(INP, "@asyn($(PORT),$(ADDR)) COUNT07")
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.