Using the µVision Socket Interface  Application Note 198
Control and monitor µVision via the built-in TCP/IP interface
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
General Functions

Functions

_UVSC_FUNC_ UVSC_STATUS UVSC_GEN_SET_OPTIONS (int iConnHandle, UVSOCK_OPTIONS *pOptions)
 
_UVSC_FUNC_ UVSC_STATUS UVSC_GEN_UVSOCK_VERSION (int iConnHandle, UINT *pMajor, UINT *pMinor)
 
_UVSC_FUNC_ UVSC_STATUS UVSC_GEN_EXT_VERSION (int iConnHandle, EXTVERS *pVersions, UINT *pVersionsLen)
 
_UVSC_FUNC_ UVSC_STATUS UVSC_GEN_HIDE (int iConnHandle)
 
_UVSC_FUNC_ UVSC_STATUS UVSC_GEN_SHOW (int iConnHandle)
 
_UVSC_FUNC_ UVSC_STATUS UVSC_GEN_MAXIMIZE (int iConnHandle)
 
_UVSC_FUNC_ UVSC_STATUS UVSC_GEN_MINIMIZE (int iConnHandle)
 
_UVSC_FUNC_ UVSC_STATUS UVSC_GEN_RESTORE (int iConnHandle)
 
_UVSC_FUNC_ UVSC_STATUS UVSC_GEN_UI_LOCK (int iConnHandle)
 
_UVSC_FUNC_ UVSC_STATUS UVSC_GEN_UI_UNLOCK (int iConnHandle)
 
_UVSC_FUNC_ UVSC_STATUS UVSC_GEN_CHECK_LICENSE (int iConnHandle, UVLICINFO *pLicInfo)
 

Description

Function Documentation

_UVSC_FUNC_ UVSC_STATUS UVSC_GEN_CHECK_LICENSE ( int  iConnHandle,
UVLICINFO pLicInfo 
)

Get uVision license status

Parameters
iConnHandleHandle for the connection, as returned by UVSC_OpenConnection
pLicInfoPointer to a structure to contain the uVision license information
Returns
UVSC_STATUS_SUCCESS on success, or an error code
Precondition
UVSC_OpenConnection must have been called successfully
A valid project is loaded, and uVision is not building, downloading, or debugging

Use this function to get the uVision license status.

_UVSC_FUNC_ UVSC_STATUS UVSC_GEN_EXT_VERSION ( int  iConnHandle,
EXTVERS pVersions,
UINT *  pVersionsLen 
)

Get extended uVision versions

Parameters
iConnHandleHandle for the connection, as returned by UVSC_OpenConnection
pVersionsPointer to a structure to contain the extended version information. This is a variable length structure, and must be large enough to contain the returned data, otherwise an error code will be returned from the function
pVersionsLenPointer to a variable containing the size of the pVersions data (bytes). This variable will be updated with the actual length of pVersions returned.
Returns
UVSC_STATUS_SUCCESS on success, or an error code
Precondition
UVSC_OpenConnection must have been called successfully

Use this function to get uVision version information as strings.

_UVSC_FUNC_ UVSC_STATUS UVSC_GEN_HIDE ( int  iConnHandle)

Hide the uVision window

Parameters
iConnHandleHandle for the connection, as returned by UVSC_OpenConnection
Returns
UVSC_STATUS_SUCCESS on success, or an error code
Precondition
UVSC_OpenConnection must have been called successfully

Use this function to completely hide the uVision window. uVision continues to run as normal, but the uVision window is no longer visible.

_UVSC_FUNC_ UVSC_STATUS UVSC_GEN_MAXIMIZE ( int  iConnHandle)

Maximize the uVision window

Parameters
iConnHandleHandle for the connection, as returned by UVSC_OpenConnection
Returns
UVSC_STATUS_SUCCESS on success, or an error code
Precondition
UVSC_OpenConnection must have been called successfully

Use this function to maximize the uVision window. This command performs the same operation as clicking the window [MAXIMIZE] button. If the uVision window is hidden it will be shown.

_UVSC_FUNC_ UVSC_STATUS UVSC_GEN_MINIMIZE ( int  iConnHandle)

Minimize the uVision window

Parameters
iConnHandleHandle for the connection, as returned by UVSC_OpenConnection
Returns
UVSC_STATUS_SUCCESS on success, or an error code
Precondition
UVSC_OpenConnection must have been called successfully

Use this function to minimize the uVision window. This command performs the same operation as clicking the window [_] button. If the uVision window is hidden it will be shown.

_UVSC_FUNC_ UVSC_STATUS UVSC_GEN_RESTORE ( int  iConnHandle)

Restore the uVision window

Parameters
iConnHandleHandle for the connection, as returned by UVSC_OpenConnection
Returns
UVSC_STATUS_SUCCESS on success, or an error code
Precondition
UVSC_OpenConnection must have been called successfully

Use this function to restore the uVision window. This command performs the same operation as clicking the window [RESTORE] button. If the uVision window is hidden it will be shown.

_UVSC_FUNC_ UVSC_STATUS UVSC_GEN_SET_OPTIONS ( int  iConnHandle,
UVSOCK_OPTIONS pOptions 
)

Set UVSOCK options

Parameters
iConnHandleHandle for the connection, as returned by UVSC_OpenConnection
pOptionspointer UVSOCK_OPTIONS contaning option flags
Returns
UVSC_STATUS_SUCCESS on success, or an error code
Precondition
UVSC_OpenConnection must have been called successfully
The call can be issued only once after UVSC_OpenConnection

Use this function to set UVSOCK options.

_UVSC_FUNC_ UVSC_STATUS UVSC_GEN_SHOW ( int  iConnHandle)

Show the uVision window

Parameters
iConnHandleHandle for the connection, as returned by UVSC_OpenConnection
Returns
UVSC_STATUS_SUCCESS on success, or an error code
Precondition
UVSC_OpenConnection must have been called successfully

Use this function to show the uVision window. The uVision window will be brought to the front of the windows Z-order.

_UVSC_FUNC_ UVSC_STATUS UVSC_GEN_UI_LOCK ( int  iConnHandle)

Lock the uVision window

Parameters
iConnHandleHandle for the connection, as returned by UVSC_OpenConnection
Returns
UVSC_STATUS_SUCCESS on success, or an error code
Precondition
UVSC_OpenConnection must have been called successfully

Use this function to completely lock the uVision window. uVision continues to run as normal, but the uVision window cannot be interacted with. All message boxes that would normally be shown to the user are also supressed. In the case where a message box has multiple options, the default option will be automatically selected.

UI locking is performed automatically for all UVSC functions where it is required.

NOTE: UI locking is reference counted within uVision, therefore calls to UVSC_GEN_UI_LOCK and UVSC_GEN_UI_UNLOCK must be balanced.

_UVSC_FUNC_ UVSC_STATUS UVSC_GEN_UI_UNLOCK ( int  iConnHandle)

Unlock the uVision window

Parameters
iConnHandleHandle for the connection, as returned by UVSC_OpenConnection
Returns
UVSC_STATUS_SUCCESS on success, or an error code
Precondition
UVSC_OpenConnection must have been called successfully

Use this function to unlock the uVision window after it has been locked with UVSC_GEN_UI_LOCK.

NOTE: UI locking is reference counted within uVision, therefore calls to UVSC_GEN_UI_LOCK and UVSC_GEN_UI_UNLOCK must be balanced.

_UVSC_FUNC_ UVSC_STATUS UVSC_GEN_UVSOCK_VERSION ( int  iConnHandle,
UINT *  pMajor,
UINT *  pMinor 
)

Get the uVision UVSOCK interface version

Parameters
iConnHandleHandle for the connection, as returned by UVSC_OpenConnection
pMajorPointer to a variable to contain the major version number
pMinorPointer to a variable to contain the minor version number
Returns
UVSC_STATUS_SUCCESS on success, or an error code
Precondition
UVSC_OpenConnection must have been called successfully

Use this function to get the uVision UVSOCK interface version. The version number is of the format:

 UVSOCK Version = V*pMajor.*pMinor