/** Callback function which is called either from drvAPS_EM::pollerThread or from the interrupt driver when a pulse is received from the VME card. * Calls drvAPS_EM::readMeter and then drvQuadEM::computePositions. * \param[in] mask The mask of bit status in the Ip-Unidig. We can get callbacks on both high-to-low and low-to-high transitions * of the pulse to the digital I/O board. We only want to use one or the other. * mask is 0 if this was a high-to-low transition, which is the one we use. */ void drvAPS_EM::callbackFunc(epicsUInt32 mask) { int input[QE_MAX_INPUTS]; int i; static const char *functionName="intFunc"; asynPrint(pasynUserSelf, ASYN_TRACE_FLOW, "%s:%s: got callback, mask=%x\n", driverName, functionName, mask); if (mask) return; lock(); /* Read the new data */ readMeter(input); if (readingsAveraged_ == 0) { for (i=0; i<QE_MAX_INPUTS; i++) { rawData_[i] = 0; } } for (i=0; i<QE_MAX_INPUTS; i++) { rawData_[i] += input[i]; } readingsAveraged_++; if (readingsAveraged_ >= valuesPerRead_) { for (i=0; i<QE_MAX_INPUTS; i++) { rawData_[i] /= readingsAveraged_; } readingsAveraged_ = 0; /* Compute sum, difference, and position and do callbacks */ computePositions(rawData_); } unlock(); }
void Vxls::allocate() { blocks = sortBlocks(unit); splitCritEdges(); computePositions(); analyzeRsp(); buildIntervals(); walkIntervals(); resolveSplits(); lowerCopyargs(); resolveEdges(); renameOperands(); insertCopies(); }