1 #ifndef CPER_PARSE_H 2 #define CPER_PARSE_H 3 #include "json.h" 4 5 #define CPER_HEADER_VALID_BITFIELD_NAMES (const char*[]) {"platformIDValid", "timestampValid", "partitionIDValid"} 6 #define CPER_SECTION_DESCRIPTOR_VALID_BITFIELD_NAMES (const char*[]) {"fruIDValid", "fruStringValid"} 7 #define CPER_SECTION_DESCRIPTOR_FLAGS_BITFIELD_NAMES (const char*[]) \ 8 {"primary", "containmentWarning", "reset", "errorThresholdExceeded", "resourceNotAccessible", "latentError", \ 9 "propagated", "overflow"} 10 #define CPER_HEADER_FLAG_TYPES_KEYS (int []){1, 2, 3} 11 #define CPER_HEADER_FLAG_TYPES_VALUES (const char*[]){"HW_ERROR_FLAGS_RECOVERED", "HW_ERROR_FLAGS_PREVERR", "HW_ERROR_FLAGS_SIMULATED"} 12 13 json_object* cper_to_ir(FILE* cper_file); 14 void ir_to_cper(json_object* ir, FILE* out); 15 16 #endif