Enum Class FormatEnum

java.lang.Object
java.lang.Enum<FormatEnum>
org.yamcs.studio.data.FormatEnum
All Implemented Interfaces:
Serializable, Comparable<FormatEnum>, Constable

public enum FormatEnum extends Enum<FormatEnum>
The format enumeration for formating a pv value to string. The order of the format enumeration should be not be changed to keep the opi compatibility.
  • Nested Class Summary

    Nested classes/interfaces inherited from class java.lang.Enum

    Enum.EnumDesc<E extends Enum<E>>
  • Enum Constant Summary

    Enum Constants
    Enum Constant
    Description
    If it is numeric value, automatically display it in decimal or exponential based on the value digits to make sure the string won't be too long.
    Format it as a decimal.
    The default format type when user doesn't explicitly set the format type.
    Engineering format (exponent is power of three).
    Exponential format.
    Hex 32 format, for example 0xFDC205
    Display 64 bits value in HEX for example 0xF0DEADBEEF
    The text is in degrees or hours, minutes, and seconds with colons between the three fields.
    Same as sexagesimal except that the number is assumed to be in radians and is expressed as degrees, minutes, and seconds
    Same as sexagesimal except that the number is assumed to be in radians and is expressed as hours, minutes, and seconds
    If possible, convert it to a string.
    When the value is numeric, interpret that value as unix milliseconds, and print a timestamp.
  • Method Summary

    Modifier and Type
    Method
    Description
    static String[]
     
     
    static FormatEnum
    Returns the enum constant of this class with the specified name.
    static FormatEnum[]
    Returns an array containing the constants of this enum class, in the order they are declared.

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • DEFAULT

      public static final FormatEnum DEFAULT
      The default format type when user doesn't explicitly set the format type.
    • DECIMAL

      public static final FormatEnum DECIMAL
      Format it as a decimal.
    • EXP

      public static final FormatEnum EXP
      Exponential format. For example, 2.023E10
    • HEX

      public static final FormatEnum HEX
      Hex 32 format, for example 0xFDC205
    • STRING

      public static final FormatEnum STRING
      If possible, convert it to a string. If it is a number or number array, treat it as char or char array.
    • HEX64

      public static final FormatEnum HEX64
      Display 64 bits value in HEX for example 0xF0DEADBEEF
    • COMPACT

      public static final FormatEnum COMPACT
      If it is numeric value, automatically display it in decimal or exponential based on the value digits to make sure the string won't be too long. The recommended digits is 4.
    • ENG

      public static final FormatEnum ENG
      Engineering format (exponent is power of three). For example, 20.23E9
    • SEXA

      public static final FormatEnum SEXA
      The text is in degrees or hours, minutes, and seconds with colons between the three fields. For example 12:45:10.2
    • SEXA_HMS

      public static final FormatEnum SEXA_HMS
      Same as sexagesimal except that the number is assumed to be in radians and is expressed as hours, minutes, and seconds
    • SEXA_DMS

      public static final FormatEnum SEXA_DMS
      Same as sexagesimal except that the number is assumed to be in radians and is expressed as degrees, minutes, and seconds
    • TIME_STRING

      public static final FormatEnum TIME_STRING
      When the value is numeric, interpret that value as unix milliseconds, and print a timestamp.
  • Method Details

    • values

      public static FormatEnum[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static FormatEnum valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • toString

      public String toString()
      Overrides:
      toString in class Enum<FormatEnum>
    • stringValues

      public static String[] stringValues()