Message.h 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. /*****************************************************************
  2. *****************************************************************
  3. *** **
  4. *** (C)Copyright 2005-2006, American Megatrends Inc. **
  5. *** **
  6. *** All Rights Reserved. **
  7. *** **
  8. *** 6145-F, Northbelt Parkway, Norcross, **
  9. *** **
  10. *** Georgia - 30071, USA. Phone-(770)-246-8600. **
  11. *** **
  12. *****************************************************************
  13. *****************************************************************
  14. ******************************************************************
  15. *
  16. * message.h
  17. * Inter task messaging functions.
  18. *
  19. * Author: Govind Kothandapani <govindk@ami.com>
  20. ******************************************************************/
  21. #ifndef MESSAGE_H
  22. #define MESSAGE_H
  23. #include "Types.h"
  24. //#include "OSPort.h"
  25. #include <time.h>
  26. #include "bmc_type.h"
  27. #pragma pack( 1 )
  28. #define IP_ADDR_LEN 4
  29. #define IP6_ADDR_LEN 16
  30. #define COMMON_QUEUE 0
  31. /*-----------------------------------
  32. * Definitions
  33. *-----------------------------------*/
  34. //#define MSG_PAYLOAD_SIZE 1024 * 60
  35. #define PIPE_NAME_LEN 64
  36. #pragma pack( )
  37. /**
  38. * @brief Initialisation
  39. * @return 0 if success, -1 if failed.
  40. **/
  41. /**
  42. * @fn PostMsgNonBlock
  43. * @brief Post a message to the destination task without blocking.
  44. * @param MsgPkt - Message to be posted.
  45. * @param Queue - Queue to post this message to.
  46. * @return 0 if success, -1 if failed.
  47. **/
  48. /**
  49. * @fn AddToQueue
  50. * @brief Post a buffer to the destination task.
  51. * @param pBuf - Buffer to be posted.
  52. * @param Queuepath - Queuepath to post this buffer to.
  53. * @return 0 if success, -1 if failed.
  54. **/
  55. /**
  56. * @fn GetMsg
  57. * @brief Gets the message posted to this task.
  58. * @param MsgPkt - Pointer to the buffer to hold the message packet.
  59. * @param Queue - Queue to fetch the message from.
  60. * @param NumMs - Number of milli-seconds to wait.
  61. * WAIT_NONE - If the function has to return immediately.
  62. * WAIT_INFINITE - If the function has to wait infinitely.
  63. * NOTE :
  64. * @return 0 if success, -1 if failed.
  65. **/
  66. /**
  67. * @fn GetMsgInMsec
  68. * @brief GetMsgInMsec() is wrapper function over GetMsg() and it is maintained for backward compatibality.
  69. * */
  70. /**
  71. * @brief Returns the number of messages in the Queue.
  72. * @param Queue Queue.
  73. **/
  74. /**
  75. * @fn AddQueue
  76. * @brief Adds the Queue to the common Queue Handle structure
  77. * @param Queuepath - Queue Path
  78. **/
  79. /**
  80. * @fn GetQueue
  81. * @brief Opens the Created Queue Handle from the Common
  82. * Queue Handle Structure
  83. * @param Queuepath - Queue Path
  84. * @return Return 0
  85. **/
  86. /**
  87. * @fn GetQueueHandle
  88. * @brief Gets the Queue Handle from the Common
  89. * Queue Handle Structure
  90. * @param Queuepath - Queue Path
  91. * @param IfcQ Handle for the needed Queue
  92. * @return Return 0
  93. **/
  94. #endif /* MESSAGE_H */