(Page 4 of 4 in this chapter)


13.3 Utilities

In addition to the demonstration programs presented in Section 13.2, Demonstration Programs, CT Access also provides the following utilities:

Utility

Description

ctaparm

Displays system parameter defaults if using the CT Access daemon.

ctavers

Verifies CT Access installation and displays the version information for CT Access components.

ctdaemon

Allows you to modify system global default parameters, set the global tracemask, and optionally, log trace messages to a file.

mkprompt

Creates a prompt rules table.

swish

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.

testpmpt

Tests a prompt rules table.

voxinfo

Displays information about a VOX file.

13.3.1 CT Access Parameter Display: ctaparm

Name

ctaparm

Purpose

Displays selected parameter definitions and values stored in shared memory from ctdaemon. Refer to Section 3.5, Managing Parameters for more information.

Usage

ctaparm [options]

where the options are:

Option

Description

-e

Displays the names of all parameter structures.

-s structnames

Displays all parameters in listed structures.

-f fieldnames

Displays all parameters matching listed field names.

-g

Generates a parameter file from the current values.

-l cfgfile

Configuration file defining services to initialize.

Description

ctaparm reads parameters stored in system shared memory and displays them on the screen. Specify which parameter to retrieve on the command line.

Procedure

To run ctaparm:

ctaparm [-e -s structlist -f fieldlist -g]


To display the parameter structure names, use the -e option. The structure names displayed on the screen can then be used with the -s option to display all parameters for a given structure.


The lists generated by the -s and -f options are delimited by the `+' (plus) character. For example:


ctaparm -s adi.play+adi.record
ctaparm -f gain+dtmfabort

Note

If the CT Access daemon is running, the parameters displayed are those resident in system shared memory; otherwise, they are the compile-time defaults.

13.3.2 CT Access Installation: ctavers

Name

ctavers

Purpose

Verify CT Access installation and display version information for CT Access components. Refer to Section 3.7, Verifying Compatibility for more information.

Usage

ctavers

Description

ctavers calls ctaInitialize with the services and service managers specified in the cta.cfg configuration file. (Refer to Section 13.3.3, CT Access Daemon: ctdaemon.) It then retrieves and displays the version information of all services and service managers that were registered during CT Access initialization. The version information for the CT Access dispatcher (cta.dll) is also displayed.

Procedure

Call ctavers.exe from the command line or the icon in the CT Access folder. Ensure that CTA_DPATH includes the directory where the cta.cfg file can be found. The default file is located in the \nms\ctaccess\cfg directory.

13.3.3 CT Access Daemon: ctdaemon

Name

ctdaemon

Purpose

Allows developers to modify system global default parameters, set the global tracemask, and optionally log trace messages to a file. Refer to Section 3.5, Managing Parameters and to Section 3.6, CT Access Error Codes for more information.

Usage

ctdaemon [options]

-f filename Specifies an ASCII file containing statements for defining services and service managers and overriding default parameters. Usually this will be cta.cfg.

Description

ctdaemon reads the configuration file specified on the command line or finds cta.cfg in CTA_DPATH which was set during installation. This file specifies, in the [ctasys] section, the services and service managers that are to be passed to the call to ctaInitialize by the daemon. Once the services have been registered with CT Access by ctaInitialize, their compile-time parameter values are placed in shared memory and can be modified by the daemon. After initializing services, ctdaemon reads the [ctapar] section of the configuration file and writes new parameter values into shared memory.

Any processes that use "system global" default parameters will retrieve default parameter values from shared memory instead of compile-time "process global" defaults from the process data area.

Applications must set the parmflags field of the CTA_INIT_PARMS structure passed to ctaInitialize to CTA_PARM_MGMT_SHARED to specify that they want to use the "system global" default parameters maintained by ctdaemon. The daemon can be used in interactive mode to retrieve and modify global default parameter values.
Type `s <parmname> = <value>' or `g <parmname>' to modify or retrieve the current default values.

To generate a list of parameters that can be used in the [ctapar] section of the configuration file, use the utility ctaparm. Refer to Section 13.3.1, CT Access Parameter Display: ctaparm. Selectively edit the parameters that should have different default values and place them in cta.cfg.

The ctdaemon also holds a shared memory segment for tracing. To enable tracing from applications, the daemon must be running and the traceflags field of the CTA_INIT_PARMS structure passed to ctaInitialize must be set to CTA_TRACE_ENABLE. To start displaying trace messages, type `t' on the daemon command line. Trace messages will only be displayed if the tracemask corresponding to the specific type of message is enabled. The daemon can set the global tracemask by using the `m <tracemask>' command from the daemon command line. This will set the tracemask in all processes that have enabled tracing via ctaInitialize. To be more selective in tracing, use ctaSetTraceLevel within the application itself, to set the tracemask for a specific context within a specific process.

ctdaemon can also write the trace messages to a log file. The `TraceFile' keyword in "cta.cfg" specifies the name of the trace file. Trace messages will be appended to the log file each time the daemon is started. It is up to the user to delete or archive this file as necessary.

Note: It is not possible to use ctdaemon and addaemon at the same time. ctdaemon manages parameters for the ADI Service in CT Access so this should not be a problem.

13.3.4 Make Prompt: mkprompt

Name

mkprompt

Purpose

Creates a prompt rules table. Refer to Section 5.2.7, Prompt Builder for more information. Refer to Appendix C for information on adding or changing prompt rules.

Usage

mkprompt source[.ptx] [dest[.tbl]]

source[.ptx] - is the source text file to be compiled. If no extension is specified, .ptx is assumed.

[dest[.tbl]] - is an optional output file name. If no output file is specified, the source file name will be used with the .tbl extension. If no extension is specified, .tbl is assumed.

Description

mkprompt compiles prompt rule source files (.ptx) into prompt rule tables (.tbl).

The .tbl file is created only if there are no errors during the compile. If there are errors, they are reported with the line number where the error occurred.

Example

  mkprompt american
Creates american.tbl from the source american.ptx file.

13.3.5 Control MVIP Switches: swish

Name

swish

Purpose

Gives developers interactive or text file driven control of MVIP switches via the CT Access Switching Service or directly via the device drivers. Refer to Chapter 4 for more information about the Switching service.

Usage

swish [-i] [filename]

Options

-i specifies that the default initialization file swish.ini should 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 a combination of the two.

In interactive mode, the user may enter 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:

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 type 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 CT Access 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 the CT Access Function Reference Manual.

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 and swish defaults to using the Switching service command. You may use the prefix "swi." or "drv." in front of the command to disambiguate between the Switching service commands and the driver commands that have the same name.

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 (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 following commands are supported by swish:

Command

Arguments

Description

swi.OpenSwitch

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

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.FmicRdCntrl

<DevHd> <Reg>

Read Fmic control reg.

13.3.6 Test Prompt: testpmpt

Name

testpmpt

Purpose

Tests a prompt rules table. Refer to Section 5.2.7, Prompt Builder for more information. Refer to Appendix C for information on adding or changing prompt rules.

Usage

testpmpt [options]

where options are:

:
Option

Description

-p table

Prompt table name (assume a .tbl extension). The default is american.tbl.

-t text

Prompts in text form (assumes a .txt extension). The default is american.txt.

Description

testpmpt tests new prompt rules without having to
pre-record the actual voice messages.

Once rules have been created or edited in a Prompt Rule Text file (.ptx), they should be compiled into a rule table (.tbl) file using mkprompt. Refer to Section 13.3.4, Make Prompt: mkprompt. A text description for each message should be created in a text file with the same root name as your .tbl file of the following format:

nn:"description"

where nn is the message number being described.

When this utility is executed, the rule table and text file will be loaded and you will be prompted to enter a text string to be processed by the Prompt Builder.

Example

  testpmpt american
Tests the prompt rules in american.tbl.

13.3.7 VOX File Information: voxinfo

Name

voxinfo

Purpose

Display information about a VOX file. Refer to Chapter 5 for more information about the Voice Message service. Refer to Appendix B for more information about the VOX file format.

Usage

voxinfo filename

Description

Displays information about a specified NMS VOX file, including the header fields and details about each message.

The unit of size in VOX files is the `frame'. A frame represents 20ms when speech is encoded with one of the Natural MicroSystems voice encodings, and 10 ms for other encodings.

Example

c:>voxinfo myprompt
NMS Voice File Information Utility CT Access Version 1.00 Nov 7 1996 Copyright (c) 1996 Natural MicroSystems Corp. All Rights Reserved.
File: MYPROMPT Compression rate: 2 (NMS-24)
Maximum number of indices: 48
Number of active indices: 4
Number of freed indices: 0
Number of indices in use: 4
Number of available indices: 44
Highest message number: 3
Total number of frames: 228 (5 seconds)
Total number of bytes: 14648
Number of active messages: 3
--------------------ACTIVE INDICES--------------------- Idx# Msg# Frames Bytes Start byte End byte
0 0 0x3b 0xe4a 0x200 - 0x1049
1 1 0x40 0xf80 0x104a - 0x1fc9
2 2 0x38 0xd90 0x1fca - 0x2d59
3 3 0x31 0xbde 0x2d5a - 0x3937
-------------MESSAGE INFORMATION----------------
Msg# Seconds Index Cnt Frame Cnt Byte Cnt
1 1.2 1 64 3968
2 1.1 1 56 3472
3 0.9 1 49 3038


(Page 4 of 4 in this chapter)


Tech_Support@nmss.com
Copyright © 1996, Natural MicroSystems, Inc. All rights reserved.