Package org.yamcs.studio.data
Enum Class FormatEnum
- All Implemented Interfaces:
Serializable
,Comparable<FormatEnum>
,Constable
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 ConstantDescriptionIf 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 0xFDC205Display 64 bits value in HEX for example 0xF0DEADBEEFThe 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 secondsSame as sexagesimal except that the number is assumed to be in radians and is expressed as hours, minutes, and secondsIf 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 TypeMethodDescriptionstatic String[]
toString()
static FormatEnum
Returns the enum constant of this class with the specified name.static FormatEnum[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
DEFAULT
The default format type when user doesn't explicitly set the format type. -
DECIMAL
Format it as a decimal. -
EXP
Exponential format. For example, 2.023E10 -
HEX
Hex 32 format, for example 0xFDC205 -
STRING
If possible, convert it to a string. If it is a number or number array, treat it as char or char array. -
HEX64
Display 64 bits value in HEX for example 0xF0DEADBEEF -
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
Engineering format (exponent is power of three). For example, 20.23E9 -
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
Same as sexagesimal except that the number is assumed to be in radians and is expressed as hours, minutes, and seconds -
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
When the value is numeric, interpret that value as unix milliseconds, and print a timestamp.
-
-
Method Details
-
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
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 nameNullPointerException
- if the argument is null
-
toString
- Overrides:
toString
in classEnum<FormatEnum>
-
stringValues
-