Enum Class ScanControlEnum
java.lang.Object
java.lang.Enum<ScanControlEnum>
io.github.lunasaw.gb28181.common.entity.control.instruction.enums.ScanControlEnum
- All Implemented Interfaces:
Serializable
,Comparable<ScanControlEnum>
,java.lang.constant.Constable
扫描指令枚举
根据 A.3.6 扫描指令 规范实现
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionstatic ScanControlEnum
getByCode
(byte code) 根据指令码查找枚举 - 注意0x89指令码需要结合操作类型判断static ScanControlEnum
getByCodeAndOperation
(byte code, ScanControlEnum.ScanOperationType operationType) 根据指令码和操作类型查找枚举static ScanControlEnum
根据名称查找枚举static boolean
isValidGroupNumber
(int groupNumber) 验证扫描组号是否有效static boolean
isValidSpeed
(int speed) 验证扫描速度是否有效static ScanControlEnum
Returns the enum constant of this class with the specified name.static ScanControlEnum[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
START_AUTO_SCAN
-
SET_LEFT_BOUNDARY
-
SET_RIGHT_BOUNDARY
-
SET_SCAN_SPEED
-
-
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
根据指令码查找枚举 - 注意0x89指令码需要结合操作类型判断- Parameters:
code
- 指令码- Returns:
- 扫描控制枚举(对于0x89返回START_AUTO_SCAN作为默认值)
-
getByCodeAndOperation
public static ScanControlEnum getByCodeAndOperation(byte code, ScanControlEnum.ScanOperationType operationType) 根据指令码和操作类型查找枚举- Parameters:
code
- 指令码operationType
- 操作类型- Returns:
- 扫描控制枚举
-
getByName
根据名称查找枚举 -
isValidGroupNumber
public static boolean isValidGroupNumber(int groupNumber) 验证扫描组号是否有效- Parameters:
groupNumber
- 扫描组号 (0-255)- Returns:
- 是否有效
-
isValidSpeed
public static boolean isValidSpeed(int speed) 验证扫描速度是否有效- Parameters:
speed
- 扫描速度 (数据的低8位在字节6,高4位在字节7的高4位)- Returns:
- 是否有效
-