MiApp_MessageAvailable Function

MiWi Development Environment

MiWi(TM) Development Environment Help
MiApp_MessageAvailable Function
C
BOOL MiApp_MessageAvailable();
Description

This is the primary user interface functions for the application layer to call the Microchip proprietary protocol stack to check if a message is available for the application. The function will call the protocol stack state machine to keep the stack running. It is expected that this function should be called periodically in the application. In case a message is available, all information related to the recevied message will be stored in the global variable RxMessage in the format of RECEIVED_MESSAGE.

Preconditions

Protocol initialization has been done.

Returns

A boolean to indicates if a message is available for application.

Remarks

None

Example
if( TRUE == MiApp_MessageAvailable() )
{
    // handle the received message in global variable RxMessage

    // discard the received message after processing
    MiApp_DiscardMessage();
}
Microchip My Application xx.yy - [Jan 1, 2009]
Copyright © 2009 Microchip Technology, Inc.  All rights reserved.