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>
Reply to: cxy <ycx810212 at 163.com>
Date: Monday, 22 January 2024 at 07:18
To: "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov>
Subject: A question on asyn application
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.
|