Table of Contents Index NMS Glossary Previous Page Next Page (Page 24 of 29 in this chapter) Version


swiMakeFramedConnection

Description

Connects inputs to outputs with identical throughput delay for all connections.

Prototype

DWORD swiMakeFramedConnection ( SWIHD swihd,
SWI_TERMINUS input[],
SWI_TERMINUS output[],
unsigned count)

swihd Handle returned by swiOpenSwitch.

input Array of terminus structures for the input side of the connection. The terminus structure is:


typedef struct
{
DWORD bus;
DWORD stream;
DWORD timeslot;
} SWI_TERMINUS;
See swiMakeConnection for a description of these fields.

output Array of terminus structures for the output side of the connection.

count Number of elements in the input array and in the output array.

Return Values

Events

Details

This function is specific to MVIP-95. It makes connections between the corresponding elements of the output terminus array and the input terminus array.

The type of connection is identical to swiMakeConnection except that all connections ever made on the same switch device with this function have the same constant throughput delay.

Use swiMakeFramedConnection to make a single high bandwidth connection using multiple timeslots where the data must be synchronized across the timeslots. This function ensures there is identical throughput delay across all timeslots.

Note: Under Solaris, the upper limit for the number of terminuses that can be batched in one call is 32.

This function returns CTAERR_FUNCTION_NOT_AVAIL if framed connections are not supported.

Note: It is important to disable an output when the connection or pattern is no longer required. Leftover connections or patterns can cause unpredictable behavior in the application.

Refer to Section 5.2, Making Connections for more information.

If CTAERR_DRIVER_ERROR is returned, call swiGetLastError to retrieve the MVIP device error code.

See Also

swiDisableOutput, swiGetLastError, swiGetOutputState, swiGetSwitchCaps, swiMakeConnection, swiResetSwitch, swiSampleInput, swiSendPattern

Example


#define SIMPLEX 0
#define DUPLEX 1
void myMakeFramedConnection(SWIHD hd, SWI_TERMINUS input,
SWI_TERMINUS output,
unsigned count, DWORD mode)
{
unsigned i;
DWORD duplex = 0;
SWI_TERMINUS *outputs, *inputs;

if (mode == DUPLEX)
duplex = 1;

inputs = (SWI_TERMINUS *)malloc(sizeof(SWI_TERMINUS)*count);
outputs = (SWI_TERMINUS *)malloc(sizeof(SWI_TERMINUS)*count);

for (i = 0; i < count; i++)
{
inputs[i].bus = input.bus;
inputs[i].stream = input.stream;
inputs[i].timeslot = input.timeslot + i;

outputs[i].bus = output.bus;
outputs[i].stream = output.stream;
outputs[i].timeslot = output.timeslot + i;
}
swiMakeFramedConnection(hd, inputs, outputs, count);

if( duplex )
{
for (i = 0; i < count; i++)
{
inputs[i].stream = inputs[i].stream + 1;
outputs[i].stream = outputs[i].stream - 1;
}
swiMakeFramedConnection(hd, outputs, inputs, count);
}
}


Table of Contents Index NMS Glossary Previous Page Next Page (Page 24 of 29 in this chapter) Version


Want to send us feedback on our documentation? Email: Tech_Pubs@nmss.com
Copyright © 2000, Natural MicroSystems, Inc. All rights reserved.