(Page 3 of 7 in this chapter)
4.2 Making Connections
- The Switching service makes a connection between an input terminus and an output terminus with swiMakeConnection or swiMakeFramedConnection.
- swiMakeFramedConnection is identical to swiMakeConnection except that all connections ever made on the same switch device with this function have the same constant throughput delay. swiMakeFramedConnection can be used to make a single high bandwidth connection using multiple timeslots where the data is synchronized across the timeslots.
- swiMakeConnection connects inputs to the switch block to the outputs from the switch block. For example, it can be used to connect the voice paths of an incoming digital line and an operator station so that the caller and the operator can carry on a conversation.
- The demonstration program prt2prt demonstrates how to make connections. Refer to Section 10.3, Port to Port Program: prt2prt.
- The operator station is on the local bus at streams 0 and 1. As shown in Figure 6, it is connected to the MVIP bus on MVIP streams 0 and 1. To connect the voice streams on the incoming digital line to the operator station's voice streams, connect the incoming digital line's voice streams to MVIP bus streams 0 and 1.

Figure 6. MVIP Switches Before Connections Are Made
- The following example code connects the incoming digital line's voice streams to the operator station's voice streams over the MVIP bus:
/* Connect voice paths of S-Connect operator and incoming call on the T1 */
void myConnectVoice(SWIHD t1hd, DWORD timeslot)
{
SWI_TERMINUS output, input;
/* Connect T1 local:0:timeslot to mvip:0:timeslot */
output.bus = MVIP95_MVIP_BUS;
output.stream = 0;
output.timeslot = timeslot;
input.bus = MVIP95_LOCAL_BUS;
input.stream = 0;
input.timeslot = timeslot;
swiMakeConnection(t1hd, &input, &output, 1);
/*
* Make a DUPLEX connection by also connecting
* mvip:1:timeslot to local:1:timeslot
*/
output.bus = MVIP95_LOCAL_BUS;
output.stream = 1;
output.timeslot = timeslot;
input.bus = MVIP95_MVIP_BUS;
input.stream = 1;
input.timeslot = timeslot;
swiMakeConnection(t1hd, &input, &output, 1);
}
- Figure 7 illustrates the state of the switch blocks after the connections have been made.

Figure 7. MVIP Switches After Connections Are Made
(Page 3 of 7 in this chapter)
tech_support@nmss.com
Copyright © 1997, Natural MicroSystems, Inc. All rights
reserved.