(Page 5 of 6 in this chapter)


10.4 Control MVIP Switches: swish

Name

swish

Purpose

Provides interactive or text-file-driven control of MVIP switches via the Switching service or directly using the device drivers.

Usage

swish [-i] [filename]

Options

-i specifies that the default initialization file, swish.ini, will be ignored.

filename specifies an ASCII file which contains swish commands to be executed before any interactive commands are executed.

Description

swish is a tool for interactive or text-file-driven control of MVIP switches. It provides a convenient way to manually try out connections during development to verify the commands that will be given to switches from within CT Access applications that use the Switching service. It is similar to the SW Utility program that is shipped as part of NMS Network Board software.

Procedure

swish may be used in interactive mode, text-file-driven mode, or in a combination of the two.

In interactive mode, the user enters swish commands at the swish command prompt to control the MVIP switches on the underlying hardware.

In text-file-driven mode, the user provides swish with the name of the file to read for the commands to run. If the text file does not have the exit command at the end, swish goes into interactive mode after executing the commands in the text file.

To run swish:

1. Enter the following at the prompt:

  swish 

 for interactive mode, or

swish filename

for running from a text file.

In interactive mode, the command prompt swish: is displayed. Type Help to get a list of commands and arguments that swish supports. You may also enter the name of a command without any arguments to get more information about the command.

In text-file-driven mode, swish executes the commands from the specified filename. The syntax of the commands in the file is the same as the syntax of the commands in interactive mode.

swish supports two kinds of commands: Switching service commands and driver commands.

The Switching service commands are commands that interface to the Switching service. The names of the commands are the same as the functions provided by the Switching service, and the arguments to the commands are also similar. Refer to Chapter 9 for more information about the Switching service functions.

The driver commands are commands that allow the user to access the underlying driver directly by bypassing the Switching service. Some of the Switching service commands and the driver commands have the same names. swish defaults to using the Switching service command. To distinguish among the Switching service commands, the MVIP-90 driver commands, and the MVIP-95 driver commands, refer to the following table:

Use this prefix...

To indicate...

swi

Switching service commands.

drv

MVIP-90 driver commands.

d95

MVIP-95 driver commands.

The Switching service commands provided by swish take a switch handle as an argument. This switch handle is opened by the OpenSwitch command. The driver commands take a driver handle as an argument and it is opened by the Loaddriver (Windows NT, OS/2), or the Opendriver (UNIX) command. The driver handle and the switch handle are not interchangeable. A switch handle may not be used in a driver command and a driver handle may not be used in a Switching service command.

The commands presented in the following table are supported by swish.

If you need help on these commands:

Command

Arguments

Description

swi.OpenSwitch

<SwiHd> = <DLLname> <SwNo> [RESTORE=...] [STD=...]

Opens a switch.

swi.CloseSwitch

<SwiHd>

Closes a switch.

swi.DisableOutput

<SwiHd> <ToList>

Disables outputs of switch.

swi.GetOutputState

<SwiHd> <ToList>

Displays connections.

swi.Caps

<SwiHd>

Displays switch capabilities.

swi.GetSwitchCaps

<SwiHd>

Displays switch capabilities.

swi.MakeConnection

<SwiHd> <TiList> TO <ToList> [SIMPLEX|DUPLEX|QUAD]

swi.MakeFramedConnection

<SwiHd> <TiList> TO <ToList> [SIMPLEX|DUPLEX|QUAD]

swi.ResetSwitch

<SwiHd>

Resets a switching block.

swi.SendPattern

<SwiHd> <pattrn> TO <ToList>

Sends a pattern.

swi.SampleInput

<SwiHd> <TiList>

Displays data memory.

swi.ConfigBoardClock

<SwiHd> <TYPE=STD...> <SOURCE=MVIP...>

swi.ConfigSec8KClock

<SwiHd> <SOURCE=MVIP...> [network device]

swi.EnableSwitch

<SwiHd>

Enable switch block.

swi.DisableSwitch

<SwiHd>

Disable switch block.

swi.SetVerify

<SwiHd> <0=off/1=on>

swi.ConfigStreamSpeed

<SwiHd> <SPEED=...> <Streams>

Configure stream speed.

swiGetStreamsBySpeed

<SwiHd> <SPEED=...>

Get streams by speed.

swi.ConfigLocalStream

<SwiHd>

Configure device on a local stream.

swi.ConfigLocalStream

<SwiHd>

Configure device on a local stream.

swi.ConfigLocalTimeslot

<SwiHd>

Configure device on a local stream and timeslot.

swi.GetBoardInfo

<SwiHd>

Get board information.

swi.GetDriverInfo

<SwiHd>

Get driver information.

swi.GetLocalStreamInfo

<SwiHd>

Information about a device on a local stream.

swi.GetLocalTimeslotInfo

<SwiHd>

Information about a device on a local stream and timeslot.

swi.CallDriver

<SwiHd> <command> [<arg1> ... <argN>]

swi.GetLastError

<SwiHd>

Gets the last MVIP device error.

swi.ConfigCarrier

<SwiHd> <TrkNo> [frame=D4...] [code=ZCS...]

swi.CarrierStatus

<SwiHd> <TrkNo>

Displays carrier status.

swi.QueryHybridIds

<SwiHd> <STList>

Retrieves the hybrid IDs.

drv.LoadDriver

<DevHd> = <DLLname> [SwNo|0]

Loads a driver DLL.

drv.FreeDriver

<DevHd>

Frees a DLL driver.

drv.CallDriver

<DevHd> <command> [<arg1> ... <argN>]

drv.ResetSwitch

<DevHd>

Resets a switching block.

drv.Caps

<DevHd>

Displays switch capabilities.

drv.QuerySwitchCaps

<DevHd>

Displays switch capabilities.

drv.MakeConx

<DevHd> <STiLst> TO <SToList> [SIMPLEX|DUPLEX|QUAD]

drv.ReadConx

<DevHd> <SToLst>

Displays connections.

drv.SendPattern

<DevHd> <pattrn> TO <SToList>

Sends a pattern.

drv.DisableOutp

<DevHd> <SToLst>

Disables outputs of switches.

drv.SampleInput

<DevHd> <STiLst>

Displays data memory.

drv.ConfigClock

<DevHd> [REF=MVIP...] [sec8k=NOT_DRIVEN...]

drv.DumpConx

<DevHd> <minor> <st_list>

Dumps the connection memory.

drv.DumpData

<DevHd> <minor> <st_list>

Dumps data memory.

drv.SetTrace

<DevHd> <0=off,1=write,2=read,3=both,4=entries>

drv.SetVerify

<DevHd> <on/off>

Enables/disables verification of switching functions.

drv.TristateSwitch

<DevHd> <ON=tristates OFF=enables sw. block>

drv.ChangeIOPort

<DevHd> <ctrl_addr> <mem_addr>

drv.ConfigGain

<DevHd> <gain_code> TO <slot> [N]

drv.ConfigCarrier

<DevHd> <TrkNo> [frame=D4...] [code=ZCS...]

drv.StartCond

<DevHd> <iStream>

Starts trunk conditioning.

drv.StartMonitor

<DevHd>

Starts the monitor thread.

drv.CarrierStatus

<DevHd> <TrkNo>

Displays carrier status.

drv.WaitAlarm

<DevHd> <SleepTm>

Waits for alarm change.

drv.MonitorCarrier

<DevHd> <TrkNo>

Displays status continuously.

drv.WatchInput

<DevHd> <STiLst>

Monitors STList continuously.

drv.VerifyConx

<DevHd> <STiLst> TO <SToList>; GOTO <error_hd>

drv.VerifyPattern

<DevHd> <pattern> TO <SToList>; GOTO <error_hd>

drv.VerifyInput

<DevHd> <STiLst> IS <pattern>; GOTO <error_hd>

drv.VerifyDisable

<DevHd> <SToLst>; GOTO <error_hd>

drv.Output

<value> TO <port>

Sends a byte to a port.

drv.QueryTmSlot

<DevHd> <item> <STList>

Retrieves configuration data.

drv.FmicWrCntrl

<DevHd> <Reg> <Value>

Write Fmic control reg.

drv.FmicRdCntr

<DevHd> <Reg>

Read Fmic control reg.

d95.MakeConnection

<DevHd> <TiList> TO <ToList> [SIMPLEX|DUPLEX|QUAD]

d95.MakeFramedConnection

<DevHd> <TiList> TO <ToList>

d95.ResetSwitch

<DevHd>

Resets a switching block.

d95.SendPattern

<DevHd> <pattrn> TO <SToList>

Sends a pattern.

d95.DisableOutput

<DevHd> <SToLst>

Disables outputs of switches.

d95.SampleInput

<DevHd> <STiLst>

Displays data memory.

d95.VerifyConnection

<DevHd> <STiLst> TO <SToList>; GOTO <error_hd>

d95.VerifyDisableOutput

<DevHd> <SToLst>; GOTO <error_hd>

d95.VerifyPattern

<DevHd> <pattern> TO <SToList>; GOTO <error_hd>

d95.VerifyInput

<DevHd> <STiLst> IS <pattern>; GOTO <error_hd>

d95.WatchInput

<DevHd> <STiLst>

Monitors SToLst continuously.

d95.WatchOutputl

<DevHd> <SToLst>

Monitors SToLst continuously.


Note:	 The drv commands are only applicable to MVIP-90 drivers. All stream and timeslot values should be specified in MVIP-90 syntax. The d95 commands are only applicable to MVIP-95 drivers. All stream and timeslot values should be specified in MVIP-95 syntax.

Example

# This SWISH script connects the DSPs to the Line-interfaces on
# a fully populated AG-8 board.

# Open the switch in MVIP-95 mode with switch state restoration disabled.
swi.OpenSwitch ag8 = agsw 0 STD=MVIP95 RESTORE=DISABLE

# Reset the switch
swi.ResetSwitch ag8

# Connect the DSPs to the Line-interfaces,
swi.MakeConnection ag8 LOCAL:0:0..7 to LOCAL:5:0..7 QUAD

# The same command can be accomplished by typing the following set of commands:
swi.MakeConnection ag8 LOCAL:0:0..7 to LOCAL:5:0..7
swi.MakeConnection ag8 LOCAL:4:0..7 to LOCAL:1:0..7
swi.MakeConnection ag8 LOCAL:2:0..7 to LOCAL:7:0..7
swi.MakeConnection ag8 LOCAL:6:0..7 to LOCAL:3:0..7

# Close the switch. The connections remain because we opened the switch in restoration disabled.
swi.CloseSwitch ag8
quit


(Page 5 of 6 in this chapter)


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