The OSAPI status module.
More...
|
| void | status_instance_clear (t_status *status) |
| | Reset the status type. More...
|
| |
| void | status_instance_set (t_module module, t_status_type type, t_status_funcname funcname, t_error error, t_status *status) |
| | Set the status type with the current status information using an error code. More...
|
| |
| void | status_instance_setString (t_module module, t_status_type type, t_status_funcname funcname, t_status_string errorString, t_status *status) |
| | Set the status type with the current status information using an error string. More...
|
| |
| void | status_message_print (t_status status) |
| | Write a message with the status information to Standard output. More...
|
| |
| void | status_message_retrieve (t_status status, t_size size, t_char *message) |
| | Get the status information into a message string. More...
|
| |
| const char * | status_module_get (t_status status) |
| | Get the module name that corresponds to the provided status information. More...
|
| |
| const char * | status_function_get (t_status status) |
| | Get the function name that corresponds to the provided status information. More...
|
| |
| const char * | status_message_get (t_status status) |
| | Get the error message that corresponds to the provided status information. More...
|
| |
| bool | status_success_is (t_status status) |
| | Obtain the result of an operation This call is needed since the status_success macro may not be available in other programming languages. More...
|
| |
| void | osapi_trace (const char *func, const char *sep, uint64_t line, const char *fmt,...) |
| | OSAPI C Trace function - This function sends the output to standard error. More...
|
| |
| void | osapi_status_trace (const char *func, uint64_t line, t_status st) |
| | OSAPI C General Trace function - The function sends the output to standard error. More...
|
| |
The OSAPI status module.
◆ osapi_status_trace()
| void osapi_status_trace |
( |
const char * |
func, |
|
|
uint64_t |
line, |
|
|
t_status |
st |
|
) |
| |
OSAPI C General Trace function - The function sends the output to standard error.
- Parameters
-
| [in] | func | - Name of function |
| [in] | line | - Line number |
| [in] | st | - An operation status |
◆ osapi_trace()
| void osapi_trace |
( |
const char * |
func, |
|
|
const char * |
sep, |
|
|
uint64_t |
line, |
|
|
const char * |
fmt, |
|
|
|
... |
|
) |
| |
OSAPI C Trace function - This function sends the output to standard error.
- Parameters
-
| [in] | func | - Name of function |
| [in] | sep | - Separator between function and line number |
| [in] | line | - Line number |
| [in] | fmt | - printf format for the remaining arguments |
OSAPI C Trace function - This function sends the output to standard error.
- Parameters
-
| [in] | func | - Function name |
| [in] | sep | - Separator string |
| [in] | line | - Code line number |
| [in] | fmt | - Message format specifier |
◆ status_function_get()
| const char* status_function_get |
( |
t_status |
status | ) |
|
Get the function name that corresponds to the provided status information.
- Parameters
-
| [in] | status | - Status information |
- Returns
- Function name
◆ status_instance_clear()
| void status_instance_clear |
( |
t_status * |
status | ) |
|
Reset the status type.
- Parameters
-
◆ status_instance_set()
Set the status type with the current status information using an error code.
- Parameters
-
| [in] | module | - Set the status module |
| [in] | type | - Library information (OSAPI, libc, dl, etc) |
| [in] | funcname | - Name of the function for which status is being provided |
| [in] | error | - Error reported |
| [out] | status | - status type |
◆ status_instance_setString()
Set the status type with the current status information using an error string.
- Parameters
-
| [in] | module | - Set the status module |
| [in] | type | - Library information (OSAPI, libc, dl, etc) |
| [in] | funcname | - Name of the function for which status is being provided |
| [in] | errorString | - String with the error information |
| [out] | status | - status type |
◆ status_message_get()
| const char* status_message_get |
( |
t_status |
status | ) |
|
Get the error message that corresponds to the provided status information.
- Parameters
-
| [in] | status | - Status information |
- Returns
- Error string
◆ status_message_print()
| void status_message_print |
( |
t_status |
status | ) |
|
Write a message with the status information to Standard output.
- Parameters
-
| [in] | status | - Status information |
◆ status_message_retrieve()
Get the status information into a message string.
- Parameters
-
| [in] | status | - Status information |
| [in] | size | - Size of the message string |
| [out] | message | - String with the status information |
◆ status_module_get()
| const char* status_module_get |
( |
t_status |
status | ) |
|
Get the module name that corresponds to the provided status information.
- Parameters
-
| [in] | status | - Status information |
- Returns
- Module name
◆ status_success_is()
| bool status_success_is |
( |
t_status |
status | ) |
|
Obtain the result of an operation This call is needed since the status_success macro may not be available in other programming languages.
- Parameters
-
| [in] | status | - Status information |
- Returns
- True if operation was successful. False otherwise.