(Page 1 of 1 in this chapter)


Chapter 6

Commands & Utilities


6.1 MC1 Switching Commands 60

6.2 MC1 Driver Commands 60

6.2.1 Invoking MC1 Driver Commands Using CT Access

swiCallDriver 61

6.2.2 Invoking MC1 Driver Commands Using SwitchPath

CxDriverCommand 62

MC1_CONFIG 63

MC1_CONFIG_CLOCK 65

MC1_QUERY_CONFIG 68

MC1_QUERY_STATUS 69

6.3 CT Access Clock Configuration Commands 72

6.3.1 Configuring the MC1 Clocks Using swiConfigBoardClock

6.3.2 Changing SEC8K Clock Source

6.3.3 Changing MC1_8K (8KREF) Clock Source

6.3.4 Configuring the MC1 Primary Master

6.3.5 Configuring the MC1 Secondary Master

6.3.6 Configuring an MC1 Slave

6.3.7 Configuring the Primary MVIP Master

6.4 MC1 Utilities 79

6.4.1 mc1mon

6.4.2 mc1phone

6.4.3 mc1tst

6.4.4 showconx

6.1 MC1 Switching Commands

The MC1 device driver is an MVIP-90 compatible driver. Switching operations for the MC1 board can be controlled by the following:

Switch Commands

Description

CT Access Switching service

Service providing a set of functions for controlling MVIP switches. May be used for MVIP-90 and MVIP-95 device drivers.
For more information, see the CT Access Developer's Reference Manual.

swish utility

CT Access utility which controls MVIP switches. May be used for MVIP-90 and MVIP-95 device drivers.
For more information, see the Switching Service Developer's Reference Manual.

SwitchPath

Library of C functions for MVIP-90 switch control.
For more information, see the SwitchPath Technical Reference Manual.

sw utility

MVIP-90 standalone utility for controlling MVIP-90 switches.
For more information, see the SW Utility User's Manual.

6.2 MC1 Driver Commands

The MC1 board supports all the standard MVIP-90 driver commands. In addition, there are four MC1 driver commands available to the MC1 board which are accessible using CT Access swiCallDriver or SwitchPath CxDriverCommand. The MC1 driver commands are:

Command

Description

MC1_CONFIG

Configures MC1 output streams and enables watchdog timer

MC1_CONFIG_CLOCK

Configures MC1 clocking

MC1_QUERY_CONFIG

Retrieves output streams and watchdog timer configuration

MC1_QUERY_STATUS

Retrieves clocking configuration and error status

MC1 data structures used in the driver commands are defined in the include file mc1sw.h located in the directories nms\include (NT and OS/2) and opt/nms/include (UNIX).

6.2.1 Invoking MC1 Driver Commands Using CT Access

The CT Access Switching service provides a set of functions for controlling MVIP switch blocks on MVIP compliant switching devices. The Switching service includes functions to make or break connections, send patterns, and sample data on MC1 boards.

The CT Access Switching service provides an escape mechanism for making direct driver calls using the function swiCallDriver.

Note: All commands to the drivers are synchronous; they do not return until the driver has completed the command.

For more information about the CT Access Switching service, see the Switching Service Developer's Reference Manual.

The syntax of the swiCallDriver command is:

swiCallDriver

Description

Calls the specified driver command.

Prototype

DWORD swiCallDriver ( SWIHD swihd,
DWORD command,
void *args,
DWORD size
DWORD *errorcode )

swihd Switch handle returned by swiOpenSwitch.

command Command name as defined in swext.h.

args Pointer to buffer of arguments for command.

size Size, in bytes, of the arguments to the call.

errorcode Pointer to the driver return code.

Return Values

SUCCESS, or an error code from ctaerr.h or swidef.h.

6.2.2 Invoking MC1 Driver Commands Using SwitchPath

SwitchPath provides API functions to control switches, make and break connections, and issue conferencing commands.

SwitchPath is a separate Natural MicroSystems product which is not included in the MC1 package. To order SwitchPath, contact Natural MicroSystems. For more information on SwitchPath, refer to the SwitchPath Technical Reference Manual.

SwitchPath functions interface to the MC1 board driver, which in turn controls the board. To invoke the MC1 driver commands, use the CxDriverCommand function. Pass the command name and appropriate parameters to this function.

Note: In SwitchPath version 1.1 for OS/2, the CxDriverCommand function is not referenced in swpath.lib. Obtain the latest versions of swpath.h and swpath.lib by contacting NMS Developer Support.

The syntax of the CxDriverCommand function is:

CxDriverCommand

Description

Calls the specified driver command.

Prototype

SWPINT SWPENTRY CxDriverCommand ( SwiHANDLE sw,
SWPINT SwCmd,
SWPINT *SwParams,
SWPINT num_params)

sw Switch handle returned by CxGetSwitchHd.

SwCmd Command name as defined in swext.h.

SwParams Pointer to buffer of parameters for command.

num_params Size of buffer in SWPINTs.

Return Values

SUCCESS, or an error code from swpath.h

MC1_CONFIG

Description

Establishes the MC1 board configuration.

Parameters

op pointer to mc1_config_params structure:

typedef struct mc1_config_parms
{
DRVINT size ; /* size of this structure in bytes */
DRVINT disable_watchdog ; /* enables/disables watchdog timer */
DRVINT nstreams ; /* number of logical streams to enable */
DRVINT streams[22] ; /* array of MC1 streams to enable */
} mc1_config_parms

Number of Parameters

sizeof(op)/sizeof(SWPINT)

Return Values

SUCCESS, or an error code from swpath.h (SwitchPath) or from ctaerr.h or swidef.h (CT Access).

Details

If the disable_watchdog field is set to 0, a call must be made to MC1_QUERY_STATUS periodically to reset the watchdog timer. If the value is non-zero, the watchdog timer is disabled.

The default timer setting is 9 seconds. The timer is used to ensure that the host is still able to communicate with the MC1 board. If the watchdog timer times out, the MC1 card is automatically disabled from driving the MC1 bus.

The nstreams field specifies how many MC1 streams the MC1 card is to drive. nstreams can be assigned to any value from 0 to 4.

The streams array argument is an array which contains a list of the MC1 streams to be configured as outputs. Only the streams that are listed in the streams array will drive the MC1 bus. All 22 MC1 streams can be accessed as inputs regardless of the output configuration.

Only one stream each from the following groups (A, B, C, D) can be configured for output at any one time.

Logical Group

MVIP-90 Switch Model

MVIP-95 Switch Model

Group A

16, 20, 24, 28, 32, 36

1,9,17,25,33,41

Group B

17, 21, 25, 29, 33, 37

3,11,19,27,35,43

Group C

18, 22, 26, 30, 34

5,13,21,29,37

Group D

19, 23, 27, 31, 35

7,15,23,31,39


For example, to use streams 16, 17, 18, and 19:

     op->streams[0]=16;
op->streams[1]=17;
op->streams[2]=18;
op->streams[3]=19;
MC1_CONFIG_CLOCK

Description

Establishes the clocking mode of the specified MC1 board.

Parameters

op Pointer to mc1_clock_config_params structure:

typedef struct mc1_clock_config_parms
{
DRVINT size ; /* size of this structure in bytes */
DRVINT clockmode ; /* clock mode */
DRVINT clksel ; /* left or right clocking */
DRVINT disablemvip ; /* MVIP clock configuration */
DRVINT autofallback ; /* auto fallback for MC1_SLAVE */
DRVINT mc1_8k_en ; /* enables SEC8K to drive MC1_8K (8KREF) */
} mc1_clock_config_parms

Number of Parameters

sizeof(op)/sizeof(SWPINT)

Return Values

SUCCESS, or an error code from swpath.h (SwitchPath) or from ctaerr.h or swidef.h (CT Access).

Details

The clockmode field can take the following values:
clockmode

Description

MC1_PRIMARY_MASTER

Primary master, clock referenced to MC1_8K (8KREF).

MC1_SECONDARY_MASTER

Clock referenced to the left or right clocks. Drives backup MC1 clock line.

MC1_SLAVE

Clock referenced to the left or right clocks. Does not drive MC1 clocks.

MC1_PRIMARY_MVIP

Primary master, clock referenced to MVIP.

The clksel field specifies whether the MC1 card drives the left or right MC1 clocks when in master mode. In clock slave mode, clksel specifies whether to reference the left or right MC1 clocks. A value of zero references left clocks. A non-zero value references right clocks. The secondary master and all slaves should be configured to the clocks driven by the primary master.

The disablemvip field indicates if the MC1 board is driving the local MVIP clocks (configured as MVIP clock master). When nonzero, the MC1 board is not driving the MVIP clocks. The only time this field should be set to nonzero is when there is more than one MC1 board on the same MVIP bus or if another board is driving the MVIP bus.

When more than one MC1 board is present on a single MVIP bus, any of the MC1 boards may drive the MVIP clocks. disablemvip is ignored for the MC1_PRIMARY_MVIP clock mode, which automatically disables driving the MVIP clocks.

The autofallback field enables or disables automatic switching of a slave to the backup clock when it detects a primary master clock signal failure. If autofallback is nonzero, then any board programmed as an MC1_SLAVE will automatically switch to a fallback mode of referencing the backup MC1 clock. On failure of the primary clock, the secondary master uses its internal clock. If there is no signal on the backup MC1 clock, the slaves will fail to operate correctly. The fallback operation does not change the programmed value of clksel.

Once the MC1 board has reverted to using the backup MC1 clock, it continues to use the backup clock until the clock mode is reprogrammed, even if the clock error goes away. A call to MC1_QUERY_STATUS command retrieves the status of autofallback.

The mc1_8k_en field indicates if SEC8K drives MC1_8K (8KREF). It also indicates if MC1_8K (8KREF) drives SEC8K for the primary master.

Primary Master

Secondary Master, Slaves and Primary MVIP

mc1_8k_en=0

MC1_8K (8KREF) drives SEC8K

no connection between SEC8K and MC1_8K (8KREF)

mc1_8k_en=1

SEC8K drives MC1_8K (8KREF)

SEC8K drives MC1_8K (8KREF)

If a clock error occurs:

· The red LED on the MC1 board goes on.

· The clockerr parameter in the mc1_status data structure becomes set.

Once the clock error is resolved, the MC1_CONFIG_CLOCK command must be invoked to clear the red LED and the clockerr parameter.

Note: The red LED may not indicate the actual status of the clock. If a clock error has been resolved, the red LED remains lit until the MC1_CONFIG_CLOCK command is invoked. Pressing F7 twice from mc1mon will also clear the clock error.

MC1_QUERY_CONFIG

Description

Reads the configuration of the MC1 board.

Parameters

op Pointer to mc1_config_params structure:

typedef struct mc1_config_parms
{
DRVINT size ; /* size of this structure in bytes */
DRVINT disable_watchdog ; /* state of watchdog function */
DRVINT nstreams ; /* number of logical streams enabled */
DRVINT streams[22] ; /* array of MC1 streams enabled */
} mc1_config_parms

Number of Parameters

sizeof(op)/sizeof(SWPINT)

Return Values

SUCCESS, or an error code from swpath.h (SwitchPath) or from ctaerr.h or swidef.h (CT Access).

Details

The size field of the structure is the only element that must be passed in by the application. The command fills in the rest of the structure with the configuration information. The size field will be updated to reflect the actual size of the returned structure.

The disable_watchdog field indicates if the watchdog timer is enabled (disable_watchdog = 0) or disabled (disable_watchdog <> 0).

The nstreams field indicates how many MC1 output streams are enabled.

The streams field is an array of the MC1 output streams.

MC1_QUERY_STATUS

Description

Reads the status of the MC1 board.

Parameters

op Pointer to mc1_status structure:

typedef struct mc1_status
{
DRVINT size ; /* size of this structure in bytes */
DRVINT clockmode ; /* currently programmed clock mode */
DRVINT disablemvip ; /* 0 = driving MVIP clock */
DRVINT autofallback ; /* 1 = autofallback enabled */
DRVINT mc1_8k_en ; /* enables SEC8K to be MC1_8K (8KREF) */
DRVINT eventcount ; /* increments anytime a field changes */
DRVINT mc1_8k_err ; /* indicates MC1_8K (8KREF) signal absent */
DRVINT clockerr ; /* indicates clocking error */
DRVINT fallback ; /* MC1 has reverted to backup clocks */
DRVINT watchdogtimer ; /* indicates watchdog timer timeout */
} mc1_status

Number of Parameters

sizeof(op)/sizeof(SWPINT)

Return Values

SUCCESS, or an error code from swpath.h (SwitchPath) or from ctaerr.h or swidef.h (CT Access).

Details

The size field should be set to the total size of the structure in bytes by the caller. The returned size is the updated total number of actual bytes.

The clockmode, disablemvip, autofallback, and mc1_8k_en fields return the current values that were assigned by the MC1_CONFIG_CLOCK command.

The mc1_8k_err field is nonzero if there is no valid 8Khz clock present on the MC1_8K (8KREF) signal of the MC1 bus.

clockerr is a bit field which indicates the input clock source is invalid. If the bit is nonzero, then its value indicates which clock error has occurred as shown in the following table:
Bit Value

Meaning

MC1_CLOCK_OK

No errors

MC1_NO_PRIMARY_CLOCK

Missing clock source for primary master

MC1_NO_CLOCK_SYNCH

Clocks unsynchronized

Both MC1_NO_PRIMARY_CLOCK and MC1_NO_CLOCK_SYNCH

Missing clock source and unsynchronized clock

If a clock error occurs:

· The red LED on the MC1 board goes on.

· The clockerr parameters in the mc1_status data structure becomes set.

Once the clock error is resolved, the MC1_CONFIG_CLOCK command must be invoked to clear the red LED and the clockerr parameter.

Note: The red LED may not indicate the actual status of the clock. If a clock error has been resolved, the red LED remains lit until the MC1_CONFIG_CLOCK command is invoked. Pressing F7 twice from mc1mon will also clear the clock error.

If the fallback field is nonzero, it indicates that the MC1 board has reverted to the backup clock due to a failure of the primary clock. Note that once an MC1 board has fallen back to use the backup clock, it will continue referencing the alternate clock until the clockmode is reprogrammed, even if the clock error goes away. The fallback field indicates the following for the MC1 board configurations:

Primary Master

Secondary Master

Slave

Primary MVIP Master

As MC1 master, the board is using its internal oscillator to provide clock to the MC1 bus.

As MC1 master, the board is using its internal oscillator to provide clock to the MC1 bus.

Slave has reverted to referencing the backup MC1 clock (left or right).

As MC1 master, the board is using its internal oscillator to provide clock to the MC1 bus.

If watchdogtimer is nonzero, then the watchdog timer has timed out. The watchdogtimer parameter indicates the following for the MC1 board configurations:

Primary Master

Secondary Master

Slave

Primary MVIP Master

MC1 output streams and clock outputs are disabled (tristated).

MC1 output streams and clock outputs are disabled (tristated).

MC1 output streams are disabled (tristated).

MC1 output streams and clock outputs are disabled (tristated).

Invoking the MC1_QUERY_STATUS command will reset the on-board watchdog timer.

6.3 CT Access Clock Configuration Commands

The MC1 board clocking can also be configured using CT Access version 1.2 or later. The CT Access Switching service provides functions which configure the clock signals for the MC1 primary master, secondary master, and slaves.

The three switching commands used to configure the MC1 clocks are:

Switching Command

Description

swiConfigBoardClock

Establish the clocking mode of an MVIP board.

swiConfigSec8KClock

Specify source for SEC8K clock.

swiConfig8KRefClock

Specify source for MC1_8K (8KREF).

All clock configuration can be done using swiConfigBoardClock. Use swiConfigSec8KClock and swiConfig8KRefClock if it is necessary to change the default values for SEC8K and MC1_8K (8KREF).

Note: The CT Access clock configuration commands are synchronous. When configuring an MC1 board using the CT Access clock configuration commands, the application will be blocked for 200 msec (per command) to allow the clocks to settle before starting any error checking. This prevents false clocking alarms.

CT Access switching data structures used in the clock configuration commands are defined in the include files swidef.h and mvip95.h located in the directories nms\include (NT and OS/2) and opt/nms/include (UNIX).

6.3.1 Configuring the MC1 Clocks Using swiConfigBoardClock

To configure the MC1 board clocks using CT Access, you must first invoke swiConfigBoardClock. The swiConfigBoardClock command:

swiConfigBoardClock defaults the source for the SEC8K clock to be disabled, in which case another board in the PC chassis must be configured to drive SEC8K. It also defaults the source for the MC1_8K (8KREF) clock to be SEC8K for the primary master and disabled for all other MC1 boards in the system. The following table summarizes default values for SEC8K and MC1_8K (8KREF):

Clock Source

Default Value

SEC8K clock

MVIP95_SOURCE_DISABLE

MC1_8K (8KREF)

MVIP95_SOURCE_SEC8K (for primary master)

MVIP95_SOURCE_DISABLE (for all other MC1 boards)

Note: If the SEC8K and MC1_8K (8KREF) clocks are configured using swiConfigSec8KClock and swiConfig8KRefClock, invoking swiConfigBoardClock will overwrite the settings for SEC8K and MC1_8K (8KREF) with the default values.

6.3.2 Changing SEC8K Clock Source

The SEC8K clock may also be configured with the swiConfigSec8KClock command. Typically, a digital network board is configured to drive the SEC8K clock line. The source and network parameters passed to swiConfigSec8KClock define the source of SEC8K.

MC1 boards usually do not to drive SEC8K (source=MVIP95_SOURCE_DISABLE). This is the default value set by swiConfigBoardClock.

Note: swiConfigBoardClock must be called before calling swiConfigSec8KClock to establish baseline clocking settings.

6.3.3 Changing MC1_8K (8KREF) Clock Source

The MC1_8K (8KREF) clock may also be configured with the swiConfig8KRefClock command which defines the source for the MC1_8K (8KREF) clock. The source and network parameters passed to swiConfig8KRefClock define the source of SEC8K.

The MC1 primary master is typically configured to drive the MC1_8K (8KREF) clock from the SEC8K clock (source=MVIP95_SOURCE_SEC8K). In this configuration, a digital network board in the same chassis as the primary master must be configured to drive the SEC8K clock.

If the primary master is in a different chassis than the network board which is driving SEC8K for the MC1 system, the MC1_8K (8KREF) clock should be disabled (source=MVIP95_SOURCE_DISABLE).

Note: If the primary master is configured not to drive MC1_8K (8KREF), then the MC1_8K (8KREF) clock automatically drives the SEC8K clock in the chassis of the primary master.

When calling swiConfig8KRefClock for the secondary master, primary MVIP master, or slaves, source is typically set to MVIP95_SOURCE_DISABLE (default set by swiConfigBoardClock). If the digital network board that is driving the SEC8K clock for the MC1 system is in the same chassis of the secondary master or slave board, source should be set to MVIP95_SOURCE_SEC8K.

Note: swiConfigBoardClock must be called before calling swiConfig8KRefClock to establish baseline clocking settings.

6.3.4 Configuring the MC1 Primary Master

To configure the MC1 primary master, call swiConfigBoardClock with the following values:

SWI_CLOCK_ARGS (defined in swidef.h)

clocktype

MVIP95_MC1_CLOCKING

clocksource

MVIP95_SOURCE_8KREF

Receive clock from MC1_8K (8KREF).

ext.mc1.mc1clockmode

MVIP95_MC1_MASTER_LEFT
MVIP95_MC1_MASTER_RIGHT
MVIP95_EXT_MC1_MASTER_LEFT_NO_MVIP_CLK
MVIP95_EXT_MC1_MASTER_RIGHT_NO_MVIP_CLK

Drives MC1 left clocks & MVIP clock
Drives MC1 right clocks & MVIP clock
Drives MC1 left clocks
Drives MC1 right clocks

ext.mc1.autofallback

MVIP95_MC1_DISABLE_AUTO_FB
MVIP95_MC1_ENABLE_AUTO_FB

Disables autofallback
Enables autofallback

The primary master is configured by specifying the clock source to be the MC1_8K (8KREF) clock line (clocksource=MVIP95_SOURCE_8KREF) and by specifying the board is a master driving a clock line (e.g., mc1clockmode= MVIP95_MC1_MASTER_LEFT).

The MC1 extensions, MVIP95_EXT_MC1_MASTER_LEFT_NO_MVIP_CLK and MVIP95_EXT_MC1_MASTER_RIGHT_NO_MVIP_CLK, specify an MC1 board which is not the MVIP bus clock master. MC1 boards are usually configured as the MVIP bus clock master unless there are multiple MC1 boards in the same chassis.

By default, the primary master is configured so that SEC8K drives MC1_8K (8KREF). This default can be changed by calling swiConfig8KRefClock or swiConfigSec8KClock.

6.3.5 Configuring the MC1 Secondary Master

To configure the MC1 secondary master, call swiConfigBoardClock with the following values:

SWI_CLOCK_ARGS (defined in swidef.h)

clocktype

MVIP95_MC1_CLOCKING

clocksource

MVIP95_SOURCE_MC1_LEFT
MVIP95_SOURCE_MC1_RIGHT

Receives clock from left clock line
Receives clock from right clock line

ext.mc1.mc1clockmode

MVIP95_MC1_MASTER_LEFT
MVIP95_MC1_MASTER_RIGHT
MVIP95_EXT_MC1_MASTER_LEFT_NO_MVIP_CLK
MVIP95_EXT_MC1_MASTER_RIGHT_NO_MVIP_CLK

Drives MC1 left clocks & MVIP clock
Drives MC1 right clocks & MVIP clock
Drives MC1 left clocks
Drives MC1 right clocks

ext.mc1.autofallback

MVIP95_MC1_DISABLE_AUTO_FB
MVIP95_MC1_ENABLE_AUTO_FB

Disables autofallback
Enables autofallback

The secondary master is configured by specifying the clock source to be either the left or right clock line (clocksource=MVIP95_SOURCE_MC1_RIGHT or clocksource=MVIP95_SOURCE_MC1_LEFT) and by specifying the board is a master driving a clock line (e.g., mc1clockmode= MVIP95_MC1_MASTER_LEFT).

The MC1 extensions, MVIP95_EXT_MC1_MASTER_LEFT_NO_MVIP_CLK and MVIP95_EXT_MC1_MASTER_RIGHT_NO_MVIP_CLK, specify an MC1 board which is not the MVIP bus clock master. MC1 boards are usually configured as the MVIP bus clock master unless there are multiple MC1 boards in the same chassis.

By default, the secondary master does not drive the MC1_8K (8KREF) clock. This default can be changed by calling swiConfig8KRefClock or swiConfigSec8KClock.

6.3.6 Configuring an MC1 Slave

To configure an MC1 slave, call swiConfigBoardClock with the following values:

SWI_CLOCK_ARGS (defined in swidef.h)

clocktype

MVIP95_MC1_CLOCKING

clocksource

MVIP95_SOURCE_MC1_LEFT
MVIP95_SOURCE_MC1_RIGHT

Receives clock from left clock line
Receives clock from right clock line

ext.mc1.mc1clockmode

MVIP95_MC1_SLAVE
MVIP95_EXT_MC1_SLAVE_NO_MVIP_CLK

MC1 slave & drives MVIP clock
MC1 slave

ext.mc1.autofallback

MVIP95_MC1_DISABLE_AUTO_FB
MVIP95_MC1_ENABLE_AUTO_FB

Disables autofallback
Enables autofallback

The MC1 slave receives clock from the right or left clocks as specified in clocksource.

The MC1 extension, MVIP95_EXT_MC1_SLAVE_NO_MVIP_CLK, specifies an MC1 board which is not the MVIP bus clock master. MC1 boards are usually configured as the MVIP bus clock master unless there are multiple MC1 boards in the same chassis.

By default, an MC1 slave does not drive the MC1_8K (8KREF) clock. This default can be changed by calling swiConfig8KRefClock or swiConfigSec8KClock.

6.3.7 Configuring the Primary MVIP Master

To configure an MC1 board as Primary MVIP master, call swiConfigBoardClock with the following values:

SWI_CLOCK_ARGS (defined in swidef.h)

clocktype

MVIP95_MC1_CLOCKING

clocksource

MVIP95_SOURCE_MVIP

Receive clock from the MVIP bus Configures board as the primary master

ext.mc1.mc1clockmode

MVIP95_MC1_MASTER_LEFT
MVIP95_MC1_MASTER_RIGHT

Drives MC1 left clocks
Drives MC1 right clocks

ext.mc1.autofallback

MVIP95_MC1_DISABLE_AUTO_FB
MVIP95_MC1_ENABLE_AUTO_FB

Disables autofallback
Enables autofallback

The primary MVIP master is configured by specifying the clock source to be the MVIP clock (clocksource=MVIP95_SOURCE_MVIP) and by specifying the board is a master driving a clock line (e.g., mc1clockmode= MVIP95_MC1_MASTER_LEFT).

An MC1 board configured as a Primary MVIP master cannot be the MVIP bus clock master and cannot drive the MC1_8K (8KREF) clock.

6.4 MC1 Utilities

This section describes the utilities available for use with the MC1 board. There are three MC1 utilities:

Utility

Description

mc1mon

Performs clocking and stream configuration.

mc1phone

Checks switching connections, listen to MC1 timeslot.

mc1tst

Verifies installation.

sw can be used to control the MC1 board's switching. It is a standalone utility which allows you to issue individual commands interactively, or to issue multiple commands in a batch file (script). For more information, see the SW Utility User's Manual.

showconx is a utility which displays the MVIP stream connections.

6.4.1 mc1mon

mc1mon is a utility that configures the MC1 board. mc1mon is useful during development to test clocking modes and handling of clocking errors. The functionality of mc1mon should be included in an application program. The source code is provided to aid development.

mc1mon is executed with the following command line arguments
Argument

Description

<board_num>

Specify which MC1 board to configure. Under OS/2 the board loading is determined by the order that the boards are listed in the device=c:\nms\mc1\sys\mc1.sys line in the config.sys file. See the UNIX software installation for the UNIX board number assignment. Default board_num is 0.

/h

Print program version and usage.

/c<mode>

Set clock mode to be master.

mode=p; for primary master
mode=s; for secondary master
mode=m; for primary MVIP

Default configuration is s (slave).

/x<clock>

If board is a master, set clock line to be driven. If board is a slave, set clock source line. clock=l for left clock line, clock=r for right clock line. Default is l (left clock line).

/d

Disable the MC1 board from driving the local MVIP clock. Default is MC1 board driving MVIP clock.

/m<streams>

Specify which MC1 streams are driven by the MC1 board. streams is a comma separated list of one to four MC1 output streams. Only one stream from each of the following four groups can be used:

Group A: 16, 20, 24, 28, 32, 36
Group B: 17, 21, 25, 29, 33, 37
Group C: 18, 22, 26, 30, 34
Group D: 19, 23, 27, 31, 35

/a

Enable audible alarm on error conditions.

/w

Enable watchdog timer.

/t

Time interval in seconds for mc1mon to check status.
Default is 1 second.

Function keys can be used to interactively modify the clocking modes and autofallback mode. This is useful for testing the clocking modes and autofallback as well as handling clocking errors. The function keys have been assigned the following purposes:

Function Key

Description

F1

Set clock mode to be primary master left.

F2

Set clock mode to be secondary master left.

F3

Set clock mode to be slave left.

F4

Set clock mode to be primary master right.

F5

Set clock mode to be secondary master right.

F6

Set clock mode to be slave right.

F7

Toggle state of autofallback (enable/disable).

F8

Toggle driving/not driving of MVIP clock.

F9

Toggle driving MC1_8K (8KREF) from SEC8K.

When a clocking error is resolved, press the F7 key twice to toggle the state of autofallback. This clears the error fields without disturbing the system clocks.

mc1mon displays the following screen:

   MC1_SLAVE1 LEFT2            [F1-F6]

Driving MC1 Output Streams 16 17 18 193

0000:00:004

Autofallback is DISABLED5 [F7]
Watchdog is DISABLED6

MC1 is driving the MVIP Clock7 [F8]
SEC8K is NOT driving MC1 MC1_8K8 [F9]

!!!!FALLBACK!!!!9

ERRORS: <error message>10
Hit q or Q to exit
Field Number

Description

1

Clock mode: primary master, secondary master, MVIP primary master, or slave. This field can be modified with the F1 through F6 keys.

2

MC1 clock line being driven by master or referenced by slaves: left or right. This field can be modified with the F1 through F6 keys.

3

MC1 output streams being driven.

4

Running time. Used as an assurance that the system is not hung. This field is updated whenever the MC1 status is refreshed. This is at the default rate of one second or the rate specified with the /t command line option.

5

Indication of whether or not the autofallback feature is enabled. It can be toggled with the F7 key. This field is valid only for MC1 boards in slave mode. If autofallback is enabled, an MC1 board in slave mode will automatically switch to the backup MC1 clock line if a clock error is detected on the primary clock line. MC1 boards in master mode ignore this field.

6

Indication of whether or not the watchdog timer feature is enabled. The watchdog timer feature is enabled with the /w command line argument.

7

Indication of whether or not the MC1 board is the MVIP bus master. This field can be toggled with the F8 key.

8

Indication of whether or not the SEC8K signal from the local MVIP bus is driving the MC1_8K (8KREF) clock. This field can be toggled with the F9 key.

9

Indication of whether or not fallback has occurred. If this field is empty, fallback has not occurred. If this field contains !!!!FALLBACK!!!!, fallback has occurred. Only MC1 boards in slave mode fall back to the backup clock line when a clock error is detected on the primary clock line.

10

Errors. The following messages may appear in this field:

ERRORS: None.
ERROR: The clock signal on MC1_8K is missing.
ERROR: The input clock source is invalid.
ERROR: The watchdog timer has timed out.

The following are examples of mc1mon invocations:

1. To configure an MC1 board as primary master driving the left clock and MC1 streams 16, 17, 18, 19, the command is:

   mc1mon   /cp   /xl   /m16,17,18,19


2.	 To configure an MC1 board as secondary master driving the right clock and MC1 streams 20, 21, 22, 23, the command is:

mc1mon /cs /xr /m20,21,22,23 3. To configure an MC1 board as a slave receiving the left clock and driving MC1 streams 24, 25, 26, 27, the command is:

mc1mon /xl /m24,25,26,27 4. To configure two MC1 boards in a single PC chassis, where the first MC1 board is the primary master driving the left MC1 clock and the second MC1 board is a slave receiving the clock from the left clock line, the command is:

mc1mon /cp /xl /m16,17,18,19 mc1mon 1 /m20,21

6.4.2 mc1phone

The mc1phone utility is used to set the switch on an MC1 board as well as on the network interface board so that two phones connected to adjacent timeslots on the network board can listen to two adjacent timeslots on the MC1 bus. One of the phones can be used to output voice on an outgoing MC1 stream. Some switch connections can be specified on the command line, and others can be interactively modified.

Note: mc1phone resets the network interface board switch by default.

mc1phone is executed with the following optional command line arguments:

Argument

Description

<mc1_board_num>

Specify which MC1 board to configure. Under OS/2 the board loading is determined by the order that the boards are listed in the device=c:\nms\mc1\sys\mc1.sys line in the config.sys file. See the UNIX software installation for the UNIX board number assignment.
Default mc1_board_num is 0.

/b<net_board_num>

Specify which network interface board to use. Default is 0.

/d<device>

Specify network interface board driver. Default is AGCX for the AG Connect Board.

/h

Print program version and usage.

/m <st> <ts>

Specify the MVIP stream and timeslot over which the MC1 and network board will communicate. Default is 0:0.

/o <st> <ts>

Create an output voice path from phone 1. Transmit phone 1 voice on the specified MC1 stream and timeslot.

/n

Do not reset network interface board switch.

/p <st> <ts>

Specify network interface board streams and timeslots connecting phones to network interface board. Default is 16:0 for phone 1. (Phone 2 is the same stream, next timeslot; i.e., 16:1).

/x

Do not reset the MC1 switch.

In order to transmit the output of phone 1 over the MC1 output stream and timeslot (20:0) and connect the MC1 and network interface boards together on MVIP stream 2 timeslots 3 and 4, invoke mc1phone with the following command line options:

   mc1phone /o 20 0 /m 2 3

The resultant screen is:

MC1 Input1

MVIP2

Phone Output3

stream

slot

stream

slot

stream

slot

Phone1:

16

0

2

3

16

0

Phone2:

16

0

2

4

16

1

Phone 1 output is connected to MC1 output port 20:0.

F1 -

increase MC1 input stream to phone 1 by 1

F2 -

increase MC1 input timeslot to phone 1 by 1

F3 -

increase MC1 input stream to phone 2 by 1

F4 -

increase MC1 input timeslot to phone 2 by 1

F5 -

increase MC1 input stream to phone 1 by 5

F6 -

increase MC1 input timeslot to phone 1 by 5

F7 -

increase MC1 input stream to phone 2 by 5

F8 -

increase MC1 input timeslot to phone 2 by 5

Q or q to exit

Field Number

Description

1

MC1 Input stream, slot: MC1 input streams and timeslots. These fields can be interactively modified with function keys.

2

MVIP stream, slot: Stream and timeslot used by both boards in order to communicate over the local MVIP bus. These connections are made on the forward stream on the network board and on the reverse stream (forward stream + 8) on the MC1 board.

3

Phone Output stream, slot: Streams and timeslots used on the network interface board for phone connections.

Figure 17 illustrates:

The following example illustrates how to set up and run mc1phone so that voice can be transmitted between two telephones on two separate MVIP busses. This example shows how to achieve this using two PC chassis; however the two MVIP busses can be resident in the same PC.

Configuration:

The two network interface boards must be capable of connecting to a telephone set, as opposed to a telephone line. An AG-8 board with a DID port, or an AG Connect board with an operator workstation port could be used.

Setup for PC #1:

The network interface board in PC #1 receives clock from MVIP. It uses its oscillator to drive SEC8K.

1. Use agmon or sw to configure the clock on the network interface board.

The network interface board on this PC receives clock from the MVIP bus. It does not drive SEC8K.

1. Use agmon or sw to configure the clock on the network interface board. If PC#1 and PC#2 are the same physical chassis, this step may be skipped. In this case, the configuration script used on PC#1 must configure both network interface boards.

Figure 18 shows the connections made by the mc1phone example. The dotted lines indicate connections which are not made by default and must be specified with the /o option.

Figure 18. mc1phone Connections with Two PCs


 Example SW script showing connections:

###########################################################################
# mc1phone.swi
#
# Using OS/2 syntax, this file shows the logical switching operations
# performed by the mc1phone utility.
#
# PC #1 and PC #2 refer to separate PC chassis, but the utility can be run
# in a single chassis. In either case, 2 MC1 boards, two network interface
# boards and two MVIP busses are needed. The network boards must be capable
# of communicating with a telephone, as opposed to a telephone line.
####################
# PC #1
# load drivers in PC #1
loaddriver net1=<network switching driver>
loaddriver mc1=mc1sw16

# conditionally reset switches in PC #1
# the switch resets can be overridden with command line options
resetswitch net1
resetswitch mc1

# make connections on PC #1
makeconx net1 0:0 to 16:0 simplex # mvip <-> phone1
makeconx net1 16:0 to 0:0 simplex # phone1 <-> mvip (optional)
makeconx net1 0:1 to 16:1 simplex # mvip <-> phone2

makeconx mc1 20:0 to 8:0 simplex # mc1 -> mvip (phone1)
makeconx mc1 8:0 to 16:0 simplex # mvip -> mc1 (phone1, optional)
makeconx mc1 20:1 to 8:1 simplex # mc1 -> mvip (phone2)

####################
# PC #2
# load drivers in PC #2
loaddriver net2=<network switching driver>
loaddriver mc2=mc1sw16

# the switch resets can be overridden with command line options
# conditionally reset switches in PC #2
resetswitch net2
resetswitch mc2

# make connections on PC #2
makeconx net2 0:0 to 16:0 simplex # mvip <-> phone1
makeconx net2 16:0 to 0:0 simplex # phone1 <-> mvip (optional)
makeconx net2 0:1 to 16:1 simplex # mvip <-> phone2

makeconx mc2 16:0 to 8:0 simplex # mc1 -> mvip (phone1)
makeconx mc2 8:0 to 20:0 simplex # mvip -> mc1 (phone1, optional)
makeconx mc2 16:1 to 8:1 simplex # mc1 -> mvip (phone2)

6.4.3 mc1tst

mc1tst tests a single MC1 board by receiving data which it has transmitted onto each I/O pin leading to/from an MC1 stream. It tests four MC1 output streams at a time and displays the results as well as the content of the status structure for each set.

mc1tst is executed with the following optional command line arguments
Argument

Description

/b<mc1_board_num>

Specify which MC1 board to configure. Under OS/2 the board loading is determined by the order that the boards are listed in the device=c:\nms\mc1\sys\mc1.sys line in the config.sys file. Under UNIX, the board order is determined by the boards address. The board with the lowest address is loaded first.
Default mc1_board_num is 0.

/h

Print program version and usage.

Note: Remove both the MVIP interconnect cable and the MC1 interconnect cable from the board being tested. It is important that no board card in the chassis is driving any of the MVIP streams. It is also required that no other MC1 boards are driving any MC1 streams.

6.4.4 showconx

showconx accesses board drivers and queries the outputs for all streams. All connected outputs are displayed. Connected outputs show the source. Pattern mode outputs show the pattern.

Up to 8 devices per driver are probed. Probing stops at the first invalid device. For each device, probing for streams stops on the first invalid stream. All 32 timeslots are probed for each valid stream.

The following showconx output is displayed after invoking mc1phone with command:

  mc1phone /o 20 0 /m 2 3 /d agsw

Resulting screen:

  SHOWCONX     Version 1.3     Jun 01 1995
  AGSW 0
2:03 <-> 16:00
16:01 <- 2:04
16:02..07 P 7f
17:00..07 P 00
18:00..07 P 7f
19:00..07 P 00
MC1SW16 0
0:00..31 P 00
1:00..31 P 00
2:00..02 P 00
3:00..31 P 00
4:00..31 P 00
5:00..31 P 00
6:00..31 P 00
7:00..31 P 00
10:03 <- 16:00
10:04 <- 16:01
20:00 <- 10:03
20:01..63 P 00
21:00..63 P 00
22:00..63 P 00
23:00..63 P 00



(Page 1 of 1 in this chapter)


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