.

meiSynqNetIdleCableStatus

Declaration

 
long meiSynqNetIdleCableStatus(MEISynqNet             synqNet,
                               long                   cableNumber,
                               MEISynqNetCableStatus  *cableStatus);
  Required Header: stdmei.h

Description

meiSynqNetIdleCableStatus reads an idle cable's status and writes it into the structure pointed to by cableStatus. Normally, the idle cable has no data traffic. meiSynqNetIdleCableStatus(...) 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 meiSynqNetIdleCableListGet(...). 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 meiSynqNetStatus(...) 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. 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

meiSynqNetIdleCableListGet | MEISynqNetState

 

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