.

meiSynqNetIdleCableListGet

Declaration

 
long meiSynqNetIdleCableListGet(MEISynqNet          synqNet,
                                MEISynqNetCableList *idleCable);
  Required Header: stdmei.h

Description

meiSynqNetIdleCableListGet 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 meiSynqNetIdleCableStatus(...) 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. meiSynqNetIdleCableListGet(...) stores the 
number of idle cables (usually 1 in a ring network) and 
the idle cable number in MEISynqNetCableList. 
meiSynqNetIdleCableStatus will then test the current 
idle cable and store its status in MEISynqNetCableStatus. 
It can be one of these four values.

  MEISynqNetCableStatusGOOD
  MEISynqNetCableStatusBAD_UPSTREAM
MEISynqNetCableStatusBAD_DOWNSTREAM
MEISynqNetCableStatusBAD
*/
long getIdleCable(MEISynqNet synqNet, MEISynqNetCableStatus *idleCableStatus) { long returnValue; MEISynqNetCableList idleCable; /* Get idle cable list */ returnValue = meiSynqNetIdleCableListGet(synqNet, &idleCable); /* Check idle cable status if idle cable list is obtained successfully */ if(returnValue == MPIMessageOK) { returnValue = meiSynqNetIdleCableStatus(synqNet, idleCable.cableNumber[0], idleCableStatus); } return returnValue; }

See Also

meiSynqNetIdleCableStatus | SynqNet Topologies

 

       Legal Notice  |  Tech Email  |  Feedback
      
Copyright ©
2001-2021 Motion Engineering