NexMotion  1.4.0
Open Robots & Machines [WIP]
System_Information

Fuctions for outputing messages of system information. More...

Collaboration diagram for System_Information:

Functions

RTN_ERR FNTYPE NMC_MessagePopFirst (_opt_null_ NmcMsg_T *PRetMsg)
 Read system message queue. More...
 
void FNTYPE NMC_MessageOutputEnable (BOOL_T Enable)
 Transfer a copy of message to MS Windows system message. More...
 

Detailed Description

Fuctions for outputing messages of system information.

Function Documentation

void FNTYPE NMC_MessageOutputEnable ( BOOL_T  Enable)

Transfer a copy of message to MS Windows system message.

Parameters
EnableFalse (0): not to transfer, True (1): transfer
Returns
None.

Usage:
After NMC_MessageOutputEnable(True) is called, the system message will be transferred to MS Windows system message.

Examples:

Reference:
NMC_MessagePopFirst()

RTN_ERR FNTYPE NMC_MessagePopFirst ( _opt_null_ NmcMsg_T PRetMsg)

Read system message queue.

Parameters
[out]PRetMsgData structure of system information which can be set to NULL to remove the message from the message queue. Note that if the parameter is not NULL, the "sizeOfStruct" member variable in the structure must be initialized before calling NMC_MessagePopFirst(). See the sample program below.
Returns
Return an error code.
If the function is called successfully, the return value is ERR_NEXMOTION_SUCCESS (0). Otherwise, the return value is an error code. All error codes are defined in the header file, NexMotionError.h. If there is no system message, the function will return ERR_NEXMOTION_QUEUE_EMPTY.

Usage:
NMC_MessagePopFirst() will read and remove the first (oldest) message from the message queue in order.

Examples:

RTN_ERR ret;
msg.sizeOfStruct = sizeof(msg);
do{
ret = NMC_MessagePopFirst( &msg );
if( ret == ERR_NEXMOTION_SUCCESS )
{
printf( " Msg:Type=%d, code=%d, src=%s, text=%s\n", msg.type, msg.code, msg.source, msg.text );
}
}while( ret == ERR_NEXMOTION_SUCCESS );

Reference:
NMC_MessageOutputEnable()