WIDAR Classes

ca.nrc.widar.mccc.crmGui
Class CrmGuiOutput

java.lang.Object
  extended by ca.nrc.widar.mccc.crmGui.CrmGuiOutput

public class CrmGuiOutput
extends java.lang.Object

WIDAR/EVLA - Crm GUI: CrmGuiOutput Class

A static class, containing variables and methods useful and common to the output and display of data for all classes within the package

Copyright: National Research Council of Canada and Associated Universities Inc., 2010, 2011, 2012

Since:
1.0
Author:
Dave Del Rizzo (Dave.DelRizzo@nrc.gc.ca)
 

Field Summary
static java.lang.String blbDefault
           
static java.text.DecimalFormat blbFormat
           
static java.lang.String CLASSNAME
           
static javax.xml.bind.JAXBContext crmJaxbContext
           
static java.text.DecimalFormat dpFormat
           
static int N_DP
           
static int N_F
           
static int N_SB
           
static int N_STAGES
           
static java.text.DecimalFormat qFormat
           
static java.text.DecimalFormat sbFormat
           
static java.lang.String stbDefault
           
static java.text.DecimalFormat stbFormat
           
static java.lang.String wDefault
           
static java.text.DecimalFormat wFormat
           
static java.lang.String xbDefault
           
static java.text.DecimalFormat xbLFormat
           
static java.text.DecimalFormat xbUFormat
           
 
Constructor Summary
CrmGuiOutput()
           
 
Method Summary
static java.lang.String composeCsdReport(ca.nrc.widar.jaxb.crm.CsdErrorReport cerXml)
          Takes information from the supplied CsdErrorReport JAXB object and forms a string to be returned to the caller with the relevant information.
static java.lang.String formatBlbAddress(java.lang.Integer r, java.lang.Integer c, java.lang.Integer s)
          Based on provided component coordinates for a BlB within the EVLA correlator, constructs and returns a String describing the location of the component
static java.lang.String formatBlbAddress(java.lang.Integer r, java.lang.Integer c, java.lang.Integer s, java.lang.Integer q, java.lang.Integer sb, java.lang.Integer w)
          Based on provided component coordinates for a BlB within the EVLA correlator, constructs and returns a String describing the location of the component, including quadrant, subband and wafer information
static java.lang.String formatBlbAddressHtml(java.lang.Integer r, java.lang.Integer c, java.lang.Integer s)
          Based on provided component coordinates for a BlB within the EVLA correlator, constructs and returns a String describing the location of the component
static java.lang.String formatBlbAddressHtml(java.lang.Integer r, java.lang.Integer c, java.lang.Integer s, java.lang.Integer q, java.lang.Integer sb, java.lang.Integer w)
          Based on provided component coordinates for a BlB within the EVLA correlator, constructs and returns a String describing the location of the component, including quadrant, subband and wafer ID, surrounded by HTML tags
static java.lang.String formatBlbHstResultsToHtml(ca.nrc.widar.jaxb.crm.Diagnostic diagXml)
          A static method that returns a formatted HTML string with the results of the Hardware Self-Test (BLB)
static java.lang.String formatBlbHstResultsToString(ca.nrc.widar.jaxb.crm.Diagnostic diagXml)
          A static method that returns a formatted string with the results of the Hardware Self-Test (BLB) intended for output to ASCII file
static java.lang.String formatCsdTest(ca.nrc.widar.jaxb.crm.CsdModeType m, int id)
          Takes the supplied CSD mode and ID, and returns a formatted string indicating the CSD mode
static java.lang.String formatCsdTestHtml(ca.nrc.widar.jaxb.crm.CsdModeType m, int id)
          Takes the supplied CSD mode and ID, and returns a formatted string indicating the CSD mode, surrounded by HTML tags
static java.lang.String formatStbAddress(java.lang.Integer r, java.lang.Integer c, java.lang.Integer s)
          Based on provided component coordinates for a StB within the EVLA correlator, constructs and returns a String describing the location of the component
static java.lang.String formatStbAddressHtml(java.lang.Integer r, java.lang.Integer c, java.lang.Integer s)
          Based on provided component coordinates for a StB within the EVLA correlator, constructs and returns a String describing the location of the component surrounded by HTML tags
static java.lang.String formatStbHstResultsToHtml(ca.nrc.widar.jaxb.crm.Diagnostic diagXml)
          Returns a String containing the results of an StbHST diagnostic that is formatted in HTML and intended to display to the end user.
static java.lang.String formatStbHstResultsToString(ca.nrc.widar.jaxb.crm.Diagnostic diagXml)
          Returns a String containing the results of an StbHST diagnostic that is formatted for VT100 display and intended to display to the end user.
static void main(java.lang.String[] args)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CLASSNAME

public static final java.lang.String CLASSNAME
See Also:
Constant Field Values

N_DP

public static final int N_DP
See Also:
Constant Field Values

N_F

public static final int N_F
See Also:
Constant Field Values

N_STAGES

public static final int N_STAGES
See Also:
Constant Field Values

N_SB

public static final int N_SB
See Also:
Constant Field Values

crmJaxbContext

public static javax.xml.bind.JAXBContext crmJaxbContext

stbDefault

public static final java.lang.String stbDefault
See Also:
Constant Field Values

blbDefault

public static final java.lang.String blbDefault
See Also:
Constant Field Values

xbDefault

public static final java.lang.String xbDefault
See Also:
Constant Field Values

wDefault

public static final java.lang.String wDefault
See Also:
Constant Field Values

xbUFormat

public static java.text.DecimalFormat xbUFormat

xbLFormat

public static java.text.DecimalFormat xbLFormat

sbFormat

public static java.text.DecimalFormat sbFormat

wFormat

public static java.text.DecimalFormat wFormat

qFormat

public static java.text.DecimalFormat qFormat

dpFormat

public static java.text.DecimalFormat dpFormat

stbFormat

public static java.text.DecimalFormat stbFormat

blbFormat

public static java.text.DecimalFormat blbFormat
Constructor Detail

CrmGuiOutput

public CrmGuiOutput()
Method Detail

formatStbAddress

public static java.lang.String formatStbAddress(java.lang.Integer r,
                                                java.lang.Integer c,
                                                java.lang.Integer s)
Based on provided component coordinates for a StB within the EVLA correlator, constructs and returns a String describing the location of the component

Parameters:
r - The integer rack ID (0-8)
c - The integer crate ID (0-1)
s - The integer slot ID (0-8)
Returns:
A String in the standard EVLA format describing component location

formatStbAddressHtml

public static java.lang.String formatStbAddressHtml(java.lang.Integer r,
                                                    java.lang.Integer c,
                                                    java.lang.Integer s)
Based on provided component coordinates for a StB within the EVLA correlator, constructs and returns a String describing the location of the component surrounded by HTML tags

Parameters:
r - The integer rack ID (0-8)
c - The integer crate ID (0-1)
s - The integer slot ID (0-8)
Returns:
A String in the standard EVLA format describing component location containing HTML tags

formatBlbAddress

public static java.lang.String formatBlbAddress(java.lang.Integer r,
                                                java.lang.Integer c,
                                                java.lang.Integer s)
Based on provided component coordinates for a BlB within the EVLA correlator, constructs and returns a String describing the location of the component

Parameters:
r - The integer rack ID (101-108)
c - The integer crate ID (0-1)
s - The integer slot ID (0-8)
Returns:
A String in the standard EVLA format describing component location

formatBlbAddress

public static java.lang.String formatBlbAddress(java.lang.Integer r,
                                                java.lang.Integer c,
                                                java.lang.Integer s,
                                                java.lang.Integer q,
                                                java.lang.Integer sb,
                                                java.lang.Integer w)
Based on provided component coordinates for a BlB within the EVLA correlator, constructs and returns a String describing the location of the component, including quadrant, subband and wafer information

Parameters:
r - The integer rack ID (101-108)
c - The integer crate ID (0-1)
s - The integer slot ID (0-8)
q - The quadrant ID (0-3)
sb - The subband ID (0-15)
w - The wafer ID (0-31)
Returns:
A String in the standard EVLA format describing component location

formatBlbAddressHtml

public static java.lang.String formatBlbAddressHtml(java.lang.Integer r,
                                                    java.lang.Integer c,
                                                    java.lang.Integer s,
                                                    java.lang.Integer q,
                                                    java.lang.Integer sb,
                                                    java.lang.Integer w)
Based on provided component coordinates for a BlB within the EVLA correlator, constructs and returns a String describing the location of the component, including quadrant, subband and wafer ID, surrounded by HTML tags

Parameters:
r - The integer rack ID (101-108)
c - The integer crate ID (0-1)
s - The integer slot ID (0-8)
q - The quadrant ID (0-3)
sb - The subband ID (0-15)
w - The wafer ID (0-31)
Returns:
A String in the standard EVLA format describing component location containing HTML tags

formatBlbAddressHtml

public static java.lang.String formatBlbAddressHtml(java.lang.Integer r,
                                                    java.lang.Integer c,
                                                    java.lang.Integer s)
Based on provided component coordinates for a BlB within the EVLA correlator, constructs and returns a String describing the location of the component

Parameters:
r - The integer rack ID (101-108)
c - The integer crate ID (0-1)
s - The integer slot ID (0-8)
Returns:
A String in the standard EVLA format describing component location containing HTML tags

composeCsdReport

public static java.lang.String composeCsdReport(ca.nrc.widar.jaxb.crm.CsdErrorReport cerXml)
Takes information from the supplied CsdErrorReport JAXB object and forms a string to be returned to the caller with the relevant information.

Parameters:
cerXml - A CsdErrorReport JAXB object
Returns:
A String statement based on the supplied CsdErrorReport

formatCsdTest

public static java.lang.String formatCsdTest(ca.nrc.widar.jaxb.crm.CsdModeType m,
                                             int id)
Takes the supplied CSD mode and ID, and returns a formatted string indicating the CSD mode

Parameters:
m - The CsdModeType for this CSD mode
id - The CSD Mode ID for this CSD mode
Returns:
A String describing the CSD mode for display

formatCsdTestHtml

public static java.lang.String formatCsdTestHtml(ca.nrc.widar.jaxb.crm.CsdModeType m,
                                                 int id)
Takes the supplied CSD mode and ID, and returns a formatted string indicating the CSD mode, surrounded by HTML tags

Parameters:
m - The CsdModeType for this CSD mode
id - The CSD Mode ID for this CSD mode
Returns:
A String describing the CSD mode for display including HTML tags

formatBlbHstResultsToHtml

public static java.lang.String formatBlbHstResultsToHtml(ca.nrc.widar.jaxb.crm.Diagnostic diagXml)
A static method that returns a formatted HTML string with the results of the Hardware Self-Test (BLB)

Parameters:
diagXml - A diagnostic XML element presumeably containing a Result element
Returns:
An HTML formatted string with the contents of the Result element

formatBlbHstResultsToString

public static java.lang.String formatBlbHstResultsToString(ca.nrc.widar.jaxb.crm.Diagnostic diagXml)
A static method that returns a formatted string with the results of the Hardware Self-Test (BLB) intended for output to ASCII file

Parameters:
diagXml - A diagnostic XML element presumeably containing a Result element
Returns:
A formatted string with the contents of the Result element

formatStbHstResultsToHtml

public static java.lang.String formatStbHstResultsToHtml(ca.nrc.widar.jaxb.crm.Diagnostic diagXml)
Returns a String containing the results of an StbHST diagnostic that is formatted in HTML and intended to display to the end user.

Parameters:
diagXml - The Diagnostic containing the results of an Stb HST
Returns:
An HTML formatted string

formatStbHstResultsToString

public static java.lang.String formatStbHstResultsToString(ca.nrc.widar.jaxb.crm.Diagnostic diagXml)
Returns a String containing the results of an StbHST diagnostic that is formatted for VT100 display and intended to display to the end user.

Parameters:
diagXml - The Diagnostic containing the results of an Stb HST
Returns:
An formatted string

main

public static void main(java.lang.String[] args)
                 throws java.io.IOException
Throws:
java.io.IOException

NRAO/DRAO

National Radio Astronomy Observatory