java.lang.Object
java.lang.Enum<PresetControlEnum>
io.github.lunasaw.gb28181.common.entity.control.instruction.enums.PresetControlEnum
All Implemented Interfaces:
Serializable, Comparable<PresetControlEnum>, java.lang.constant.Constable

public enum PresetControlEnum extends Enum<PresetControlEnum>
预置位指令枚举 根据 A.3.4 预置位指令 规范实现

预置位数目最大为255,0号预留

  • Enum Constant Details

  • Method Details

    • values

      public static PresetControlEnum[] 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 PresetControlEnum 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
    • getByCode

      public static PresetControlEnum getByCode(byte code)
      根据指令码查找枚举
    • getByName

      public static PresetControlEnum getByName(String name)
      根据名称查找枚举
    • isValidPresetNumber

      public static boolean isValidPresetNumber(int presetNumber)
      验证预置位号是否有效
      Parameters:
      presetNumber - 预置位号 (1-255)
      Returns:
      是否有效