OSAPI  0.29
Open System API
STATUS

The OSAPI status module. More...

Collaboration diagram for STATUS:

Typedefs

typedef int t_status_type
 Library identifier type (OSAPI, libc, etc.)
 
typedef struct osapi_status_S t_status
 The status type.
 

Functions

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...
 

Variables

const typedef char * t_status_string
 Error string type.
 
const typedef char * t_status_funcname
 Function name type.
 

Detailed Description

The OSAPI status module.


Function Documentation

◆ 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
Here is the call graph for this function:

◆ 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
Here is the caller graph for this function:

◆ 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
Here is the call graph for this function:

◆ status_instance_clear()

void status_instance_clear ( t_status status)

Reset the status type.

Parameters
[out]status- status type
Here is the caller graph for this function:

◆ status_instance_set()

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.

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()

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.

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
Here is the call graph for this function:
Here is the caller graph for this function:

◆ 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
Here is the call graph for this function:

◆ status_message_retrieve()

void status_message_retrieve ( t_status  status,
t_size  size,
t_char message 
)

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
Here is the call graph for this function:

◆ 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
Here is the call graph for this function:

◆ 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.