PEFTmr.h 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  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. * PEFTmr.h
  17. *
  18. *
  19. * Author: Govind Kothandapani <govindk@ami.com>
  20. * : Rama Bisa <ramab@ami.com>
  21. * : Basavaraj Astekar <basavaraja@ami.com>
  22. * : Bakka Ravinder Reddy <bakkar@ami.com>
  23. *
  24. *****************************************************************/
  25. #ifndef PEFTMRMGR_H
  26. #define PEFTMRMGR_H
  27. #include "Types.h"
  28. #include "SELRecord.h"
  29. #include "Message.h"
  30. /*** Macro Definitions ***/
  31. /**
  32. * @def MAX_DEFERRED_ALERTS
  33. * @brief Maximum number of Deferred Alerts
  34. **/
  35. #define MAX_DEFERRED_ALERTS 8
  36. /**
  37. * @def MAX_PET_ACK
  38. * @brief Maximum number of PET acknowledgements
  39. **/
  40. #define MAX_PET_ACK (MAX_DEFERRED_ALERTS * MAX_EVT_FILTER_ENTRIES)
  41. #pragma pack( 1 )
  42. /*** Type definitions ***/
  43. /**
  44. * @struct PEFTmrMgr_T
  45. * @brief PEF Timer table
  46. **/
  47. typedef struct
  48. {
  49. INT8U TmrArmed; /**< Flag to indicate Timer is armed or not */
  50. INT8U StartTmr; /**< Flag to indicate Timer started or not */
  51. INT8U TmrInterval; /**< Timeout interval */
  52. INT8U InitCountDown; /**< Initial Count down value */
  53. INT8U TakePEFAction; /**< Action to be taken on timeout */
  54. INT8U StartDlyTmr; /**< Count Startup delay*/
  55. INT8U AlertStartDlyTmr; /**< Count Alert Startup delay*/
  56. INT8U ResetFlag;
  57. } PACKED PEFTmrMgr_T;
  58. /**
  59. * @struct PETAckTimeOutMgr_T
  60. * @brief PET Acknowledgement Timer table
  61. **/
  62. typedef struct
  63. {
  64. INT8U Present ; /**< Flag to indicate Timer is armed or not */
  65. INT8U AckTimeOut; /**< Acknowledgement time out value */
  66. INT8U RetryInterval; /* Initial Retry interval value ,we have to use for each retry PEF Traps*/
  67. INT8U Retries; /**< Number of retries */
  68. INT16U SequenceNum;/**< Sequence No from PET */
  69. INT32U Timestamp; /**< Timestamp from PET */
  70. INT8U DestSel; /**< Destination Selector from PET */
  71. INT8U Channel; /* Since we are supporting the mulit LAN channel we have to maintain the LAN channel */
  72. SELEventRecord_T EvtRecord; /**< Event record from PET */
  73. } PACKED PETAckTimeOutMgr_T;
  74. /**
  75. * @struct DeferredAlertEntries_T
  76. * @brief Matched entries table for deferred alerts
  77. **/
  78. typedef struct
  79. {
  80. INT8U EvtFilterNum;
  81. INT8U Total;
  82. INT8U Entries[MAX_ALERT_POLICY_ENTRIES];
  83. INT8U ChannelNum;
  84. INT8U DestType;
  85. INT8U AlertStatus;
  86. INT16U SeqNum;
  87. INT8U Present;
  88. } PACKED DeferredAlertEntries_T;
  89. /**
  90. * @struct DeferredAlert_T
  91. * @brief Deferred Alerts table
  92. **/
  93. typedef struct
  94. {
  95. INT16U ID;
  96. INT8U Total;
  97. DeferredAlertEntries_T AlertEntries[MAX_EVT_FILTER_ENTRIES];
  98. } PACKED DeferredAlert_T;
  99. #pragma pack( )
  100. /**
  101. * @brief This function takes an action on PEF timeout depending on the actions specified.
  102. **/
  103. extern void PEFTimerTask (int BMCInst);
  104. /**
  105. * @brief This function re sends the alert on PET Acnowledgement timeout
  106. **/
  107. extern void PETAckTimerTask (int BMCInst);
  108. /**
  109. * @brief This function is used to count down the PEF alert and power startup delay
  110. **/
  111. extern void PEFStartDlyTimerTask (int BMCInst);
  112. #endif /* PEFTMRMGR_H */