Defines, Structures, Typedefs, Functions.
More...
|
| 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...
|
| |
Defines, Structures, Typedefs, Functions.
◆ CL_DEBUG
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.
◆ CL_DEBUG_CRITICAL
| #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.
◆ ClDebugCallbackT
| 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.
- Parameters
-
| argc | Number of arguments passed with the command. |
| argv | An array of the arguments passed with the command. |
| ret | Placeholder for a return string to be allocated by the function and displayed on the CLI. |
◆ clDebugCli()
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()
◆ clDebugDeregister()
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()
◆ clDebugLibFinalize()
| 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()
◆ 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()
◆ clDebugPrint()
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()
◆ clDebugPrintDestroy()
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()
◆ clDebugPrintFinalize()
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()
◆ 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()
◆ clDebugPromptSet()
| 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
◆ clDebugRegister()
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()
◆ clDebugVersionCheck()
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()