Removed status argument from interrupt callbacks

This commit is contained in:
MarkRivers
2007-04-23 20:32:04 +00:00
parent 26599493ed
commit 25d699eb73
3 changed files with 13 additions and 23 deletions
+4 -6
View File
@@ -11,9 +11,9 @@
* Notwithstanding the above, explicit permission is granted for APS to
* redistribute this software.
*
* Version: $Revision: 1.18 $
* Version: $Revision: 1.19 $
* Modified by: $Author: rivers $
* Last Modified: $Date: 2007-04-17 21:05:42 $
* Last Modified: $Date: 2007-04-23 20:26:36 $
*
* Original Author: Peter Denison
* Current Author: Peter Denison
@@ -54,7 +54,7 @@ static long start_trans(struct motorRecord *);
static RTN_STATUS build_trans( motor_cmnd, double *, struct motorRecord *);
static RTN_STATUS end_trans(struct motorRecord *);
static void asynCallback(asynUser *);
static void statusCallback(void *, asynUser *, struct MotorStatus *, asynStatus status);
static void statusCallback(void *, asynUser *, struct MotorStatus *);
typedef enum {int32Type, float64Type, float64ArrayType} interfaceType;
@@ -512,13 +512,11 @@ static void asynCallback(asynUser *pasynUser)
* True callback to notify that controller status has changed.
*/
static void statusCallback(void *drvPvt, asynUser *pasynUser,
struct MotorStatus *value, asynStatus status)
struct MotorStatus *value)
{
motorAsynPvt *pPvt = (motorAsynPvt *)drvPvt;
motorRecord *pmr = pPvt->pmr;
/* We should probably do something sensible if status != asynSuccess !! */
asynPrint(pasynUser, ASYN_TRACEIO_DEVICE,
"%s devMotorAsyn::statusCallback new value=[p:%f,e:%f,s:%x] %c%c\n",
pmr->name, value->position, value->encoder_posn, value->status,
+7 -12
View File
@@ -19,9 +19,9 @@
* of this distribution.
* ************************************************************************
*
* Version: $Revision: 1.15 $
* Version: $Revision: 1.16 $
* Modified by: $Author: rivers $
* Last Modified: $Date: 2007-04-17 21:05:13 $
* Last Modified: $Date: 2007-04-23 20:29:20 $
*
* Original Author: Peter Denison
* Current Author: Peter Denison
@@ -711,11 +711,10 @@ static void intCallback(void *axisPvt, unsigned int nChanged,
if (addr == pAxis->num) {
for (i = 0; i < nChanged; i++) {
if (changed[i] == reason) {
/* Do we need to pass status!=asynSuccess sometimes? */
(*pPvt->drvset->getDouble)(pAxis->axis, changed[i], &dvalue);
pfloat64Interrupt->callback(pfloat64Interrupt->userPvt,
pfloat64Interrupt->pasynUser,
dvalue, asynSuccess);
dvalue);
}
}
}
@@ -731,10 +730,9 @@ static void intCallback(void *axisPvt, unsigned int nChanged,
addr = pmotorStatusInterrupt->addr;
reason = pmotorStatusInterrupt->pasynUser->reason;
if (addr == pAxis->num) {
/* Do we need to pass status!=asynSuccess sometimes? */
pmotorStatusInterrupt->callback(pmotorStatusInterrupt->userPvt,
pmotorStatusInterrupt->pasynUser,
&pAxis->status, asynSuccess);
&pAxis->status);
}
pnode = (interruptNode *)ellNext(&pnode->node);
}
@@ -753,25 +751,22 @@ static void intCallback(void *axisPvt, unsigned int nChanged,
if (BIT_ISSET(reason - motorStatusDirection, 1, &changedmask))
{
(*pPvt->drvset->getInteger)(pAxis->axis, reason, &ivalue);
/* Do we need to pass status!=asynSuccess sometimes? */
pint32Interrupt->callback(pint32Interrupt->userPvt,
pint32Interrupt->pasynUser,
ivalue, asynSuccess);
ivalue);
}
}
/* If we've subscribed to the aggregate status */
else if (reason == motorStatus) {
/* Do we need to pass status!=asynSuccess sometimes? */
pint32Interrupt->callback(pint32Interrupt->userPvt,
pint32Interrupt->pasynUser,
pAxis->status.status, asynSuccess);
pAxis->status.status);
}
else {
(*pPvt->drvset->getInteger)(pAxis->axis, reason, &ivalue);
/* Do we need to pass status!=asynSuccess sometimes? */
pint32Interrupt->callback(pint32Interrupt->userPvt,
pint32Interrupt->pasynUser,
ivalue, asynSuccess);
ivalue);
}
}
pnode = (interruptNode *)ellNext(&pnode->node);
+2 -5
View File
@@ -473,7 +473,6 @@ static void XPSAuxPoller(drvXPSAsynAuxPvt *pPvt)
int firstTime = 1;
int i;
int status;
asynStatus ioStatus = asynSuccess;
asynUser *pasynUser;
int addr, reason, mask, changedBits;
@@ -489,14 +488,12 @@ static void XPSAuxPoller(drvXPSAsynAuxPvt *pPvt)
if (status) {
asynPrint(pPvt->pasynUser, ASYN_TRACE_ERROR,
"drvXPSAsynAux::XPSAuxPoller error calling GPIOAnalogGet=%d\n", status);
ioStatus = asynError;
}
for (i=0; i<MAX_DIGITAL_INPUTS; i++) {
status = GPIODigitalGet(pPvt->socketID, digitalInputNames[i], &digitalValues[i]);
if (status) {
asynPrint(pPvt->pasynUser, ASYN_TRACE_ERROR,
"drvXPSAsynAux::XPSAuxPoller error calling GPIODigitalGet=%d\n", status);
ioStatus = asynError;
}
}
@@ -513,7 +510,7 @@ static void XPSAuxPoller(drvXPSAsynAuxPvt *pPvt)
if (firstTime) changedBits = 0xffff;
if ((mask & changedBits) && (reason == binaryInput)) {
pUInt32DigitalInterrupt->callback(pUInt32DigitalInterrupt->userPvt, pasynUser,
mask & digitalValues[addr], ioStatus);
mask & digitalValues[addr]);
}
pnode = (interruptNode *)ellNext(&pnode->node);
}
@@ -532,7 +529,7 @@ static void XPSAuxPoller(drvXPSAsynAuxPvt *pPvt)
if (reason == analogInput) {
pfloat64Interrupt->callback(pfloat64Interrupt->userPvt,
pfloat64Interrupt->pasynUser,
analogValues[addr], ioStatus);
analogValues[addr]);
}
pnode = (interruptNode *)ellNext(&pnode->node);
}