mpiSqNodeStatus
Declaration
int32_t mpiSqNodeStatus(MPISqNode node, MPISqNodeStatus *status);
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. */ int32_t getNodeUpStreamError(MPISqNode sqNode, int32_t *rate, int32_t *count) { int32_t returnValue; MPISqNodeStatus sqNodeStatus; returnValue = mpiSqNodeStatus(sqNode, &sqNodeStatus); if(returnValue = MPIMessageOK) { *rate = sqNodeStatus.upStreamError.rate; *count = sqNodeStatus.upStreamError.count; } return returnValue; }