libipmi_PEF.h 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. #ifndef __LIBIPMI_PEF_H__
  2. #define __LIBIPMI_PEF_H__
  3. /* LIIPMI core header files */
  4. #include "libipmi_session.h"
  5. #include "libipmi_errorcodes.h"
  6. /* command specific header files */
  7. #pragma pack(1)
  8. #include "com_IPMI_PEF.h"
  9. #pragma pack()
  10. #include "com_IPMI_SensorEvent.h"
  11. #define SET_IN_PROGRESS_PARAM 0x00
  12. #define SET_IN_PROGRESS_MASK 0x03
  13. #define SET_COMPLETE 0x00
  14. #define SET_IN_PROGRESS 0x01
  15. #define COMMIT_WRITE 0x02
  16. #ifdef __cplusplus
  17. extern "C" {
  18. #endif
  19. /* Get PEF Capabilities Command */
  20. uint16_t IPMICMD_GetPEFCapabilities( IPMI20_UDS_SESSION_T *pUDSSession,
  21. GetPEFCapRes_T *pResGetPEFCap,
  22. int timeout);
  23. /* Arm PEF Postpone Timer Command */
  24. uint16_t IPMICMD_ArmPEFTimer( IPMI20_UDS_SESSION_T *pUDSSession/*in*/,
  25. uint8_t* pReqTmrTimeout/*in*/,
  26. ArmPEFTmrRes_T *pResArmPEFTmr/*out*/,
  27. int timeout/*in*/);
  28. /* Set PEF Configuration Parameters Command */
  29. uint16_t IPMICMD_SetPEFConf( IPMI20_UDS_SESSION_T *pUDSSession/*in*/,
  30. uint8_t *pReqSetPEFConf/*in*/,
  31. uint32_t dwReqBufLen,
  32. uint8_t *pResSetPEFConf/*out*/,
  33. int timeout/*in*/);
  34. /* Get PEF Configuration Parameters Command */
  35. uint16_t IPMICMD_GetPEFConf( IPMI20_UDS_SESSION_T *pUDSSession/*in*/,
  36. GetPEFConfigReq_T *pReqGetPEFConf/*in*/,
  37. uint8_t *pResGetPEFConf/*out*/,
  38. int timeout/*in*/);
  39. /* Set Last Processed Event ID Command */
  40. uint16_t IPMICMD_SetLastEventID( IPMI20_UDS_SESSION_T *pUDSSession/*in*/,
  41. SetLastEvtIDReq_T *pReqSetLastEvt/*in*/,
  42. uint8_t *pResSetLastEvt/*out*/,
  43. int timeout/*in*/);
  44. /* Get Last Processed Event ID Command */
  45. uint16_t IPMICMD_GetLastEventID( IPMI20_UDS_SESSION_T *pUDSSession/*in*/,
  46. GetLastEvtIDRes_T *pResGetLastEvt/*out*/,
  47. int timeout/*in*/);
  48. /* Alert Immediate Command */
  49. uint16_t IPMICMD_AlertImmediate( IPMI20_UDS_SESSION_T *pUDSSession/*in*/,
  50. AlertImmReq_T *pReqAlertImmediate/*in*/,
  51. AlertImmRes_T *pResAlertImmediate/*out*/,
  52. int timeout/*in*/);
  53. /* PET Acknowledge Command */
  54. uint16_t IPMICMD_PETAck( IPMI20_UDS_SESSION_T *pUDSSession/*in*/,
  55. PETAckReq_T *pReqPETAck /*out*/,
  56. uint8_t *pResPETACK /*out*/,
  57. int timeout/*in*/);
  58. /*---------- PEF Higher level routines -----------*/
  59. /*********** Alert Table **********/
  60. uint16_t LIBIPMI_HL_GetNumOfAlertPolicyEntries(IPMI20_UDS_SESSION_T *pUDSSession,
  61. uint8_t* pNumOfAlertPolicyEntries,
  62. int timeout);
  63. uint16_t LIBIPMI_HL_GetAnAlertEntry(IPMI20_UDS_SESSION_T *pUDSSession,
  64. uint8_t AlertEntryNumber,
  65. AlertPolicyTblEntry_T* pAlertEntry,
  66. int timeout);
  67. uint16_t LIBIPMI_HL_SetAnAlertEntry(IPMI20_UDS_SESSION_T *pUDSSession,
  68. uint8_t AlertEntryNumber,
  69. AlertPolicyTblEntry_T* pAlertEntry,
  70. int timeout);
  71. uint16_t LIBIPMI_HL_GetAlertTable(IPMI20_UDS_SESSION_T *pUDSSession,
  72. AlertPolicyTblEntry_T* pAlertTable,
  73. uint8_t* pNumOfAlertEntries,
  74. int timeout);
  75. uint16_t LIBIPMI_HL_SetGraspAlertLevel(IPMI20_UDS_SESSION_T *pUDSSession,
  76. uint8_t IndexNum,
  77. uint8_t AlertLevel,
  78. uint8_t Channel,
  79. int timeout);
  80. uint16_t LIBIPMI_HL_GetGraspAlertLevel(IPMI20_UDS_SESSION_T *pUDSSession,
  81. uint8_t IndexNum,
  82. uint8_t* AlertLevel,
  83. uint8_t* DestIndex,
  84. int timeout);
  85. /*********** PEF Table ********/
  86. uint16_t LIBIPMI_HL_GetPEFTable(IPMI20_UDS_SESSION_T *pUDSSession,
  87. EvtFilterTblEntry_T* pPEFTable,
  88. uint8_t* pNumOfPEFEntries,
  89. int timeout);
  90. uint16_t LIBIPMI_HL_GetPEFEntry(IPMI20_UDS_SESSION_T *pUDSSession,
  91. uint8_t PEFEntryNumber,
  92. EvtFilterTblEntry_T* pPEFEntry,
  93. int timeout);
  94. uint16_t LIBIPMI_HL_SetPEFEntry(IPMI20_UDS_SESSION_T *pUDSSession,
  95. uint8_t PEFEntryNumber,
  96. EvtFilterTblEntry_T* pPEFEntry,
  97. int timeout);
  98. uint16_t LIBIPMI_HL_GetNumOfPEFEntries(IPMI20_UDS_SESSION_T *pUDSSession,
  99. uint8_t* pNumOfPEFEntries,
  100. int timeout);
  101. #ifdef __cplusplus
  102. }
  103. #endif
  104. #endif