Using the µVision Socket Interface: Command Output Functions

| Using the µVision Socket Interface Application Note 198 Control and monitor µVision via the built-in TCP/IP interface

- Main Page
- Usage and Description
- Reference

All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Functions
Command Output Functions
Client Functions

## Functions
_UVSC_FUNC_ UVSC_STATUS | UVSC_GetCmdOutputSize (int iConnHandle, int *pCmdOutputSize)
_UVSC_FUNC_ UVSC_STATUS | UVSC_GetCmdOutput (int iConnHandle, char *pCmdOutput, int cmdOutputLen)

## Description

## Function Documentation

_UVSC_FUNC_ UVSC_STATUS UVSC_GetCmdOutput | ( | int | iConnHandle,
|  | char * | pCmdOutput,
|  | int | cmdOutputLen
| ) |  |

Get the latest command output text (result of UVSC_DBG_EXEC_CMD)

Parameters

  iConnHandle | Handle for the connection, as returned by UVSC_OpenConnection
  pCmdOutput | Pointer to a buffer to contain the command output text
  cmdOutputLen | Size of the pCmdOutput buffer (bytes)

Returns
  UVSC_STATUS_SUCCESS on success, or an error code

Precondition
  UVSC_OpenConnection must have been called successfully
  A command must have been performed (UVSC_DBG_EXEC_CMD), otherwise no data will be returned
  UVSC_GetCmdOutputSize must have been called successfully

Use this function to get the latest command output text. First call UVSC_GetCmdOutputSize so that a correctly sized buffer can be passed to this function.

_UVSC_FUNC_ UVSC_STATUS UVSC_GetCmdOutputSize | ( | int | iConnHandle,
|  | int * | pCmdOutputSize
| ) |  |

Get the size (bytes) of the latest command output text (result of UVSC_DBG_EXEC_CMD)

Parameters

  iConnHandle | Handle for the connection, as returned by UVSC_OpenConnection
  pCmdOutputSize | Pointer to a variable to contain the command output text size (bytes)

Returns
  UVSC_STATUS_SUCCESS on success, or an error code

Precondition
  UVSC_OpenConnection must have been called successfully

Use this function to get the size (bytes) of the latest command output text that will be returned by the UVSC_GetCmdOutput function.