diff options
Diffstat (limited to 'src/include/usr/example')
-rw-r--r-- | src/include/usr/example/example.H | 9 | ||||
-rw-r--r-- | src/include/usr/example/examplerc.H | 33 |
2 files changed, 42 insertions, 0 deletions
diff --git a/src/include/usr/example/example.H b/src/include/usr/example/example.H index 1444893b2..b22c38da2 100644 --- a/src/include/usr/example/example.H +++ b/src/include/usr/example/example.H @@ -15,4 +15,13 @@ */ uint64_t example1_function(); +/** + * @brief Example of creating an error log function + * + * @return void + * + */ +void example2_create_errorlog_function(); + + #endif diff --git a/src/include/usr/example/examplerc.H b/src/include/usr/example/examplerc.H new file mode 100644 index 000000000..9e65d3515 --- /dev/null +++ b/src/include/usr/example/examplerc.H @@ -0,0 +1,33 @@ +// This file is an example how you create a reason code to pass in an +// error log creation + +#ifndef __EXAMPLE_RC_H +#define __EXAMPLE_RC_H + +#include <hbotcompid.H> + +// The definitions in this file is an example that shows how to define +// reason codes. Each Host Boot component should have a service code +// file (<component>servicecodes.H) that defines its module IDs and +// unique reason codes. +// See errlservicecodes.H for example of this file for ERRL component. + +// Below is an example of defining reason codes +enum myModuleId +{ + MY_MODULE_ID_1 = 0x00, + //........ + MY_LAST_MODULE_ID = 0xFF +}; + +// This enum definition should be in an .H file in your component area. +// MY_COMPONENT_ID is your component name defined in hbotcompid.H file +// included above. +enum myReasonCode +{ + MY_REASON_CODE_1 = MY_COMP_ID | 0x01, + //........ + ERRL_LAST_REASON_CODE = MY_COMP_ID | 0xFF +}; + +#endif |