[SWDEV-522623] Add afid functionality to API and CLI (#330)
Change-Id: I015bde926491d54e09da8f39b05650515711e09f [SWDEV-522623] Add afid functionality to API and CLI Change-Id: I015bde926491d54e09da8f39b05650515711e09f Signed-off-by: Oosman Saeed <oossaeed@amd.com> Co-authored-by: Oosman Saeed <oossaeed@amd.com>
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
#ifndef ERROR_MAP_H
|
||||
#define ERROR_MAP_H
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
/**
|
||||
* @brief Structure representing an error mapping entry
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
uint32_t id;
|
||||
const char *error_category;
|
||||
const char *error_type;
|
||||
const char *method;
|
||||
const char *error_severity;
|
||||
} error_map_entry_t;
|
||||
|
||||
/**
|
||||
* @brief Get error ID based on category, type and severity
|
||||
* @param[in] error_category Error category string
|
||||
* @param[in] error_type Error type string
|
||||
* @param[in] error_severity Error severity string
|
||||
* @return Error ID if found, -1 if not found
|
||||
*/
|
||||
int get_error_id(const char *error_category, const char *error_type, const char *error_severity);
|
||||
|
||||
#endif /* ERROR_MAP_H */
|
||||
Reference in New Issue
Block a user