Enum CrcSize

    • Enum Constant Detail

      • CRC_8

        public static final CrcSize CRC_8
      • CRC_16

        public static final CrcSize CRC_16
      • CRC_32

        public static final CrcSize CRC_32
      • CRC_64

        public static final CrcSize CRC_64
    • Method Detail

      • values

        public static CrcSize[] 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 (CrcSize c : CrcSize.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static CrcSize 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
      • getCrcWidth

        public int getCrcWidth()
        Retrieves the value from the CRC byte width (number of bytes used to store a CRC checksum) property.
        Specified by:
        getCrcWidth in interface CrcWidthAccessor
        Returns:
        The name stored by the CRC byte width (number of bytes used to store a CRC checksum) property.
      • toCrcCategory

        public static CrcSize toCrcCategory​(int aCrcByteWidth)
        Retrieves the CrcSize representing the queried "byte length".
        Parameters:
        aCrcByteWidth - The "byte length" for which to retrieve the according CrcSize.
        Returns:
        The according CrcSize or null if none fitting was found.