Enum Class CruiseControlEnum
java.lang.Object
java.lang.Enum<CruiseControlEnum>
io.github.lunasaw.gb28181.common.entity.control.instruction.enums.CruiseControlEnum
- All Implemented Interfaces:
Serializable
,Comparable<CruiseControlEnum>
,java.lang.constant.Constable
巡航指令枚举
根据 A.3.5 巡航指令 规范实现
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescription -
Method Summary
Modifier and TypeMethodDescriptionstatic CruiseControlEnum
getByCode
(byte code) 根据指令码查找枚举static CruiseControlEnum
根据名称查找枚举static boolean
isValidGroupNumber
(int groupNumber) 验证巡航组号是否有效static boolean
isValidPresetNumber
(int presetNumber) 验证预置位号是否有效static boolean
isValidSpeed
(int speed) 验证速度值是否有效static boolean
isValidStayTime
(int stayTime) 验证停留时间是否有效static CruiseControlEnum
Returns the enum constant of this class with the specified name.static CruiseControlEnum[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
ADD_CRUISE_POINT
-
DELETE_CRUISE_POINT
-
SET_CRUISE_SPEED
-
SET_CRUISE_STAY_TIME
-
START_CRUISE
-
-
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
-
getByCode
根据指令码查找枚举 -
getByName
根据名称查找枚举 -
isValidGroupNumber
public static boolean isValidGroupNumber(int groupNumber) 验证巡航组号是否有效- Parameters:
groupNumber
- 巡航组号 (0-255)- Returns:
- 是否有效
-
isValidPresetNumber
public static boolean isValidPresetNumber(int presetNumber) 验证预置位号是否有效- Parameters:
presetNumber
- 预置位号 (1-255)- Returns:
- 是否有效
-
isValidSpeed
public static boolean isValidSpeed(int speed) 验证速度值是否有效- Parameters:
speed
- 速度 (数据的低8位在字节6,高4位在字节7的高4位)- Returns:
- 是否有效
-
isValidStayTime
public static boolean isValidStayTime(int stayTime) 验证停留时间是否有效- Parameters:
stayTime
- 停留时间(秒) (数据的低8位在字节6,高4位在字节7的高4位)- Returns:
- 是否有效
-