mpiSqNodeStatus

Declaration

long mpiSqNodeStatus(MPISqNode          node,
                     MPISqNodeStatus    *status);
Required Header: stdmpi.h

Description

mpiSqNodeStatus reads status from the node associated with the SynqNet object and writes it into the structure pointed to by status. The SynqNet node status structure contains error counters and event mask data.

NOTE: This data requires service commands to acces the data on the node. As a result, it may take up to 9 servo cycles to read the data. At the default sample rate of 2kHz, this would translate to 4.5ms.

node a handle to a SynqNet node object.
*status pointer to a SynqNet status structure.
Return Values
MPIMessageOK
MPIMessageARG_INVALID

Sample Code

/* getNodeUpStreamError(...) demonstrates how to read SqNode 
upstream errrors using function mpiSqNodeStatus(...) and 
structure MPISqNodeStatus.
*/
long getNodeUpStreamError(MPISqNode   sqNode, 
                          long        *rate,
                          long        *count)
{
   long returnValue;
   MPISqNodeStatus sqNodeStatus;

   returnValue = 
      mpiSqNodeStatus(sqNode, 
                      &sqNodeStatus);

   if(returnValue = MPIMessageOK)
   {
      *rate = sqNodeStatus.upStreamError.rate;
      *count = sqNodeStatus.upStreamError.count;
   }
   return returnValue;
}

See Also

mpiSynqNetStatus | mpiSqNodeInfo