$customHeader
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

The Paragon-neo/100G has an integrated test for G.8273.2 Noise Transfer. The CAT shows the results of this test as a graph and also as a table.The example below shows you how to read this table from your script.

Python

from __future__ import print_function
import sys

# Globals ----------------------------------------------------------------------
# The IP address of the instrument
ipAddr = "100g-vm2"
# ------------------------------------------------------------------------------
# Import the wrapper functions
# It is assumed that the wrapper exists on the instrument
sys.path.append('//' + ipAddr + '/calnex100g/RemoteControl/')
import calnexRest as p


# Function to return the noise transfer table.
# This assumes that the measurement has stopped
# Metric type is either PTPNoiseTransfer or SyncENoiseTransfer
def printNoiseTransferTable ():
	# Get the number of rows
	numRows = p.calnexGetVal ("cat/measurement/DelayReq/D/PTPNoiseTransfer/-/dgv/count", "Count")
	
	# Print the column headers
	columns = p.calnexGetVal ("cat/measurement/DelayReq/D/PTPNoiseTransfer/-/dgv/columns", "ColumnLayout")
	for col in columns:
		print (col)
		print (col["Label"]+"   ", end='')
	print ()
	
	# The last two parts of the path are row start index and number of rows to return
	# Just use brute force and get everything
	tableRows = p.calnexGetVal ("cat/measurement/DelayReq/D/PTPNoiseTransfer/-/dgv/data/0/15", "Rows") 
	#print (tableRows)
		
	for row in tableRows:
		#print (row)
		#print (row["DataRow"])
		for column in row["DataRow"]["ColumnData"]:
			#print (column)
			value = column["Value"]
			print (value+"   ", end='')		
	print()
	

p.calnexInit (ipAddr)
printNoiseTransferTable ()


  • No labels