Enum ParsedUnitsBehavior

    • Enum Constant Detail

      • IGNORE_PARSED

        public static final ParsedUnitsBehavior IGNORE_PARSED
        Ignore parsed units, just relying on CCSDS standard.

        When this behavior is selected having a unit parsed as second when CCSDS mandates kilometer will be accepted.

      • CONVERT_COMPATIBLE

        public static final ParsedUnitsBehavior CONVERT_COMPATIBLE
        Allow compatible units, performing conversion.

        When this behavior is selected having a unit parsed as second when CCSDS mandates kilometer will be refused, but having a unit parsed as meter will be accepted, with proper conversion performed. Missing units (i.e. units parsed as Unit.NONE) are considered to be standard.

      • STRICT_COMPLIANCE

        public static final ParsedUnitsBehavior STRICT_COMPLIANCE
        Enforce strict compliance with CCSDS standard.

        When this behavior is selected having a unit parsed as second or as meter when CCSDS mandates kilometer will both be refused. Missing units (i.e. units parsed as Unit.NONE) are considered to be standard.

    • Method Detail

      • values

        public static ParsedUnitsBehavior[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (ParsedUnitsBehavior c : ParsedUnitsBehavior.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static ParsedUnitsBehavior valueOf​(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified name
        NullPointerException - if the argument is null
      • select

        public abstract Unit select​(Unit message,
                                    Unit standard)
        Select the unit to use for interpreting parsed value.
        Parameters:
        message - unit parsed in the CCSDS message
        standard - unit mandated by the standard
        Returns:
        selected unit