SELAPI.h 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  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. * SELAPI.h
  17. * SEL Access API.
  18. *
  19. * Author: Govind Kothandapani <govindk@ami.com>
  20. *
  21. ******************************************************************/
  22. #ifndef SELAPI_H
  23. #define SELAPI_H
  24. #include "types.h"
  25. #include "com_IPMI_SEL.h"
  26. #define ADD_SEL_FAILED 0xFFFF
  27. /*-----------------------------------------------------------------
  28. * @fn API_GetSELRepositoryInfo
  29. * @brief Gets the information regarding the SEL.
  30. * @param pRepositoryInfo - Pointer to the repository information.
  31. * @return 0 if Success
  32. * -1 if no repository, or repository bad.
  33. *-----------------------------------------------------------------*/
  34. extern int API_GetSELRepositoryInfo (SELInfo_T* pRepositoryInfo, int BMCInst);
  35. /*-----------------------------------------------------------------
  36. * @fn API_GetSELAllocInfo
  37. * @brief Gets the SEL Allocation information.
  38. * @param pAllocInfo - Pointer to the allocation information.
  39. * @return 0 if Success
  40. * -1 if no repository, or repository bad.
  41. *-----------------------------------------------------------------*/
  42. extern int API_GetSELAllocInfo (SELAllocInfo_T* pAllocInfo, int BMCInst);
  43. /*-----------------------------------------------------------------
  44. * @fn API_GetFirstSEL
  45. * @brief Gets the first SEL record.
  46. * @param pSELRecord - Pointer to the buffer to hold the first SEL Record.
  47. * @return The next SEL Record ID
  48. * -1 if no SEL Record is found.
  49. *-----------------------------------------------------------------*/
  50. extern int API_GetFirstSEL (_FAR_ INT8U* pSELRecord, int BMCInst);
  51. /*-----------------------------------------------------------------
  52. * @fn API_GetSELRecord
  53. * @brief Gets the SEL record corresponding to the record ID.
  54. * @param RecordID - ID of the record to fetch.
  55. * @param pSELRecord - Pointer to the buffer to hold the first SEL Record.
  56. * @return The next SEL Record number
  57. * -1 if no next SEL Record is found.
  58. *-----------------------------------------------------------------*/
  59. extern int API_GetNextSEL (INT16U RecordID, _FAR_ INT8U* pSELRecord, int BMCInst);
  60. /*-----------------------------------------------------------------
  61. * @fn API_AddSELRecord
  62. * @brief Adds a new SEL Record.
  63. * @param pSELRecord - Pointer to the buffer holding the SEL Record.
  64. * @return Record ID of the record added.
  65. * -1 if failed.
  66. *-----------------------------------------------------------------*/
  67. extern int API_AddSELRecord (_FAR_ INT8U* pSELRecord, int BMCInst);
  68. /*-----------------------------------------------------------------
  69. * @fn API_ClearSELRepository
  70. * @brief Clears the SEL repository.
  71. * @return 0 if success
  72. * -1 if failed.
  73. *-----------------------------------------------------------------*/
  74. extern int API_ClearSELRepository (int BMCInst);
  75. /*-----------------------------------------------------------------
  76. * * @fn API_GetSELTime
  77. * * @brief Gets the SEL Time.
  78. * * @param pSELTime - Pointer to hold the time Value
  79. * * @return 0 if Success
  80. * * -1 if no repository, or repository bad.
  81. * *---------------------------------------------------------------- */
  82. extern int API_GetSELTime (_FAR_ INT32U *pSELTime, int BMCInst);
  83. #endif /* SELAPI_H */