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


*c              pointer to the client structure 
*mq             pointer to the Message Queue 
msgType         type of message to be registered (if both, use "OR") 
                NU_SC_RETRACE_MSG =  Retrace 
                NU_SC_PRENMI_MSG  =  PRENMI

Return Value



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.


#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/99 Added text regarding PRE NMI.