Defines, Structures, Typedefs, Functions.
More...
Classes |
struct | ClDebugFuncEntryT |
| The structure contains the entry for the debug CLI information that needs the component has to provide on a per command basis. More...
|
struct | ClDebugModEntryT |
| This structure is used to register the module with the CLI library. More...
|
Macros |
#define | CL_ASSERT(expr) do { if (clDbgPauseOnCodeError&&(!(expr))) clDbgCodeError(0,("Assertion failed")); else assert((expr)); } while(0) |
| This macro is used to assert upon a critical failure.
|
#define | CL_DBG_ERR_CMD_NOT_FOUND 0x100 |
| Debug Library error.
|
#define | CL_DBG_ERR_COMMON_ERROR 0x104 |
| Loglevel set failed.
|
#define | CL_DBG_ERR_INVALID_CTX 0x102 |
| Debug command ignored.
|
#define | CL_DBG_ERR_INVALID_PARAM 0x103 |
| Invalid time out.
|
#define | CL_DBG_ERR_UNRECOGNIZED_CMD 0x101 |
| Debug unrecognized command.
|
#define | CL_DEBUG |
| The macro CL_DEBUG_PRINT is used to print messages to the user.
|
#define | CL_DEBUG_COMP_NAME_LEN 128 |
| The maximum length of the name of a component in the debug CLI.
|
#define | CL_DEBUG_COMP_PROMPT_LEN 15 |
| The maximum length of the prompt for the component to be displayed in the debug CLI.
|
#define | CL_DEBUG_CRITICAL 3 |
| These defines are aligned with the logging defined in clLogApi.h and will ultimately be deprecated as logs are converted over to the new format.
|
#define | CL_DEBUG_ERROR 4 |
| This debug level in CL_DEBUG_PRINT is used to report a non-critical error.
|
#define | CL_DEBUG_FUNC_HELP_LEN 201 |
| The maximum length of the help for a command of the component in the debug CLI.
|
#define | CL_DEBUG_FUNC_NAME_LEN 41 |
| The maximum length of a command of the component in the debug CLI.
|
#define | CL_DEBUG_INFO 7 |
| This debug level in CL_DEBUG_PRINT is used to provide information.
|
#define | CL_DEBUG_LEVEL_THRESHOLD CL_DEBUG_ERROR |
| The value of CL_DEBUG_LEVEL_THRESHOLD can be changed (either here, or by some file that includes this file) to make the debug output either more or less voluminous.
|
#define | CL_DEBUG_RC(ERROR_CODE) CL_RC(CL_CID_DEBUG, (ERROR_CODE)) |
| DEBUG Specific Error Codes.
|
#define | CL_DEBUG_TRACE 0xc |
| This debug level in CL_DEBUG_PRINT is used to add trace information.
|
#define | CL_DEBUG_WARN 5 |
| This debug level in CL_DEBUG_PRINT is used to report a warning.
|
#define | CL_FUNC_ENTER() |
| This macro is called while entering the function.
|
#define | CL_FUNC_EXIT() |
| This macro is called while exiting the function.
|
Typedefs |
typedef ClRcT(* | ClDebugCallbackT )(ClUint32T argc, ClCharT **argv, ClCharT **ret) |
| This is the signature of the callback invoked by the debug CLI in response to a command entered.
|
typedef struct ClDebugFuncEntryT | ClDebugFuncEntryT |
| The structure contains the entry for the debug CLI information that needs the component has to provide on a per command basis.
|
typedef struct ClDebugModEntryT | ClDebugModEntryT |
| This structure is used to register the module with the CLI library.
|
typedef ClPtrT | ClDebugPrintHandleT |
| The type of the handle clDebugPrint APIs.
|
Detailed Description
Defines, Structures, Typedefs, Functions.
Macro Definition Documentation
The macro CL_DEBUG_PRINT
is used to print messages to the user.
It logs other useful information about the print such as file, function number and line number from where the message originated. It is also used to log messages in kernel mode.
#define CL_DEBUG_CRITICAL 3 |
These defines are aligned with the logging defined in clLogApi.h and will ultimately be deprecated as logs are converted over to the new format.
This debug level in CL_DEBUG_PRINT
is used to report a critical error.
Typedef Documentation
typedef ClRcT(* ClDebugCallbackT)(ClUint32T argc,ClCharT **argv,ClCharT **ret) |
This is the signature of the callback invoked by the debug CLI in response to a command entered.
A function of this signature has to be registered by the component with the debug CLI for every command.
Function Documentation
Invokes the library based local debug CLI.
- Header File:
- clDebugApi.h
- Parameters
-
nprompt | String which is incorporated into the debug CLI prompt. |
- Return values
-
CL_OK | The API executed successfully. |
- Description:
- This function is used to invoke the library based local debug CLI. It will continue to execute till exited from the console. This function must be called from a separate thread.
- Library File:
- libClDebugClient.a
- See Also
- clDebugLibInitialize(), clDebugLibFinalize()
De-registers the debug CLI information from the EO.
- Header File:
- clDebugApi.h
- Parameters
-
hReg | Handle for the commandGroup which has to deregistered. This handle is returned by clDebugRegister. |
- Return values
-
CL_OK | The API executed successfully. |
CL_ERR_INVALID_HANDLE | On passing an invalid Handle. |
- Description:
- This function is used to de-register the debug CLI information from a given EO.
- Library File:
- libClDebugClient.a
- See Also
- clDebugRegister()
ClRcT clDebugLibFinalize |
( |
void |
| ) |
|
Finalizes the Debug CLI library.
- Header File:
- clDebugApi.h
- Parameters:
- None.
- Return values
-
CL_OK | The API executed successfully. And return values passed by EO APIs on an error. |
- Description:
- This function is used as the library finalization routine for debug CLI. It is the last function called in order to do the necessary cleanup.
- Library File:
- libClDebugClient.a
- See Also
- clDebugLibInitialize()
ClRcT clDebugLibInitialize |
( |
void |
| ) |
|
Initializes the Debug CLI library.
- Header File:
- clDebugApi.h
- Parameters:
- None.
- Return values
-
CL_OK | The API executed successfully. |
CL_ERR_NO_MEMORY | On failure to allocate memory. |
- Description:
- This function is used as the library initialization routine for debug CLI. It must be called before executing any other debug functions.
- Library File:
- libClDebugClient.a
- See Also
- clDebugLibFinalize()
Prints a string into the handle.
- Header File:
- clDebugApi.h
- Parameters
-
msg | Handle for printing. |
fmtStr | Format string for the variadic arguments. |
vargs | Variadic arguments. |
- Return values
-
CL_OK | The API executed successfully. |
- Description:
- This function is used to print a string with a maximum of 512 bytes into the handle at any given point in time time. This function can be invoked 'n' number of times after invoking clDebugPrintInitialize function, before calling either clDebugPrintFinalize or clDebugPrintDestroy functions.
- Library File:
- libClDebugClient.a
- See Also
- clDebugPrintInitialize(), clDebugPrintFinalize()
Frees the print handle.
- Header File:
- clDebugApi.h
- Parameters
-
msg | Handle for printing. |
buf | Buffer containing the print message. |
- Return values
-
CL_OK | The API executed successfully. It returns all error codes returned by clBufferDelete(). |
- Description:
- This function is used to free the handle without returning any message buffer.
- Library File:
- libClDebugClient.a
- See Also
- clDebugPrintInitialize()
Cleans up the print handle.
- Header File:
- clDebugApi.h
- Parameters
-
msg | Handle for printing. |
buf | Buffer containing the print message. |
- Return values
-
CL_OK | The API executed successfully. |
CL_ERR_NULL_POINTER | On passing a NULL pointer. |
CL_ERR_NO_MEMORY | On failure to allocate memory. |
- Description:
- This function is used to clean up the print handle. It returns a memory allocated buffer containing the print messages logged into the handle.
- Library File:
- libClDebugClient.a
- See Also
- clDebugPrintInitialize()
Retrieve a handle for printing.
- Header File:
- clDebugApi.h
- Parameters
-
- Return values
-
CL_OK | The API executed successfully. |
CL_ERR_NO_MEMORY | On failure to allocate memory. And other errors returned by EO APIs. |
- Description:
- This function is used to retrieve a handle for printing.
- Library File:
- libClDebugClient.a
- See Also
- clDebugPrintFinalize(), clDebugPrint()
ClRcT clDebugPromptSet |
( |
CL_IN const ClCharT * |
pCompPrompt | ) |
|
Sets the name and prompt of the component.
- Header File:
- clDebugApi.h
- Parameters
-
pCompPrompt | Prompt for the component. |
- Return values
-
CL_OK | The API executed successfully. |
CL_ERR_INVALID_PARAMETER | On passing an invalid parameter. |
CL_ERR_NULL_PARAMETER | On passing NULL as parameter. |
- Description:
- This function is used to set the prompt for the Component. If the user doesn't set any prompt, the default prompt will be displayed. The default prompt is "DEFAULT".
- Library File:
- libClDebugClient.a
- Related Function(s):
- None
Registers the component name.
- Parameters
-
funcArray | List of commands and their respective functions and help. |
funcArrayLen | Length of the function array. |
phDebugReg | This is address where handle for registration will be returned. |
- Return values
-
CL_OK | The API executed successfully. |
CL_ERR_INVALID_PARAMETER | On passing an invalid parameter. |
CL_ERR_NO_MEMORY | On failure to allocate memory. |
CL_ERR_DUPLICATE | When you register same command more than once. |
- Description:
- This function is used to register the list of all the CLI functions for the component with the EO. It is invoked before the debug server CLI can be used. The server debug CLI uses information registered by this function. If you register the same command again, DUPLICATE error will be returned.
- See Also
- clDebugDeregister()
Check the given version is supported or not.
- Header File:
- clDebugApi.h
- Parameters
-
- Return values
-
CL_OK | The API executed successfully. It returns all error codes returned by clVersionVerify(). |
- Description:
- This function is used to check the given version is compatible or not. If not, will return the compatibl version with error.
- Library File:
- libClDebugClient.a
- See Also
- clDebugLibInitialize(), clDebugLibFinalize()