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
Queue Functions

Functions

_UVSC_FUNC_ UVSC_STATUS UVSC_ReadBuildQ (int iConnHandle, char *pOutputLine, int timeout)
 
_UVSC_FUNC_ UVSC_STATUS UVSC_ReadPBarQ (int iConnHandle, UVSC_PBAR *pBar, char *pStr, int timeout)
 
_UVSC_FUNC_ UVSC_STATUS UVSC_ReadAsyncQ (int iConnHandle, int iQueueNo, UVSOCK_CMD *buf, int timeout)
 
_UVSC_FUNC_ UVSC_STATUS UVSC_FlushAsyncQ (int iConnHandle, int iQueueNo)
 

Description

Function Documentation

_UVSC_FUNC_ UVSC_STATUS UVSC_FlushAsyncQ ( int  iConnHandle,
int  iQueueNo 
)

Flush the UVSOCK asynchronous message queue

Parameters
iConnHandleHandle for the connection, as returned by UVSC_OpenConnection
iQueueNoThe asynchronous queue number to flush
Returns
UVSC_STATUS_SUCCESS on success, or an error code
Precondition
UVSC_OpenConnection must have been called successfully
NULL was passed as the callback parameter to UVSC_OpenConnection.

Use this function to flush the UVSOCK asynchronous message queue.

_UVSC_FUNC_ UVSC_STATUS UVSC_ReadAsyncQ ( int  iConnHandle,
int  iQueueNo,
UVSOCK_CMD buf,
int  timeout 
)

Read a message from the UVSOCK asynchronous message queue

Parameters
iConnHandleHandle for the connection, as returned by UVSC_OpenConnection
iQueueNoThe asynchronous queue number to read
bufPointer to a structure to hold the asynchronous UVSOCK message data
timeoutTime to wait for a message on the queue before giving up
Returns
UVSC_STATUS_SUCCESS on success, or an error code
Precondition
UVSC_OpenConnection must have been called successfully
NULL was passed as the callback parameter to UVSC_OpenConnection.

Use this function to read a message from the UVSOCK asynchronous message queue. Asynchronous UVSOCK messages received will be available via this queue, if (and only if) NULL is passed as the callback parameter to UVSC_OpenConnection.

If the queues are available, there are 3 queues (0, 1 and 2). This is to provide access to the aysnchronous messages for up to 3 tasks within the client application. Queues 1 and 2 will contain all UVSOCK asynchronous messages. Queue 0 ignores UV_DBG_WAKE and UV_DBG_SLEEP messages.

_UVSC_FUNC_ UVSC_STATUS UVSC_ReadBuildQ ( int  iConnHandle,
char *  pOutputLine,
int  timeout 
)

Read build messages from the build queue

Parameters
iConnHandleHandle for the connection, as returned by UVSC_OpenConnection
pOutputLinePointer to a buffer to hold the build output line. The buffer should be at least UVSC_MAX_API_STR_SIZE bytes
timeoutTime to wait for a message on the queue before giving up
Returns
UVSC_STATUS_SUCCESS on success, or an error code
Precondition
UVSC_OpenConnection must have been called successfully

Use this function to read build messages from the build queue. Build messages are build output lines that contain 'compiling' or 'assembling' or 'linking' or build conclusion information. The messages on this queue can be used by the client to indicate build progress to the user, without the obtrusive warning and error messages. This is especially useful when uVision is being operated in the background. This queue is flushed automatically at the start of a build.

_UVSC_FUNC_ UVSC_STATUS UVSC_ReadPBarQ ( int  iConnHandle,
UVSC_PBAR pBar,
char *  pStr,
int  timeout 
)

Read progress bar messages from the progress bar queue

Parameters
iConnHandleHandle for the connection, as returned by UVSC_OpenConnection
pBarPointer to an enumeration variable to hold the progress bar info type
pStrPointer to a buffer to hold the progress bar information. The buffer should be at least UVSC_MAX_API_STR_SIZE bytes
timeoutTime to wait for a message on the queue before giving up
Returns
UVSC_STATUS_SUCCESS on success, or an error code
Precondition
UVSC_OpenConnection must have been called successfully

Use this function to read progress bar messages from the progress bar queue. Progress bar messages reflect the progress bar situated at the bottom left corner of the uVision window. They can be used by the client to indicate operation progress. This is especially useful when uVision is being operated in the background. This function could be combined with the UVSC_PRJ_ACTIVE_FILES and UVSC_GetBuildOutput functions to provide the user with a build progress bar. This queue is flushed automatically automatically at the start of a build.