|
IUF-SDK-3
Interventional Ultrasound Library
|
#include <stdarg.h>#include <memory.h>#include <string.h>#include "iuf.h"#include "library_config.h"Data Structures | |
| struct | IufError |
Macros | |
| #define | ERR_CLS_NAME "IUF" |
| #define | IUF_ERR_MAJ_HDF5_MSG "HDF5 call failed" |
| #define | IUF_ERR_MAJ_GENERAL_MSG "General Error" |
| #define | IUF_ERR_MAJ_MEMORY_MSG "Memory Error" |
| #define | IUF_ERR_MAJ_VALUE_MSG "Value Error" |
| #define | IUF_ERR_MAJ_ERROR_MSG "Error handling" |
| #define | IUF_NAME "IUF-SDK" |
| #define | IUF_VERSION IUF_VERSION_MAJOR "." IUF_VERSION_MINOR "." IUF_VERSION_PATCH |
| #define | IUF_ERR_MIN_ARG_VALUE_MSG "Value invalid for argument" |
| #define | IUF_ERR_MIN_ARG_NULL_VALUE_MSG "NULL value invalid for argument" |
| #define | IUF_ERR_MIN_ARG_FILENAME_MSG "Invalid filename argument" |
| #define | IUF_ERR_MIN_ALLOC_MSG "Memory allocation failed" |
| #define | IUF_ERR_MIN_MEMCOPY_MSG "Memory copy failed" |
| #define | IUF_ERR_MIN_FORMAT_MSG "Error message formatting failed" |
| #define | IUF_ERR_MIN_ARG_DUPLICATE_KEY_MSG "Duplicate key" |
| #define | IUF_ERR_MIN_ARG_INVALID_KEY_MSG "Invalid key, lookup failed" |
| #define | IUF_ERR_MIN_HDF5_MSG "Turn on HDF5 error log to get error details: iufHDF5ErrorLog(IUF_TRUE)" |
| #define | IUF_ERR_MIN_ASSERT_FAILED_MSG "Assertion failed" |
| #define | IUE_INVALID (iue_t) NULL |
Typedefs | |
| typedef IufError * | iue_t |
Functions | |
| int | iufErrorPush (const char *pFileName, const char *pFunctionName, int lineNumber, hid_t maj, hid_t min, char *msg) |
| Pushes an Error context onto the IUF error stack. More... | |
| int | iufErrorFormatAndPush (const char *pFileName, const char *pFunctionName, int lineNumber, hid_t maj, hid_t min, char *msgFormat,...) |
| Format and Push an Error context onto the IUF error stack. More... | |
| int | iufErrorGetCount (void) |
| Get the number of errors that occurred so far. More... | |
| int | build_error_string (unsigned int n, const struct H5E_error2_t *err_desc, void *cb_data) |
| int | iufErrorPrint () |
| Prints the Error stack. More... | |
| int | iufErrorLogClear (void) |
| Removes all messages from the error stack. More... | |
| char * | iufErrorString () |
| Create a string representation of the current Error stack. More... | |
| int | iufErrorLog (IUF_BOOL enable) |
| Enable or disable IUF library error logging. More... | |
| int | iufHDF5ErrorLog (IUF_BOOL enable) |
| Enable or disable HDF5 library error logging. More... | |
| IUF_BOOL | iufErrorAutoReportGet (void) |
| Error messages wil printed when encountered by the library calls. More... | |
| int | iufErrorAutoReportSet (IUF_BOOL enable) |
| Error messages wil printed when encountered by the library calls. More... | |
| int | iufErrorSetStream (FILE *stream) |
| Error messages wil be printed to this FILE stream (i.e. stdout would sent the errors to console output). More... | |
| int | iufErrorSetStreamToFile (const char *pFileName) |
| Error messages wil be printed to the file with name pFileName. More... | |
| int | iufErrorCloseFileStream () |
| Closes the filestream opened with iufErrorSetStreamToFile() and resets the stream to stderr. More... | |
Variables | |
| hid_t | IUF_ERR_MAJ_GENERAL |
| Major error handling class for general errors. More... | |
| hid_t | IUF_ERR_MAJ_MEMORY |
| Major error handling class for memory errors. More... | |
| hid_t | IUF_ERR_MAJ_VALUE |
| Major error handling class for value related errors. More... | |
| hid_t | IUF_ERR_MAJ_ERROR |
| Major error handling class for errors. More... | |
| hid_t | IUF_ERR_MAJ_HDF5 |
| Major error handling class for hdf5 io errors. More... | |
| hid_t | IUF_ERR_MIN_ARG_FILENAME |
| Minor error handling class for filename errors. More... | |
| hid_t | IUF_ERR_MIN_ALLOC |
| Minor error handling class for memory allocation value errors. More... | |
| hid_t | IUF_ERR_MIN_MEMCOPY |
| Minor error handling class for memory errors. More... | |
| hid_t | IUF_ERR_MIN_FORMAT |
| Minor error handling class for formatting errors. More... | |
| hid_t | IUF_ERR_MIN_ARG_NULL_VALUE |
| Minor error handling class for NULL values. More... | |
| hid_t | IUF_ERR_MIN_ARG_DUPLICATE_KEY |
| Minor error handling class for duplicate key errors in a dictionary. More... | |
| hid_t | IUF_ERR_MIN_ARG_INVALID_KEY |
| Minor error handling class for invalid key errors in a dictionary. More... | |
| hid_t | IUF_ERR_MIN_HDF5 |
| Minor error handling class for invalid hdf5 file io errors. More... | |
| hid_t | IUF_ERR_MIN_ARG_VALUE |
| Minor error handling class for argument value errors. More... | |
| hid_t | IUF_ERR_MIN_ASSERT_FAILED |
| Minor error handling class for assertion errors. More... | |
| struct IufError |
| Data Fields | ||
|---|---|---|
| IUF_BOOL | autoReport | |
| void * | client_data | |
| IUF_BOOL | enable | |
| char | error_buffer[IUF_MAX_STRING_LENGTH] | |
| FILE * | errorStream | |
| H5E_auto2_t | func | |
| hid_t | iufErrorClass | |
| hid_t | iufErrorStack | |
| #define ERR_CLS_NAME "IUF" |
| #define IUE_INVALID (iue_t) NULL |
| #define IUF_ERR_MAJ_ERROR_MSG "Error handling" |
| #define IUF_ERR_MAJ_GENERAL_MSG "General Error" |
| #define IUF_ERR_MAJ_HDF5_MSG "HDF5 call failed" |
| #define IUF_ERR_MAJ_MEMORY_MSG "Memory Error" |
| #define IUF_ERR_MAJ_VALUE_MSG "Value Error" |
| #define IUF_ERR_MIN_ALLOC_MSG "Memory allocation failed" |
| #define IUF_ERR_MIN_ARG_DUPLICATE_KEY_MSG "Duplicate key" |
| #define IUF_ERR_MIN_ARG_FILENAME_MSG "Invalid filename argument" |
| #define IUF_ERR_MIN_ARG_INVALID_KEY_MSG "Invalid key, lookup failed" |
| #define IUF_ERR_MIN_ARG_NULL_VALUE_MSG "NULL value invalid for argument" |
| #define IUF_ERR_MIN_ARG_VALUE_MSG "Value invalid for argument" |
| #define IUF_ERR_MIN_ASSERT_FAILED_MSG "Assertion failed" |
| #define IUF_ERR_MIN_FORMAT_MSG "Error message formatting failed" |
| #define IUF_ERR_MIN_HDF5_MSG "Turn on HDF5 error log to get error details: iufHDF5ErrorLog(IUF_TRUE)" |
| #define IUF_ERR_MIN_MEMCOPY_MSG "Memory copy failed" |
| #define IUF_NAME "IUF-SDK" |
| #define IUF_VERSION IUF_VERSION_MAJOR "." IUF_VERSION_MINOR "." IUF_VERSION_PATCH |
| int build_error_string | ( | unsigned int | n, |
| const struct H5E_error2_t * | err_desc, | ||
| void * | cb_data | ||
| ) |
| IUF_BOOL iufErrorAutoReportGet | ( | void | ) |
| int iufErrorAutoReportSet | ( | IUF_BOOL | enable | ) |
Error messages wil printed when encountered by the library calls.
| enable | IUF_TRUE enables / IUF_FALSE disables automatic error logging |
| int iufErrorCloseFileStream | ( | ) |
Closes the filestream opened with iufErrorSetStreamToFile() and resets the stream to stderr.
| int iufErrorFormatAndPush | ( | const char * | pFileName, |
| const char * | pFunctionName, | ||
| int | lineNumber, | ||
| hid_t | maj, | ||
| hid_t | min, | ||
| char * | msgFormat, | ||
| ... | |||
| ) |
Format and Push an Error context onto the IUF error stack.
| pFileName | The source file of the error |
| pFunctionName | The function that caused the error |
| lineNumber | The line number in the source file of the error |
| maj | The major error class |
| min | The minor error class |
| msgFormat | The error message format (like sprintf) |
| int iufErrorGetCount | ( | void | ) |
Get the number of errors that occurred so far.
| int iufErrorLog | ( | IUF_BOOL | enable | ) |
Enable or disable IUF library error logging.
| enable | IUF_TRUE enables / IUF_FALSE disables error logging |
| int iufErrorLogClear | ( | void | ) |
Removes all messages from the error stack.
| int iufErrorPrint | ( | ) |
Prints the Error stack.
| int iufErrorPush | ( | const char * | pFileName, |
| const char * | pFunctionName, | ||
| int | lineNumber, | ||
| hid_t | maj, | ||
| hid_t | min, | ||
| char * | msg | ||
| ) |
Pushes an Error context onto the IUF error stack.
| pFileName | The source file of the error |
| pFunctionName | The function that caused the error |
| lineNumber | The line number in the source file of the error |
| maj | The major error class |
| min | The minor error class |
| msg | The error message |
| int iufErrorSetStream | ( | FILE * | stream | ) |
Error messages wil be printed to this FILE stream (i.e. stdout would sent the errors to console output).
| stream | Valid FILE stream like from fopen or constants like stderr/stdout |
| int iufErrorSetStreamToFile | ( | const char * | pFileName | ) |
Error messages wil be printed to the file with name pFileName.
| char* iufErrorString | ( | ) |
Create a string representation of the current Error stack.
| int iufHDF5ErrorLog | ( | IUF_BOOL | enable | ) |
Enable or disable HDF5 library error logging.
| enable | IUF_TRUE enables / IUF_FALSE disables error logging |
| hid_t IUF_ERR_MAJ_ERROR |
Major error handling class for errors.
| hid_t IUF_ERR_MAJ_GENERAL |
Major error handling class for general errors.
| hid_t IUF_ERR_MAJ_HDF5 |
Major error handling class for hdf5 io errors.
| hid_t IUF_ERR_MAJ_MEMORY |
Major error handling class for memory errors.
| hid_t IUF_ERR_MAJ_VALUE |
Major error handling class for value related errors.
| hid_t IUF_ERR_MIN_ALLOC |
Minor error handling class for memory allocation value errors.
| hid_t IUF_ERR_MIN_ARG_DUPLICATE_KEY |
Minor error handling class for duplicate key errors in a dictionary.
| hid_t IUF_ERR_MIN_ARG_FILENAME |
Minor error handling class for filename errors.
| hid_t IUF_ERR_MIN_ARG_INVALID_KEY |
Minor error handling class for invalid key errors in a dictionary.
| hid_t IUF_ERR_MIN_ARG_NULL_VALUE |
Minor error handling class for NULL values.
| hid_t IUF_ERR_MIN_ARG_VALUE |
Minor error handling class for argument value errors.
| hid_t IUF_ERR_MIN_ASSERT_FAILED |
Minor error handling class for assertion errors.
| hid_t IUF_ERR_MIN_FORMAT |
Minor error handling class for formatting errors.
| hid_t IUF_ERR_MIN_HDF5 |
Minor error handling class for invalid hdf5 file io errors.
| hid_t IUF_ERR_MIN_MEMCOPY |
Minor error handling class for memory errors.