(Page 1 of 1 in this chapter)6.2.1 Invoking MC1 Driver Commands Using CT Access
6.2.2 Invoking MC1 Driver Commands Using SwitchPath
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
Description
Calls the specified driver command.
Prototype
DWORD swiCallDriver ( SWIHD swihd,
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.
Description
Calls the specified driver command.
Prototype
SWPINT SWPENTRY CxDriverCommand ( SwiHANDLE sw,
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
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.
op->streams[0]=16;
op->streams[1]=17;
op->streams[2]=18;
op->streams[3]=19; MC1_CONFIG_CLOCKDescription
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_parmsNumber 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:
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.
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
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
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:
If a clock error occurs:
If watchdogtimer is nonzero, then the watchdog timer has timed out. The watchdogtimer parameter indicates the following for the MC1 board configurations:
|
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)
|
|
Utility
|
Description
|
|---|---|
|
mc1mon
|
Performs clocking and stream configuration.
|
|
mc1phone
|
Checks switching connections, listen to MC1 timeslot.
|
|
mc1tst
|
Verifies installation.
|
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
mc1mon /cp /xl /m16,17,18,192. 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,233. 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,274. 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,19mc1mon 1 /m20,21
mc1phone /o 20 0 /m 2 3
Figure 17. mc1phone Connections
ClockRef = MVIP
EnableMvip = YES
DriveSec8K = OSC
configclock <device_handle> ref=MVIP sec8k=DRIVEN_BY_OSC Note that this configuration assumes that an AG-8 or AG Connect board. If using a digital network board (AG-T1, AG-E1, or AG Quad), the oscillator cannot be used to drive the SEC8K line ifThe following error appears in the mc1mon window:ClockRef =MVIP.
2. Configure the MC1 board with mc1mon. The mc1mon utility must be run in a separate window. Initialize the MC1 board as the primary master driving the left MC1 clock and MC1 output streams 16, 17, 18 and 19.
mc1mon /cp /xl /m16,17,18,19
ERRORS: The clock signal on MC1_8K is missing. 3. Enter [F9] in the mc1mon window so that SEC8K will drive MC1_8K (8KREF). The error should go away.
ERRORS:NONE 4. Start mc1phone. The device driver must be specified with the
/d option unless you are using the default device driver. The /o option must be used to specify that phone 1 will be transmitted, in this case to MC1 output stream 16, timeslot 0. Use the /p option if phone 1 will not be connected to stream 16, timeslot 0 of the network interface board.mc1phone /d <device_driver> /o 16 0 /p <stream> <timeslot> 5. In order to listen to MC1 stream 20, press F1 four times after mc1phone is started.
Setup for PC#2:
ClockRef = MVIP
EnableMvip = YES
DriveSec8K = NO
configclock <device_handle> ref=MVIP sec8k=NOT_DRIVEN Note that this configuration assumes that an AG-8 or AG Connect board. If using a digital network board (AG-T1, AG-E1, or AG Quad), the oscillator cannot be used to drive the SEC8K line ifClockRef =MVIP.2. Configure the MC1 board with mc1mon. The mc1mon utility must be run in a separate window. Initialize the MC1 board as the secondary master driving the right MC1 clock and MC1 output streams 20, 21, 22, and 23.
mc1mon /cs /xr /m20,21,22,23 3. Start mc1phone. The device driver must be specified with the
/doption unless you are using the default device driver. The/ooption must be used to specify that phone 1 will be transmitted, in this case to MC1 output stream 20, timeslot 0. Use the/poption if phone 1 will not be connected to stream 16, timeslot 0 of the network interface board.mc1phone /d <device_driver> /o 20 0 /p <stream> <timeslot> 4. You can now talk over the MC1 bus using the two phones.
/o option.
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)
mc1phone /o 20 0 /m 2 3 /d agsw
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)