Previous PageTable Of ContentsHomeIndexNext Page


5. Advanced SRL Programming Models


Top Of Page5.1. Selecting Advanced SRL Programming Models

This section describes the following advanced SRL programming models:

You can use advanced programming models in applications for which the basic programming models might not apply. Select an advanced programming model according to the criteria shown in Table 2. The sections following this table describe these advanced programming models.


Table 2. Guidelines for Selecting an Advanced Programming Model

Application Requirements

Recommended Advanced Programming Model

Threading and Event Handling Considerations

Few devices

Needs to service unsolicited Dialogic events

Synchronous with SRL Callback

(Section 5.2)

Create a separate thread to execute processing for each Dialogic device, typically a voice channel.

Call sr_enbhdlr( ) to enable callback functions that service unsoicited Dialogic events.

Many devices

Multiple tasks

Needs user-defined event handlers

Asynchronous with SRL Callback

(Section 5.2)

For details about how this model dispatches events to your event handlers, see Section 4.1.4. SRL Callback Thread Behavior.

Many devices

Multiple tasks

Needs the tightest possible integration with the Windows messaging scheme

Asynchronous with Windows Callback

(Section 5.4)

Call sr_NotifyEvent( ) to enable event notification to a user-specified window.

When the window receives event notification, call sr_waitevt(0) to retrieve the Dialogic event.

Many devices

Multiple tasks

Needs the tightest possible integration with other Win32 devices

Asynchronous with Win32 Synchronization

(Section 5.5)

At application intialization:

  Use a Win32 function to create the Reset event or I/O Ccompletion Port.

  Set up the SRLWIN32INFO structure.

  Call the sr_setparm( ) function.

Use a Win32 function to wait for event notification. At notification, call the sr_waitevt( ) function to retrieve the event from the Dialogic event queue.


Previous PageTable Of ContentsTop Of PageIndexNext Page

Click here to contact Dialogic Customer Engineering

Copyright 2001, Dialogic Corporation
All rights reserved
This page generated January, 2001