|
long printAxisErrorSources(MPIAxis axis)
{
MPIEventType eventType;
MPIStatus status;
MPIStatusFlag flag;
long axisNumber;
long returnValue;
/* Read the axis number */
returnValue = mpiAxisNumber(axis, &axisNumber);
if (returnValue != MPIMessageOK) return returnValue;
/* Read the axis status */
returnValue = mpiAxisStatus(axis, &status, NULL);
if (returnValue != MPIMessageOK) return returnValue;
/* Print the events currently active on the axis */
for (eventType=MPIEventTypeFIRST; eventType<MEIEventTypeLAST; ++eventType)
{
if (mpiEventMaskBitGET(status.eventMask, eventType) != FALSE)
{
printf("Event \"%s\" is active on axis %d\n", mpiEventTypeName(eventType), axisNumber);
}
}
/* mpiStatusMaskBIT() */
for (flag=MPIStatusFlagFIRST ; flag<MEIStatusFlagLAST; ++flag)
{
if (status.statusMask & mpiStatusMaskBIT(flag) != FALSE)
{
printf("Status flag type %d is active on axis %d\n", flag, axisNumber);
}
}
}
|