PREV TOC HOME INDEX NEXT


4.7 Event Handlers

An event handler is a user-defined function called by the SRL to handle a specific event that occurs on a specified device.

This subsection was not listed in the mapping spreadsheet, so it is unclear whether it should really map to this location rather than the Event Handling module.Typically, in a Windows environment, processing events within a thread or using a separate thread to process events tends to be more efficient than using event handlers. However, if event handlers are used, such as when an application is being ported from Linux, then you must use the asynchronous with SRL callback model.

The following guidelines apply to using event handlers:

By default, when the sr_enbhdlr( ) function is first called, a thread internal to the SRL is created to service the application-enabled event handlers. This SRL handler thread exists as long as one handler is still enabled. The creation of this internal SRL event handler thread is controlled by the SR_MODELTYPE value of the SRL sr_setparm( ) function. The SRL handler thread should be:

See the Standard Runtime Library (SRL) Programming Guide for your operating system for the hierarchy (priority) order in which event handlers are called.


PREV TOC HOME INDEX NEXT

Click here to contact Telecom Support Resources

Copyright 2002, Intel Corporation
All rights reserved
This page generated November, 2002