swiDisableOutput

Resets the specified switch block outputs to their idle state.

Prototype

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

Argument

Description

swihd

Switch handle.

output

Array of terminus structures containing the outputs to disable:

typedef struct
{
  DWORD bus;
  DWORD stream;
  DWORD timeslot;     
} SWI_TERMINUS;

Refer to swiMakeConnection for a description of these fields.

count

Number of elements in the output array.


Return values

Return value

Description

SUCCESS

 

CTAERR_DRIVER_ERROR

Underlying driver retrieved an unrecognized error. Call swiGetLastError to retrieve the MVIP device error code.

CTAERR_INVALID_HANDLE

swihd is not a valid switch handle.

CTAERR_SVR_COMM

Communication error in the server environment.

SWIERR_INVALID_STREAM

One or more of the specified streams is invalid.

SWIERR_INVALID_TIMESLOT

One or more of the specified timeslots is invalid.


Details

swiDisableOutput resets specified switch block outputs to their idle state.

If the switch block output is on the MVIP bus, it is set to the high impedance state. If the switch block output is on the local bus, the timeslots on the local bus are set to a known state. (The driver vendor must publish these states in its customer documentation.)

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

Refer to Disabling output for more information.

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

See also

swiCloseSwitch, swiGetOutputState, swiGetSwitchCaps, swiMakeFramedConnection, swiOpenSwitch, swiResetSwitch, swiSampleInput, swiSendPattern

Example

void myDisconnectTerminus(SWIHD swihd, SWI_TERMINUS output)
{
    unsigned count;
    SWI_TERMINUS outputs[6];

    /* Disconnect 6 consecutive timeslots */
    for (count = 0; count < 5; count++)
    {
        outputs[count].bus = output.bus;
        outputs[count].stream = output.stream;
        outputs[count].timeslot = output.timeslot + count;
    }
    swiDisableOutput(swihd, outputs, count);
}