(Page 4 of 11 in this chapter)
4.3 Opening a Switch Handle
- A switch handle identifies a switch block on an open MVIP switching device. swiOpenSwitch opens a switching device and creates a context for subsequent switching calls. The handle is used to refer to the MVIP switch block in the Switching service functions.
- A switch handle is always associated with a CTA context. When you specify a switch handle, the CTA context is implied as illustrated in Figure 29.

Figure 29. A Switch Handle Associated with a CTA Context
- You cannot open an MVIP switch block in one context and then refer to it in another CTA context.
Note: If you have multiple threads, each with its own CTA context, and you want to make connections on a switch block, each thread must obtain its own switch handle for the switch block.
4.3.1 Specifying MVIP-95 or MVIP-90 Mode
- Switch handles may be opened in either MVIP-95 mode or MVIP-90 mode.
- In MVIP-95 mode, the terminus arguments to the Switching service functions are interpreted as MVIP-95 bus/stream/timeslot values. MVIP-95 is the default mode.
- If the underlying device driver is an MVIP-95 device driver, the switch can only be opened in the default mode (MVIP-95).
Since MVIP-95 device drivers can only be opened in MVIP-95 mode, it is highly recommended that all applications that may use MVIP-95 device drivers in the future, be written to use MVIP-95 mode even if the application is not currently using MVIP-95 device drivers.
- If the underlying device driver is an MVIP-95 device driver or an MVIP-90 device driver and the SWI_MVIP90 constant is used as a parameter to swiOpenSwitch, the switch is opened as an MVIP-90 switch. The terminus streams and timeslots are interpreted as MVIP-90 streams and timeslots. The bus field of the terminus is ignored.
- If the underlying device driver is an MVIP-90 device driver, and the switch was opened in MVIP-95 mode, the Switching service translates the MVIP-95 terminus parameters into the appropriate MVIP-90 streams and timeslots before passing the commands down to the MVIP-90 device driver.
4.3.2 Enabling Terminus Output State Restoration
- When the SWI_ENABLE_RESTORE constant is used as a parameter to swiOpenSwitch, the states of the switch block outputs are saved so that they can be restored when the switch handle is closed using swiCloseSwitch. If you want to use the SWI_ENABLE_RESTORE mode, a single terminus should not be controlled by more than one switch handle. Otherwise, a terminus affected by your application might be restored to a condition set by some other application or to a condition set via a different switch handle in your own application.
- swiResetSwitch can not be called if the switch handle is opened with the SWI_ENABLE_RESTORE constant enabled.
(Page 4 of 11 in this chapter)
Tech_Support@nmss.com
Copyright © 1996, Natural MicroSystems, Inc. All rights
reserved.