linkFaultSignaling
linkFaultSignaling - configure and start/stop link fault signalling
SYNOPSIS
linkFaultSignaling sub-command options
DESCRIPTION
The linkFaultSignaling command is used to define a series or continuous stream of link fault signals. The series/stream consists of good and bad period, where the bad periods may send local, remote or custom errors. Errors are called ordered sets; two, named A and B, are available for insertion.
STANDARD OPTIONS
contiguousErrorBlocks
The number of contiguous errored blocks to insert at a time. This must be an even number between 2 and 30. The type of error block inserted is determined by the setting of the sendSetsMode option. (default = 2)
contiguousGoodBlocks
The number of contiguous non-errored blocks to insert at a time. This must be an even number between 2 and 512. (default = 2)
enableLoop
Continuously
true | false
If true, the cycle of errored and non-errorored blocks is applied continuously. Errors are inserted when the startErrorInsertion sub-command is called and stopped when the stopErrorInsertion sub-command is called. (default = true)
enableTxIgnoresRx
LinkFault true | false
If true, then the port continues to transmit even when the port has received a remote link fault. (default = false)
loopCount
If enableLoopContinuously is false, then this is the number of times that good-bad cycles is applied. The setting of the sendSetsMode option determines whether there are one or two good-bad cycles per loop. (default = 0)
orderedSetTypeA
Determines the type of ordered set to be used for type A errors.
Option |
Value |
Usage |
---|---|---|
linkFaultLocal |
0 |
(default) A local fault. |
linkFaultRemote |
1 |
A remote fault. |
linkFaultCustom |
2 |
A custom fault, specified through the use of the customOrderedSet command. |
orderedSetTypeB
Determines the type of ordered set to be used for type B errors.
Option |
Value |
Usage |
---|---|---|
linkFaultLocal |
0 |
A local fault. |
linkFaultRemote |
1 |
(default) A remote fault. |
linkFaultCustom |
2 |
A custom fault, specified through the use of the customOrderedSet command. |
sendSetsMode
Indicates whether to transmit alternating good-bad blocks using only Type A blocks, only Type B blocks or alternating between them. The choices are:
Option |
Value |
Usage |
---|---|---|
linkFaultSendTypeA |
0 |
Use type A ordered sets only. |
linkFaultSendTypeB |
1 |
Use type B ordered sets only. |
linkFaultCustom |
2 |
(default) Use type A ordered sets, then good blocks, type B ordered sets and then good blocks. Each cycle forms one loop count as used in loopCount. |
COMMANDS
The linkFaultSignaling command is invoked with the following sub-commands. If no sub-command is specified, returns a list of all sub-commands available.
linkFaultSignaling cget option
Returns the current value of the configuration option given by option. Option may have any of the values accepted by the linkFaultSignaling command.
linkFaultSignaling config option value
Modify the linkFaultSignaling configuration options of the port. If no option is specified, returns a list describing all of the available linkFaultSignaling options (see STANDARD OPTIONS) for port.
linkFaultSignaling get chasID cardID portID
Gets the current linkFaultSignaling configuration of the port with id portID on card cardID, chassis chasID. Call this command before calling linkFaultSignaling cget option to get the value of the configuration option. Specific errors are:
- No connection to a chassis
- Invalid port number
linkFaultSignaling set chasID cardID portID
Sets the linkFaultSignaling configuration of the port with id portID on card cardID, chassis chasID by reading the configuration option values set by the linkFaultSignaling config option value command. Specific errors are:
- No connection to a chassis
- Invalid port number
- The port is being used by another user
- The configured parameters are not valid for this port
linkFaultSignaling startErrorInsertion chasID cardID portID
Starts the process of error insertion on the indicated port. Specific errors are:
linkFaultSignaling setDefault
Sets to IxTclHal default values for all configuration options.
linkFaultSignaling stopErrorInsertion chasID cardID portID
Stops the process of error insertion on the indicated port. This can be used to stop error insertion when enableLoopContinuously is true, or to prematurely stop error insertion when loopCount is used. Specific errors are:
EXAMPLES
package require IxTclHal
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]
set card 55
set port 1
set portList [list [list $chas $card $port]]
# 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 current link fault signaling data
if [linkFaultSignaling get $chas $card $port] {
ixPuts "Error in linkFaultSignaling"
}
# Define a custom ordered set A
# This is actually equivalent to a local fault
customOrderedSet config -blockType 0x4B
customOrderedSet config -syncBits 0x02
customOrderedSet config -byte1 0x00
customOrderedSet config -byte2 0x00
customOrderedSet config -byte3 0x01
customOrderedSet config -byte4 0x00
customOrderedSet config -byte5 0x00
customOrderedSet config -byte6 0x00
customOrderedSet config -byte7 0x00
if [customOrderedSet set linkFaultOrderedSetTypeA] {
ixPuts "Error in customOrderedSet set"
}
# Set up link fault signalling, continuous insertion
# of 14 errors, 200 good
linkFaultSignaling config -sendSetsMode linkFaultAlternateOrderedSets
linkFaultSignaling config -contiguousErrorBlocks 14
linkFaultSignaling config -contiguousGoodBlocks 200
linkFaultSignaling config -enableLoopContinuously true
linkFaultSignaling config -orderedSetTypeA linkFaultCustom
linkFaultSignaling config -orderedSetTypeB linkFaultRemote
if [linkFaultSignaling set $chas $card $port] {
ixPuts "Error in linkFaultSignaling set"
}
ixWriteConfigToHardware portList
if [linkFaultSignaling startErrorInsertion $chas $card $port] {
ixPuts "Error in linkFaultSignaling startErrorInsertion"
}
# 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
}