⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dtdecode.h

📁 RAID卡的测试程序
💻 H
📖 第 1 页 / 共 5 页
字号:
*       [out] pu32Count, the count of physical drive (s) to be returned.
* Return: PIERR_NO_ERROR, suceeded; otherwise, failed.
* Remarks: The pu8Buffer points to a buffer of req_data_phydrv_info_t type.  
*       Assuming that the info in the buffer is in the ascending order of
*       the physical drive id and page code.
****************************************************************************/
u32 decod_getBufferCountPhyDrvInfo(const u8 * pu8Buffer, 
    const u32 u32Length, u32 * pu32Count);

/***************************************************************************
* Function Name: decod_locateBufferPhyDrvInfo
* Description: locate the physical drive info page with the specified physical
*       drive id and page code. If the physical drive is not available in the 
*       buffer, locate the next available one. 
* Parameters:    
*       [in] pu8Buffer, the pointer to the physical drive info data buffer; 
*       [in] u32Length, the length of the buffer; 
*       [in] u32DevId, the physical drive id
*       [in] u16PageCode, the physical drive info page code
*       [out] ppInfo, the pointer to the physical drive info page of the 
*           specified physical drive or of the next available one.
* Return: PIERR_NO_ERROR, suceeded; otherwise, failed.
* Remarks: The pu8Buffer points to a buffer of req_data_phydrv_info_t type.  
*       Assuming that the info in the buffer is in the ascending order of
*       the physical drive id and page code.
****************************************************************************/
u32 decod_locateBufferPhyDrvInfo(const u8 * pu8Buffer, const u32 u32Length,
    const u32 u32DevId, const u16 u16PageCode, u8 ** ppInfo);

/***************************************************************************
* Function Name: decod_locateBufferPhyDrvInfoPrecise
* Description: locate the physical drive info page with the specified physical
*       drive id and page code. If the physical drive is not available in the 
*       buffer, return an error of PIERR_NOT_FOUND. 
* Parameters:    
*       [in] pu8Buffer, the pointer to the physical drive info data buffer; 
*       [in] u32Length, the length of the buffer; 
*       [in] u32DevId, the physical drive id
*       [in] u16PageCode, the physical drive info page code
*       [out] ppInfo, the pointer to the physical drive info page of the 
*           specified physical drive.
* Return: PIERR_NO_ERROR, suceeded; otherwise, failed.
* Remarks: The pu8Buffer points to a buffer of req_data_phydrv_info_t type.  
*       Assuming that the info in the buffer is in the ascending order of
*       the physical drive id and page code.
****************************************************************************/
u32 decod_locateBufferPhyDrvInfoPrecise(const u8 * pu8Buffer, const u32 u32Length,
    const u32 u32DevId, const u16 u16PageCode, u8 ** ppInfo);

/***************************************************************************
* Function Name: decod_getStringPhyDrvOpStatus
* Description: a simple way of get the string of the physical drive 
*       operational status. It only returns the most significant op status. 
* Parameters:
*       [out] pstrOpStatus, the string of the physical drive operational status.
*       [in] u32Flags, the physical drive device flags.
* Return: none.
* Remarks: none.
****************************************************************************/
void decod_getStringPhyDrvOpStatus(char * pstrOpStatus, const u32 u32Flags);

/***************************************************************************
* Function Name: decod_getStringPhyDrvOpStatusEx
* Description: get all the phy drv op status in a string. 
* Parameters:
*       [out] pstrOpStatus, the string of the physical drive operational status.
*       [in] u32Flags, the physical drive device flags.
* Return: the string of the physical drive operational status.
* Remarks: none.
****************************************************************************/
void decod_getStringPhyDrvOpStatusEx(char * pstrOpStatus, const u32 u32Flags);

/***************************************************************************
* Function Name: decod_getPhyDrvOpStatus
* Description: get an array of all the operational status of the physical drive 
* Parameters:
*       [in] u32Flags, the physical drive device flags.
*       [out] u16OpStatus, the array of the op status to be returned
*       [out] pu32OpStatusSize, the size of the op status array.    
* Return: none.
* Remarks: none.
****************************************************************************/
void decod_getPhyDrvOpStatus(const u32 u32Flags, 
    u16 u16OpStatus[], u32 * pu32OpStatusCount);

/***************************************************************************
* Function Name: decod_getPhyDrvConfigStatus
* Description: get the string of physical drive configuration status
* Parameters:
*       [out] pstrConfigStatus, the config status to be returned;
*       [in] pPage0, the page 0 of the phy drv info.
* Return: none.
* Remarks: none.
****************************************************************************/
void decod_getStringPhyDrvConfigStatus(char * pstrConfigStatus, 
    const micPDInfoPage0_t * pPage0);
    
/***************************************************************************
* Function Name: decod_getStringPhyDrvLocation
* Description: get the string where the physical drive is located. If either
*       of the enclosure id and the slot id is 0xFFFF, the location string
*       will be "Unknown". Otherwise, the location string will be in the
*       format of "Encl <encl id> Slot <slot id>"
* Parameters:    
*       [out]pstrLocation, the location string to be returned
*       [in] u16EnclosureId, the enclosure id of the phy drv
*       [in] u16SlotId, the slot id of the phy drv
* Return: none.
* Remarks: none.
****************************************************************************/
void decod_getStringPhyDrvLocation(char * pstrLocation, 
    const u16 u16EnclosureId, const u16 u16SlotId);
    
/***************************************************************************
* Function Name: decod_getStringPhyDrvType
* Description: get the string of the physical drive type.
* Parameters:    
*       [in] u16Type, the type code
* Return: the string of the physical drive type.
* Remarks: none.
****************************************************************************/
const char * decod_getStringPhyDrvType(const u16 u16Type);

/***************************************************************************
* Function Name: decod_getStringPhyDrvProtocolVersion
* Description: get the string of the physical drive protocol version.
* Parameters:
*       [out] pstrVersion, the protocal version string to be returned    
*       [in] u16Major, the major protocol version
*       [in] u16Minor, the minor protocol version
* Return: none.
* Remarks: none.
****************************************************************************/
void decod_getStringPhyDrvProtocolVersion(char * pstrVersion,
    const u16 u16Major, const u16 u16Minor);

/***************************************************************************
* Function Name: decod_getStringPhyDrvModel
* Description: get the string of the physical drive model.
* Parameters:
*       [out] pstrModel, the model string to be returned    
*       [in] pu8Model, the model data from f/w
* Return: none.
* Remarks: none.
****************************************************************************/
void decod_getStringPhyDrvModel(char * pstrModel,
    const u8 * pu8Model);
    
/***************************************************************************
* Function Name: decod_getStringPhyDrvSerialNo
* Description: get the string of the physical drive serial number.
* Parameters:
*       [out] pstrSerialNo, the serial number string to be returned    
*       [in] pu8SerialNo, the serial number data from f/w
* Return: none.
* Remarks: none.
****************************************************************************/
void decod_getStringPhyDrvSerialNo(char * pstrSerialNo,
    const u8 * pu8SerialNo);

/***************************************************************************
* Function Name: decod_getStringPhyDrvFirmwareRev
* Description: get the string of the physical drive firmware revision.
* Parameters:
*       [out] pstrRev, the revision string to be returned    
*       [in] pu8Rev, the drive f/w revision data from f/w
* Return: none.
* Remarks: none.
****************************************************************************/
void decod_getStringPhyDrvFirmwareRev(char * pstrRev,
    const u8 * pu8Rev);

/***************************************************************************
* Function Name: decod_isPhyDrvUnconfigured
* Description: check whether the physical drive is unconfigured (not in a
*       disk array and nor a spare
* Parameters:
*       [in] u32Flags, the phy drv flags
* Return: TRUE/FALSE
* Remarks: none.
****************************************************************************/
boolean_t decod_isPhyDrvUnconfigured(const u32 u32Flags);
    
/*
__u32 decod_getSATADiskDriveModel( const pmic_physicalDrv_t * pData, char * pBuf, __u32 u32BufLen );
__u32 decod_getSATADiskDriveSerialNumber( const pmic_physicalDrv_t * pData, char * pBuf, __u32 u32BufLen );
__u32 decod_getSATADiskDriveFirmwareRevision( const pmic_physicalDrv_t * pData, char * pBuf, __u32 u32BufLen );
*/

/* --- disk array  ------------------------------------------------------ */

u32 decod_getDANumOfTransitionPD(u8 * pu8Buffer, u32 * NumOfPD);
u32 decod_locateDATransitionPD(u8 * pu8Buffer, u32 index, micPDInfoPage0_t **);

/* from arrayInfo */
u32 decod_locateBufferNextArrayInfo(const u8 * pu8Buffer, 
    const u32 u32Length, const u32 u32DevId, u8 ** ppInfo);
u32 decod_getBufferCountArrayIDs(const u8 * pu8Buffer, 
    const u32 u32Length, u32 * pu32Count, u32 * pu32Ids);
u32 decod_locateBufferDiskArraySettings(const u8 * pu8Buffer, 
    const u32 u32Length, const u32 u32DevId, u8 ** ppSettings);

/* from arrayCfg */
/***************************************************************************
* Function Name: decod_getBufferCountDiskArrayCfg
* Description: get the count of the disk array in the buffer.
* Parameters:    
*       [in] pu8Buffer, the data buffer that contains the disk array info
*       [in] u32Length, the length of the data buffer
*       [out] pu32Count, the count of the disk arrays to be returned.
* Return: PIERR_NO_ERROR, succeeded; otherwise, failed.
* Remarks: None.  
****************************************************************************/
u32 decod_getBufferCountDiskArrayCfg(const u8 * pu8Buffer, 
    const u32 u32Length, u32 * pu32Count);

/* TBD
   all the disk array and spare decode routines should be re-do to conform the 
   way of getting next valid by the device id */
   
/***************************************************************************
* Function Name: decod_locateBufferNextDiskArrayCfg
* Description: locate the next disk array in the buffer starting from the
*       the giving index.
* Parameters:    
*       [in] pu8Buffer, the data buffer that contains the disk array info
*       [in] u32Length, the length of the data buffer
*       [in] u32IndexStart, the start index
*       [out] ppDiskArray, the pointer to the next disk array to be returned
*       [out] pu32ArrayLength, the length of the disk array info
* Return: PIERR_NO_ERROR, succeeded; otherwise, failed.
* Remarks: none.  
****************************************************************************/
u32 decod_locateBufferNextDiskArrayCfg(const u8 * pu8Buffer, 
    const u32 u32Length, const  u32 u32IndexStart, 
    u8 ** ppDiskArray, u32 * pu32ArrayLength);

/***************************************************************************
* Function Name: decod_locateBufferNextPhyDrvInDiskArray
* Description: locate the next phy drv in the disk array buffer starting 
*       from the the giving index.
* Parameters:    
*       [in] pu8DiskArray, the data buffer that contains the disk array info
*       [in] u32Length, the length of the disk array info
*       [in] u32IndexStart, the start index
*       [out] ppPhyDrv, the pointer to the next phy drv to be returned
* Return: PIERR_NO_ERROR, succeeded; otherwise, failed.
* Remarks: none.  
****************************************************************************/
u32 decod_locateBufferNextPhyDrvInDiskArray(const u8 * pu8DiskArray, 
    const u32 u32Length, const u32 u32IndexStart, u8 ** ppPhyDrv);

/***************************************************************************
* Function Name: decod_locateBufferNextLogDrvInDiskArray
* Description: locate the next log drv in the disk array buffer starting 
*       from the the giving index.
* Parameters:    
*       [in] pu8DiskArray, the data buffer that contains the disk array info
*       [in] u32Length, the length of the disk array info
*       [in] u32IndexStart, the start index
*       [out] ppLogDrv, the pointer to the next log drv to be returned
* Return: PIERR_NO_ERROR, succeeded; otherwise, failed.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -