mpiSynqNetIdleCableStatus
Declaration
long mpiSynqNetIdleCableStatus(MPISynqNet synqNet, long cableNumber, MPISynqNetCableStatus *cableStatus);
Required Header: stdmpi.h
Description
mpiSynqNetIdleCableStatus reads an idle cable's status and writes it into the structure pointed to by cableStatus. Normally, the idle cable has no data traffic. mpiSynqNetIdleCableStatus(...) sends a special test packet across the specified idle cable and then waits for a valid response, then it sends another test packet in the opposite direction and waits for valid response.
The idle cable number for a network can be found using mpiSynqNetIdleCableListGet(...). SynqNetIdleCableStatus is not allowed for non-idle cables or when the network is recovering from a fault. During fault recovery (SynqNetState = SYNQ_RECOVERING), the network traffic is redirected around the faulty connection and the idle cable is reassigned. After recovery is complete (SynqNetState = SYNQ), the new idle cable can be tested with SynqNetIdleCableStatus. Use mpiSynqNetStatus(...) to determine the SynqNet state.
synqNet | a handle to a SynqNet object |
---|---|
cableNumber | the number of the cable to be tested |
*cableStatus | a pointer to a SynqNet cable status enumerated value. |
Return Values | |
---|---|
MPIMessageOK |
Sample Code
/* CheckIdleCableStatus(...) demonstrates how to check the idle cable status. mpiSynqNetIdleCableListGet stores the number of idle cables (usually 1 in a ring network) and the idle cable number in MPISynqNetCableList. mpiSynqNetIdleCableStatus(...) will then test the current idle cable and store its status in MPISynqNetCableStatus. It can be one of these four values. MPISynqNetCableStatusGOOD MPISynqNetCableStatusBAD_UPSTREAM
MPISynqNetCableStatusBAD_DOWNSTREAM
MPISynqNetCableStatusBAD
*/ long getIdleCable(MPISynqNet synqNet, MPISynqNetCableStatus *idleCableStatus) { long returnValue; MPISynqNetCableList idleCable; /* Get idle cable list */ returnValue = mpiSynqNetIdleCableListGet(synqNet, &idleCable); /* Check idle cable status if idle cable list is obtained successfully */ if(returnValue == MPIMessageOK) { returnValue = mpiSynqNetIdleCableStatus(synqNet, idleCable.cableNumber[0], idleCableStatus); } return returnValue; }