mpiSynqNetIdleCableListGet

Declaration

long mpiSynqNetIdleCableListGet(MPISynqNet          synqNet,
                                MPISynqNetCableList *idleCable);

Required Header: stdmpi.h

Description

mpiSynqNetIdleCableListGet reads a SynqNet network's list of idle cables and writes them into the structure pointed to by idleCable. An idle cable has no data traffic. It is the redundant network connection available in ring topologies only. A single ring topology has only one idle cable.

After network initialization, the cable from the last node to the controller is idle by default. If a network fault occurs and the network is configured for fault recovery, the network traffic will be redirected around the faulty connection, through the idle cable, and the faulty connection will become the new idle cable. To test the idle cable, use the mpiSynqNetIdleCableStatus(...) method.

synqNet a handle to a SynqNet object
*idleCable a pointer to a SynqNet cable list structure. The cable list structure contains the number of idle cables and their identifying numbers.
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; }

See Also

mpiSynqNetIdleCableStatus | SynqNet Topologies