(Page 28 of 28 in this chapter)


swiSetVerify

Description

Enables or disables command-by-command verification of switching functions.

Prototype

DWORD swiSetVerify ( SWIHD swihd
unsigned verify)

swihd Handle returned by swiOpenSwitch.

verify Specifies whether to enable or disable verification. A non-zero value enables verification, and zero (0) disables verification.

Return Values

Events

Details

This function enables or disables command-by-command verification of switching functions. If verification of commands is enabled, the driver verifies low-level switch I/O operations and returns the error CTAERR_DRIVER_ERROR if the driver detects an internal switching error.

Refer to Section 7.2, Verifying Switching Operations for more information.

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

See Also

swiDisableSwitch, swiEnableSwitch, swiGetLastError

Example


void mySwitchVerify(SWIHD hd)
{
SWI_TERMINUS output, savedinput, input;
BYTE pattern;
unsigned mode;
DWORD status;

/* Enable Verification */
swiSetVerify(hd, 1);

output.bus = MVIP95_MVIP_BUS;
output.stream = 1;
output.timeslot = 0;

input.bus = MVIP95_LOCAL_BUS;
input.stream = 0;
input.timeslot = 0;

swiGetOutputState(hd, &output, &mode, &pattern, &savedinput, 1);

status = swiMakeConnection(hd, &input, &output, 1);

if (status != SUCCESS)
{
fprintf(stderr, "Switch Verification Failed\n");
}
else
{
/*...Restore state...*/
}

/* Disable Verification */
swiSetVerify(hd, 0);
}



(Page 28 of 28 in this chapter)


tech_support@nmss.com
Copyright © 1997, Natural MicroSystems, Inc. All rights reserved.