123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125 |
- /*
- * Brief: Declare some functions.
- * Author: Jimbo_zhang@outlook.com
- * Data: 2019-4-27
- */
- #ifndef __LIBIPMI_STORLEAD_OEM_H__
- #define __LIBIPMI_STORLEAD_OEM_H__
- #include "libipmi_struct.h"
- #include <stdint.h>
- #define MAX_TITLE_LEN 20
- #define MAX_TEXT_LEN 256
- #define MAX_HISTORY_LEN 480
- #define MAX_BLADE_NUM 32
- #define MAX_FAN_NUM 8
- #pragma pack(1)
- typedef struct{
- uint8_t fanNum;
- } OemFanInfo_T;
- typedef struct{
- uint8_t index;
- uint8_t name[16];
- uint8_t mode;
- uint8_t level; //duty 0% - 100%
- uint32_t speed; //RPM
- } OemFanStatus_T;
- typedef struct{
- char *title;
- char *text;
- }SysInfo_T;
- typedef struct{
- uint8_t bladeNum; //index
- uint8_t isChmc; //is main blade
- uint8_t IPMBAddr; //physical ID
- uint8_t status; //0: not install, 1: normal, 2: error
- uint8_t reserve;
- } bladeStatus_T;
- typedef struct{
- uint8_t complecode;
- bladeStatus_T bdStatus[10];
- } CardStatus_T;
- typedef struct{
- uint8_t slotNum; //total slot numbers of chassis.
- uint8_t supportChassisManageFn;
- uint8_t chassisManageFnEnable;
- uint8_t chMCIndex;
- } OemChassisInfo_T;
- typedef struct{
- uint8_t status;
- uint8_t bladeName[12];
- uint8_t slotID;
- uint8_t bladePowerStatus;
- } OemBladeStatus_T;
- typedef struct{
- uint8_t supportEventLogs;
- uint8_t supportBMCDevInfo;
- uint8_t supportBMCNetworkInfo;
- uint8_t supportCPUInfo;
- uint8_t supportFanCtrl;
- uint8_t supportFRU;
- uint8_t supportRemoteCtrl; //power on/off
- } OemIPMCCapability_T;
- typedef struct{
- uint8_t IPMBAddr;
- OemBladeStatus_T bladeStatus;
- } OemBladeInfo_T;
- typedef struct{
- uint8_t bladeNum;
- uint8_t fanNum;
- uint8_t supportHistory;
-
- } OemWebFlags_T;
- typedef struct
- {
- /*
- sensor_name array length increased from 17 to 20.
- In some cases sensor_name length is more than 17 characters. webgo was giving some special character to web page in those cases and webpage was giving some weird behaviour when it found that special character.
- */
- uint8_t sensor_num;
- char sensor_name[ 20 ];
- float sensor_history[ 480 ];
-
- }sensor_history_st;
- typedef struct{
- uint8_t isSupportSensorHistory;
- uint8_t SensorHistoryEnable;
- } SensorHistoryCapability_T;
- extern OemWebFlags_T g_OemWebFlags;
- //uint16_t LIBIPMI_HL_GetIPMCSensorInfo(IPMI20_UDS_SESSION_T *pUDSSession, SenInfo_T *pSensorInfo,uint32_t *nNumSensor,int timeout);
- //uint16_t LIBIPMI_HL_FanCtrol( IPMI20_UDS_SESSION_T *pUDSSession, uint8_t fanIndex, uint8_t fanMode, uint8_t fanLevel, int timeout);
- //int LIBIPMI_HL_GetFanStatus( IPMI20_UDS_SESSION_T *pUDSSession, uint8_t fanIndex, OemFanStatus_T *pFanStatus, int timeout);
- uint16_t LIBIPMI_HL_GetSysInfo( IPMI20_UDS_SESSION_T *pUDSSession, SysInfo_T *pSysInfo, int timeout);
- //uint16_t LIBIPMI_HL_GetSensorHistory( IPMI20_UDS_SESSION_T *pUDSSession, sensor_history_st *pSensorHistory_st, int card_index, int sensor_number, int IPMB_ADDR);
- //uint16_t LIBIPMI_HL_GetAllCards(IPMI20_UDS_SESSION_T *pUDSSession, CardStatus_T* pResBladeSts, int timeout);
- //int LIBIPMI_HL_GetChassisInfo(IPMI20_UDS_SESSION_T *pUDSSession, OemChassisInfo_T* pBladeInfo, int timeout);
- //int LIBIPMI_HL_GetBladeStatus(IPMI20_UDS_SESSION_T *pUDSSession, OemBladeStatus_T* pBladeStatus, int timeout);
- //int LIBIPMI_HL_GetIPMCCapability(IPMI20_UDS_SESSION_T *pUDSSession, uint8_t bladeIndex, OemIPMCCapability_T* pIPMCCapability, int timeout);
- //int LIBIPMI_HL_SetBladeManageFn(IPMI20_UDS_SESSION_T *pUDSSession, uint8_t enable, int timeout);
- //int LIBIPMI_HL_GetManageWebName(IPMI20_UDS_SESSION_T *pUDSSession, char* webName, int timeout);
- //int LIBIPMI_HL_GetFanInfo(IPMI20_UDS_SESSION_T *pUDSSession, OemFanInfo_T* pFanInfo, int timeout);
- //int LIBIPMI_HL_GetSensorHistoryCapability(IPMI20_UDS_SESSION_T *pUDSSession, uint8_t sensorNum, SensorHistoryCapability_T* pSensorHistoryCapability, int timeout);
- //int LIBIPMI_HL_GetSensorHistoryEn(IPMI20_UDS_SESSION_T *pUDSSession, uint8_t* SensorHistoryEnable, int timeout);
- //int LIBIPMI_HL_SetSensorHistoryEn(IPMI20_UDS_SESSION_T *pUDSSession, uint8_t sensorNum, uint8_t SensorHistoryEnable, int timeout);
- #pragma pack()
- #endif /* __LIBIPMI_STORLEAD_OEM_H__ */
|