timeServer
timeServer - configure the timing parameters for a chassis.
SYNOPSIS
timeServer sub-command options
DESCRIPTION
The timeServer command is used to manage the timing of the chassis chain. It includes controls and read-only values for all timing options available on IXIA 100 chassis.
STANDARD OPTIONS
antennaStatus
Read-only. Possible values include:
Option |
Value |
Usage |
---|---|---|
gpsStateAntennaUnknown |
0 |
antenna status is unknown until status is received from the GPS unit |
gpsStateAntennaOK |
1 |
antenna is connected and working |
gpsStateAntennaOpen |
2 |
antenna is not detected |
gpsStateAntennaShort |
3 |
antenna is not working |
cdmaFrameErrorRate
Read-only. The CDMA frame error rate, expressed in errored frames per second.
cdmaSNR
Read-only. The CDMA signal to noise ratio.
cdmaState
Read-only. The current state of the CDMA unit. Possible values include:
Option |
Value |
Usage |
---|---|---|
cdmaStateUnknown |
0 |
CDMA status is unknown until status is received. |
cdmaStateAcquiring |
1 |
acquiring a signal |
cmdaStateSignalDetected |
2 |
a CDMA signal has been detected |
cdmaStateCodeLocking |
3 |
CDMA code locking in progress |
cdmaStateCarrierLocking |
4 |
CDMA carrier locking in progress |
cdmaStateLocked |
5 |
CDMA code and carrier are locked; valid times are available |
cdmaTime
Read-only. CDMA generated time in seconds.
enableValidStats
true / false
If set, then timeServer cget -statName calls for statistics invalid for the time source returns an error. If unset, then all timeServer cget -statName returns without error, but the invalid statistics have default values. (default = true)
fpgaVersion
Read-only for GPS Receiver only. The version number of the GPS receiver FPGA.
gpsStatus
Read-only. Possible values include:
Option |
Value |
Usage |
---|---|---|
gpsStateGpsUnknown |
0 |
GPS status is unknown until status is received |
gpsStateGpsLocked |
1 |
connection to the GPS is established |
gpsStateGpsUnlocked |
2 |
connection to the GPS is not established |
gpsTime
Read-only. GPS generated time in seconds.
lockStatus
Read-only. For the GPS receiver only, shows the lock status of the chassis. One of.:
Option |
Value |
Usage |
---|---|---|
gpsUnlocked |
0 |
Chassis is not locked to the GPS receiver. |
gpsLocked |
1 |
Chassis is locked to the GPS receiver. |
positionFix
Read-only for GPS Receiver only. The type of GPS signal received. Possible values include:
Option |
Value |
Usage |
---|---|---|
gpsPositionInvalid |
0 |
No signal |
gpsPositionValidSPS |
1 |
SPS |
gpsPositionValidDGPS |
2 |
DGPS |
gpsPositionValidPPS |
3 |
PPS |
pllStatus
Read-only. Possible values include:
Option |
Value |
Usage |
---|---|---|
gpsStatePLLUnknown |
0 |
PLL status is unknown until status is received |
gpsStatePLLOK |
1 |
PLL is locked |
gpsStatePLLUnlocked |
2 |
PLL is not synchronized to the satellite |
qualityStatus
Read-only. Possible values include:
Option |
Value |
Usage |
---|---|---|
tsTimeQualityInvalid |
0 |
quality invalid until status is received |
tsTimeQuality0 |
1 |
perfect timing |
tsTimeQuality1 |
2 |
acceptable timing |
tsTimeQuality2 |
3 |
not acceptable timing |
tsTimeQuality3 |
4 |
not acceptable timing |
tsTimeQuality4 |
5 |
not acceptable timing |
satelliteIdRatios
Read-only for GPS Receiver only. The connection ratios of signal to noise for the first four satellites used.
satellitesUsed
Read-only for GPS Receiver only. The number of GPS satellites the receiver is connected to.
sntpClient
The name or IP address of the SNTP server used to obtain time information from. Used when timeSource is set to sntpClient. (default = "")
state
Read-only. The current state of the GPS unit expressed as a string.
timeSource
Indicates the source for the time server:
Option |
Value |
Usage |
---|---|---|
tsInternal |
0 |
(default) use internal timing for chassis. |
tsGpsServer |
1 |
use the GPS unit. |
tsCdma |
8 |
use the CDMA unit |
tsGpsAfd1Server |
9 |
use the GPS receiver |
utcDate
Read-only for GPS Receiver only. The current date, in UTC form, expressed as a string.
utcTime
Read-only for GPS Receiver only. The current time of day, in UTC form, expressed as a string.
cThe following time source options are changed to tsInternal if used:
Option |
Value |
Usage |
---|---|---|
tsSntpServer |
2 |
use an external SNTP server in sntpClient. |
tsPcClock |
3 |
use the clock from the PC associated with the chassis. |
tsE1 |
4 |
(IxClock only) use the E1 clock input |
tsT1 |
5 |
(IxClock only) use the E1 clock input |
ts1PPS |
6 |
(IxClock only) use the 1PPS clock input |
tsStandAlone |
7 |
use stand-along timing for the chassis |
DEPRECATED OPTIONS
e1T1Status
Read-only for IxClock only (obsolete). The status of the E1 or T1 signal. Possible values include:
Option |
Value |
Usage |
---|---|---|
ixClockE1T1None |
0 |
no signal is detected |
ixClockE1T1Error |
1 |
an error has been detected |
ixClockE1T1OK |
2 |
signal is OK |
timeOfDay
Read-only for IxClock only (obsolete). The current time of day, expressed as a string.
COMMANDS
The timeServer command is invoked with the following sub-commands. If no sub-command is specified, returns a list of all sub-commands available.
timeServer cget option
Returns the current value of the configuration option given by option.
timeServer config option value
Modify the configuration options of the time server. If no option is specified, returns a list describing all of the available options (see STANDARD OPTIONS) for timeServer.
timeServer get chasID
Gets the current configuration of the TimeServer for chassis with chassis ID chasID from its hardware. Call this command before calling timeServer cget option value to get the value of the configuration option.
timeServer get ipAddress
Gets the current configuration of the TimeServer for the chassis whose IP address or hostname is ipAddress. Call this command before calling timeServer cget option value to get the value of the configuration option.
timeServer resetGps chasID
Resets the GPS unit in chassis ID chasID.
timeServer set chasID
Sets the time server configuration of the chassis with chassis ID chasID by reading the configuration option values set by the timeServer config option value command.
timeServer set ipAddress
Sets the time server configuration of the chassis whose IP address or hostname is ipAddress by reading the configuration option values set by the timeServer config option value command.
timeServer setDefault
Sets to IxTclHal default values for all configuration options.
EXAMPLES
package require IxTclHal
set host cucumber
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]
# Get the type of chassis so that we use GPS correctly
chassis get $host
set type [chassis cget -type]
# Set the time server selection to the default
timeServer setDefault
timeServer set $chas
chassis writeAll $chas
# And check the current settings
timeServer get $chas
set ts [timeServer cget -timeSource]
ixPuts -nonewline "Default time source is: "
switch $ts \
$::tsInternal {ixPuts "internal"} \
$::tsGpsServer {ixPuts "GPS"} \
$::tsSntpServer {ixPuts "SNTP"} \
$::tsStandAlone {ixPuts "stand alone"} \
$::tsCdma {ixPuts "CDMA"}
# If the chassis is of a type that has GPS
if {$type == $::ixia100} \
{
# Set it to GPS mode
timeServer config -timeSource tsGpsServer
timeServer set $chas
chassis writeAll $chas
# Wait for a minute to see if we can achieve good quality
for {set i 0} {$i < 60} {incr i} \
{
after 1000
# Get the settings
timeServer get $chas
# Get the GPS time quality
set quality [timeServer cget -qualityStatus]
# If it's good enough
if {$quality <= $::tsTimeQuality1} \
{
ixPuts "Good GPS quality achieved"
break
}
# Otherwise report on all settings
ixPuts "Quality is $quality"
set quality [timeServer cget -antennaStatus]
ixPuts "Antenna Status is $quality"
set quality [timeServer cget -gpsStatus]
ixPuts "GPS Status is $quality"
set quality [timeServer cget -pllStatus]
ixPuts "PLL Status is $quality"
set quality [timeServer cget -state]
ixPuts "State is $quality"
}
# If we achieved lock
if {$i < 60} \
{
# Pick up the time setting
set time [timeServer cget -gpsTime]
ixPuts "Current time from GPS is $time"
} \
else \
{
ixPuts "Can't achieve GPS lock"
break
}
}
# Now try to set the system to use CDMA
timeServer config -timeSource tsCdma
timeServer set $chas
chassis writeAll $chas