sonetError

sonetError - configure the sonet error generation of a POS port of a card on a chassis.

SYNOPSIS

sonetError sub-command options

DESCRIPTION

The sonetError command is used to configure the sonet error generation properties of a POS port of a card on a chassis.

STANDARD OPTIONS
consecutiveErrors

The number of consecutive error frames to insert when an error is inserted either periodically, continuously or only once. (default = 1)

errorPeriod

If insertionMode is set to sonetPeriodic, then this is the period of time or number of frames to insert errors over, depending on the setting of errorUnits. A value of 1 is always used for OC12/OC3 ports. (default = 1)

errorUnits

If insertionMode is set to sonetPeriodic, then this determines whether errorPeriod refers to time (expressed in seconds) or frames. OC12/OC3 cards may only use units of seconds.

Option

Value

Notes

sonetFrames

0

(default) errorPeriod expressed in number of frames

sonetSeconds

1

errorPeriod expressed in number of seconds

insertionMode

The periodicity of error insertion.

Option

Value

Notes

sonetContinuous

0

Errors are inserted continuously

sonetPeriodic

1

Errors are inserted periodically as determined by errorPeriod and errorUnits

sonetOff

2

(default) Errors are not inserted

sonetErrorType

Read-only. When an error configuration is read back with sonetError getError, this reflects the sonet error type. All of the errors listed here are also non-Vcat port level errors.

Option

Value

Usage

sonetLofError

1

Loss of Frame (Vcat port level error)

sonetBip1Error

2

BIP 1 (Vcat port level error)

sonetBip2Error

3

BIP 2 (Vcat port level error)

sonetBip3Error

4

BIP 3 (circuit level error)

sonetLineAis

5

Line AIS (Vcat port level error)

sonetLineRei

6

Line REI (Vcat port level error)

sonetLineRdi

7

Line RDI (Vcat port level error)

sonetPathLop

8

Loss of Path (circuit level error)

sonetPathAis

9

Path AIS (circuit level error)

sonetPathRei

10

Path REI (circuit level error)

sonetPathRdi

11

Path RDI (circuit level error)

sonetLosError

12

Loss of signal

COMMANDS

The sonet command is invoked with the following sub-commands. If no sub-command is specified, returns a list of all sub-commands available.

sonetError cget option

Returns the current value of the configuration option given by option. Option may have any of the values accepted by the sonet command.

sonetError config option value

Modify the configuration options of the port. If no option is specified, returns a list describing all of the available options (see STANDARD OPTIONS) for port.

sonetError get chasID cardID portID circuitID timeslot

Gets the current sonetError configuration for all of the sonet error types for the port indicated from its hardware. Call this command before calling sonet cget option value to get the value of the configuration option. Specific errors are:

sonetError getError sonetErrorType

Retrieves the values of the attributes (insertionMode, consecutiveErrors, errorPeriod, and errorUnits) associated with the sonetErrorType. See the description of sonetErrorType above for a list of the possible values. The sonetError get command must be used before getError.

sonetError insertError sonetErrorType chasID cardID portID circuitID timeslot

Inserts a single instance of the error defined by sonetErrorType and in the standard options into the sonet stream for the indicated port.

sonetError set chasID cardID portID circuitID timeslot

Sets the configuration of the port in IxTclHAL with id portID on card cardID, chassis chasID by reading the configuration option values set by the sonet config option value command. Specific per-port errors are:

These error types can be per-circuit:

sonetError setDefault

Sets to IxTclHal default values for all configuration options.

sonetError setError sonetErrorType

Sets the attributes (insertionMode, consecutiveErrors, errorPeriod, and errorUnits) associated with the sonetErrorType. See the description of sonetErrorType above for a list of the possible values. The sonetError set command should be used after this command to write the values to the hardware.

sonetError start chasID cardID portID circuitID

Starts sonet error insertion on the selected port.Specific errors are:

sonetError stop chasID cardID portID circuitID

Stops sonet error insertion on the selected port.Specific errors are:

EXAMPLES

package require IxTclHal

proc printState {} \

{

for {set errType $::sonetLofError} {$errType <= $::sonetPathRei} {incr errType} {

sonetError getError $errType

ixPuts -nonewline " errType: $errType"

ixPuts -nonewline " insertionMode: "

ixPuts -nonewline [sonetError cget -insertionMode]

ixPuts -nonewline " errorPeriod: "

ixPuts -nonewline [sonetError cget -errorPeriod]

ixPuts -nonewline " errorUnits: "

ixPuts -nonewline [sonetError cget -errorUnits]

ixPuts -nonewline " consecutiveErrors: "

ixPuts [sonetError cget -consecutiveErrors]"

}

}

# Connect to chassis and get chassis ID

set host localhost

set username user

# Check if we're running on UNIX - connect to the TCL Server

# which must be running on the chassis

if [isUNIX] {

if [ixConnectToTclServer $host] {

ixPuts "Could not connect to $host"

return 1

}

}

# Now connect to the chassis

if [ixConnectToChassis $host] {

ixPuts $::ixErrorInfo

return 1

}

# Get the chassis ID to use in port lists

set chas [ixGetChassisID $host]

# Assuming that an OC48 POS card is in slot 17

set card 17

set portList [list [list $chas $card 1]]

# Login before taking ownership

if [ixLogin $username] {

ixPuts $::ixErrorInfo

return 1

}

# Take ownership of the ports we'll use

if [ixTakeOwnership $portList] {

ixPuts $::ixErrorInfo

return 1

}

# Get the type of card and check if it's the correct type

set ifType [card getInterface $chas $card]

if {$ifType != $::interfaceOc48} {

ixPuts "Card $card is not an OC48c POS card"

} else {

sonetError setDefault

ixPuts ""

ixPuts "Initial State:"

printState

sonetError config -insertionMode sonetContinuous

sonetError config -consecutiveErrors 5

sonetError setError sonetLofError

sonetError config -insertionMode sonetPeriodic

sonetError config -errorUnits sonetSeconds

sonetError config -errorPeriod 10

sonetError config -consecutiveErrors 20

sonetError setError sonetBip1Error

sonetError set $chas $card 1

ixWriteConfigToHardware portList

sonetError get $chas $card 1

ixPuts "After changes:"

printState

sonetError start $chas $card 1

after 1000

sonetError stop $chas $card 1

sonetError setDefault

sonetError config -consecutiveErrors 4

sonetError insertError sonetLineAis $chas $card 1

}

# Let go of the ports that we reserved

ixClearOwnership $portList

# Disconnect from the chassis we're using

ixDisconnectFromChassis $host

# If we're running on UNIX, disconnect from the TCL Server

if [isUNIX] {

ixDisconnectTclServer $host

}

SEE ALSO

card, port, sonet