/***************************************************************** ***************************************************************** *** ** *** (C)Copyright 2005-2006, American Megatrends Inc. ** *** ** *** All Rights Reserved. ** *** ** *** 6145-F, Northbelt Parkway, Norcross, ** *** ** *** Georgia - 30071, USA. Phone-(770)-246-8600. ** *** ** ***************************************************************** ***************************************************************** ****************************************************************** * * message.h * Inter task messaging functions. * * Author: Govind Kothandapani ******************************************************************/ #ifndef MESSAGE_H #define MESSAGE_H #include "Types.h" //#include "OSPort.h" #include #include "bmc_type.h" #pragma pack( 1 ) #define IP_ADDR_LEN 4 #define IP6_ADDR_LEN 16 #define COMMON_QUEUE 0 /*----------------------------------- * Definitions *-----------------------------------*/ //#define MSG_PAYLOAD_SIZE 1024 * 60 #define PIPE_NAME_LEN 64 #pragma pack( ) /** * @brief Initialisation * @return 0 if success, -1 if failed. **/ /** * @fn PostMsgNonBlock * @brief Post a message to the destination task without blocking. * @param MsgPkt - Message to be posted. * @param Queue - Queue to post this message to. * @return 0 if success, -1 if failed. **/ /** * @fn AddToQueue * @brief Post a buffer to the destination task. * @param pBuf - Buffer to be posted. * @param Queuepath - Queuepath to post this buffer to. * @return 0 if success, -1 if failed. **/ /** * @fn GetMsg * @brief Gets the message posted to this task. * @param MsgPkt - Pointer to the buffer to hold the message packet. * @param Queue - Queue to fetch the message from. * @param NumMs - Number of milli-seconds to wait. * WAIT_NONE - If the function has to return immediately. * WAIT_INFINITE - If the function has to wait infinitely. * NOTE : * @return 0 if success, -1 if failed. **/ /** * @fn GetMsgInMsec * @brief GetMsgInMsec() is wrapper function over GetMsg() and it is maintained for backward compatibality. * */ /** * @brief Returns the number of messages in the Queue. * @param Queue Queue. **/ /** * @fn AddQueue * @brief Adds the Queue to the common Queue Handle structure * @param Queuepath - Queue Path **/ /** * @fn GetQueue * @brief Opens the Created Queue Handle from the Common * Queue Handle Structure * @param Queuepath - Queue Path * @return Return 0 **/ /** * @fn GetQueueHandle * @brief Gets the Queue Handle from the Common * Queue Handle Structure * @param Queuepath - Queue Path * @param IfcQ Handle for the needed Queue * @return Return 0 **/ #endif /* MESSAGE_H */