Function


nuScAddClient

Syntax

void nuScAddClient(NUScClient *c, OSMesgQueue *mq, NUScMsg msgType)

Arguments

Return Value
None

Explanation
Register Scheduler client

This registers a retrace or PRE NMI client in the Scheduler. When an event occurs, the Scheduler sends a message to the message queue of the registered client.

When NE_SC_PRENMI_MSG is specified as the type of message to be registered, a PRE NMI message will be sent to the message queue specified when the client was registered (even if the PRE NMI event has already happened.

Use the nuScRemoveClient function to delete client registration.

Example

#define MESG_NUM	1
	NUScClient	client;
	OSMesgQueue	mesgQ;
	OSMesg		mesgBuf[MESG_NUM];

	/* initialization of the message queue */
	osCreateMesgQueue(&mesgQ, mesgBuf,MESG_NUM);

	/* specify the retrace event and register clients to the Scheduler */
	nuScAddClient(&client, &mesgQ , NU_SC_RETRACE_MSG);  

	/* waiting for the retrace event */
	osRecvMesg(&mesgQ, NULL, OS_MESG_BLOCK );

	/* delete the registered clients */
	nuScRemoveClient(&client );

Revision History
2/1/1999   Added text regarding PRE NMI.