swiResetSwitch

Resets the entire switch block to the idle state.

Prototype

DWORD swiResetSwitch ( SWIHD swihd)

Argument

Description

swihd

Switch handle.


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_FUNCTION_NOT_AVAIL

Reset switch was called on a switch that was opened in restore mode.

CTAERR_INVALID_HANDLE

swihd is not a valid switch handle.

CTAERR_SVR_COMM

Communication error in the server environment.


Details

swiResetSwitch resets the entire switch block to the idle state. All the timeslots on the MVIP bus are set to a high impedance state. The timeslots on the local bus are set to a known state. (The driver vendor must publish these states in customer documentation.)

If the switch handle was opened with the SWI_ENABLE_RESTORE flag specified in swiOpenSwitch, this function returns CTAERR_FUNCTION_NOT_AVAIL and does not affect the switch block.

Refer to Enabling terminus output state restoration for more information.

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

Note: This function does not alter the state of the clocks.

Example

extern SWIHD hd;

void myAppInit(CTAHD ctahd)
{
    /* Open the Switch */
    swiOpenSwitch(ctahd, "AGSW", 0, 0, &hd);

    /* Reset the Switch to defaults */
    swiResetSwitch(hd);
}