flexibleTimestamp

flexibleTimestamp - configure the location of the time stamp in a packet

SYNOPSIS

flexibleTimestamp sub-command options

DESCRIPTION

The flexibleTimestamp command allows the placement of the packet time stamp value to be moved from its default place before the CRC to an offset within the packet. The availability of this feature for a particular port may be tested by use of the port isValidFeature... portFeatureFlexibleTimestamp command. Time stamps are inserted in transmitted packets by virtue of the enableTimestamps option in the stream command.

Note that when using ATM ports, different types of ATM encapsulation result in different length headers, as discussed in atmHeade . The data portion of the packet normally follows the header, except in the case of the two LLC Bridged Ethernet choices, where 12 octets of MAC address and 2 octets of Ethernet type follow the header. The offsets used in this command is with respect to the beginning of the AAL5 packet and must be adjusted by hand to account for the header.

STANDARD OPTIONS
offset

If type is timestampAtOffset, then this is the offset within the packet to place the time stamp at. (default = 23)

type

The basic placement options.

Option

Value

Usage

timestampBeforeCrc

0

(default) Place the time stamp just before the CRC at the end of the packet.

timestampAtOffset

1

Place the time stamp at the offset indicated in offset.

COMMANDS

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

flexibleTimestamp cget option

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

flexibleTimestamp config option value

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

flexibleTimestamp get chasID cardID portID

Gets the current configuration of the flexibleTimestamp header for port with id portID on card cardID, chassis chasID from its hardware. Call this command before calling flexibleTimestamp cget option value to get the value of the configuration option. Specific errors are:

flexibleTimestamp set chasID cardID portID

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

flexibleTimestamp setDefault

Sets to IxTclHal default values for all configuration options.

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 18

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

}

 

# See if the port supports flexible time stamps

if [port isValidFeature $chas $card $port portFeatureFlexibleTimestamp] {

flexibleTimestamp config -type timestampAtOffset

flexibleTimestamp config -offset 42

if [flexibleTimestamp set $chas $card $port] {

ixPuts $::ixErrorInfo

return 1

}

ixPuts "$chas:$card:$port flexible time stamps set"

} else {

ixPuts "$chas:$card:$port does not support flexible time stamps"

}

 

# 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

port, stream