Table of Contents Index NMS Glossary Previous Page Next Page (Page 15 of 17 in this chapter) Version


ppxSetTalker

Description

Sets a talker for a connection.

Prototype

DWORD ppxSetTalker (PPXHD ppxhd,
PPX_MVIP_ADDR *talker )

ppxhd Handle returned by ppxCreateConnection or by ppxOpenConnection.

talker Pointer to a PPX_MVIP_ADDR structure. The structure is defined as follows:


typedef struct
{
 DWORD switch_number;
DWORD bus;
DWORD stream; DWORD timeslot; } PPX_MVIP_ADDR
See the Details section for a description of these fields.

Return Values

Events

Details

This function sets the talker for a connection. If the connection has listeners attached, a switch connection is made to connect the listeners to the talker. If the talker and listeners are on different boards, telephony bus timeslots are allocated to make the connection.

If there was a talker already attached to the connection, the original talker is disconnected before the new talker is connected. Any unused timeslots are freed.

Specifying talker = NULL removes any previous talker to the connection. All timeslots are freed and the listeners receive the default pattern.

The PPX_MVIP_ADDR structure contains the following fields:
Field

Description

switch_number

Switch number of the board as defined in ppx.cfg.

bus

Acceptable values are:
MVIP95_MVIP_BUS
MVIP95_LOCAL_BUS

stream

The stream number of the talker.

timeslot

The timeslot of the talker.

See Also

ppxAddListeners

Example

void WhileTheyWait( MYCONTEXT *cx ) 
{
    DWORD e;
    char  ppxname [20];

    DemoStartProtocol( cx->hd, cx->protocol, NULL, NULL );  
    
    /* Allocate a connection */
    sprintf( ppxname, "ppxdemo%01d", cx->id );
    e = ppxCreateConnection( cx->hd, ppxname, &ppx_parms, 
                                   &(ppxhd[cx->id]) );
    if (e != SUCCESS)
    {
        printf("Unable to create a connection ; returns: %d\n",e);
        exit(-1);
    }
    
    /*
     * Set this port as the talker on this "Please hold...will try
     * that extension now" connection
     */    
    talkers[cx->id].switch_number = cx->swi;
    talkers[cx->id].bus = MVIP95_LOCAL_BUS;
    talkers[cx->id].stream = dsp_stream;
    talkers[cx->id].timeslot = cx->time_slot; 
                
    e = ppxSetTalker( ppxhd[cx->id], &talkers[cx->id] );         
    if( e != SUCCESS )
    {
        printf("Could not set talker\n");
        exit(-1);
    }


Table of Contents Index NMS Glossary Previous Page Next Page (Page 15 of 17 in this chapter) Version


Want to send us feedback on our documentation? Email: Tech_Pubs@nmss.com
Copyright © 2001, NMS Communications Corporation. All rights reserved.