Class TestDeviceControlRequestHandler
java.lang.Object
io.github.lunasaw.gbproxy.test.handler.TestDeviceControlRequestHandler
- All Implemented Interfaces:
DeviceControlRequestHandler
@Component
public class TestDeviceControlRequestHandler
extends Object
implements DeviceControlRequestHandler
用于端到端测试DeviceControl命令的测试Handler,支持各类命令的回调、同步和断言
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic DeviceControlAlarmstatic DeviceControlDragInstatic DeviceControlDragOutstatic DeviceControlGuardstatic DeviceControlPositionstatic DeviceControlIFamestatic DeviceControlPtzstatic DeviceControlRecordCmdstatic DeviceControlTeleBootvoidhandleAlarmCmd(DeviceControlAlarm alarmCmd) 处理告警复位命令voidhandleDragZoomIn(DeviceControlDragIn dragInCmd) 处理拉框放大命令voidhandleDragZoomOut(DeviceControlDragOut dragOutCmd) 处理拉框缩小命令voidhandleGuardCmd(DeviceControlGuard guardCmd) 处理布防/撤防命令voidhandleHomePosition(DeviceControlPosition homePositionCmd) 处理看守位命令voidhandleIFameCmd(DeviceControlIFame iFameCmd) 处理强制关键帧命令voidhandlePtzCmd(DeviceControlPtz ptzCmd) 处理云台控制命令voidhandleRecordCmd(DeviceControlRecordCmd recordCmd) 处理录像控制命令voidhandleTeleBoot(DeviceControlTeleBoot teleBootCmd) 处理远程启动命令static booleanstatic booleanstatic booleanstatic booleanstatic booleanstatic booleanstatic booleanstatic booleanstatic booleanstatic voidstatic booleanwaitForAlarm(long timeout, TimeUnit unit) static booleanwaitForDragIn(long timeout, TimeUnit unit) static booleanwaitForDragOut(long timeout, TimeUnit unit) static booleanwaitForGuard(long timeout, TimeUnit unit) static booleanwaitForHomePosition(long timeout, TimeUnit unit) static booleanwaitForIFame(long timeout, TimeUnit unit) static booleanwaitForPtz(long timeout, TimeUnit unit) static booleanwaitForRecord(long timeout, TimeUnit unit) static booleanwaitForTeleBoot(long timeout, TimeUnit unit)
-
Constructor Details
-
TestDeviceControlRequestHandler
public TestDeviceControlRequestHandler()
-
-
Method Details
-
handlePtzCmd
Description copied from interface:DeviceControlRequestHandler处理云台控制命令- Specified by:
handlePtzCmdin interfaceDeviceControlRequestHandler
-
handleGuardCmd
Description copied from interface:DeviceControlRequestHandler处理布防/撤防命令- Specified by:
handleGuardCmdin interfaceDeviceControlRequestHandler
-
handleAlarmCmd
Description copied from interface:DeviceControlRequestHandler处理告警复位命令- Specified by:
handleAlarmCmdin interfaceDeviceControlRequestHandler
-
handleTeleBoot
Description copied from interface:DeviceControlRequestHandler处理远程启动命令- Specified by:
handleTeleBootin interfaceDeviceControlRequestHandler
-
handleRecordCmd
Description copied from interface:DeviceControlRequestHandler处理录像控制命令- Specified by:
handleRecordCmdin interfaceDeviceControlRequestHandler
-
handleIFameCmd
Description copied from interface:DeviceControlRequestHandler处理强制关键帧命令- Specified by:
handleIFameCmdin interfaceDeviceControlRequestHandler
-
handleDragZoomIn
Description copied from interface:DeviceControlRequestHandler处理拉框放大命令- Specified by:
handleDragZoomInin interfaceDeviceControlRequestHandler
-
handleDragZoomOut
Description copied from interface:DeviceControlRequestHandler处理拉框缩小命令- Specified by:
handleDragZoomOutin interfaceDeviceControlRequestHandler
-
handleHomePosition
Description copied from interface:DeviceControlRequestHandler处理看守位命令- Specified by:
handleHomePositionin interfaceDeviceControlRequestHandler
-
resetTestState
public static void resetTestState() -
waitForPtz
- Throws:
InterruptedException
-
hasReceivedPtz
public static boolean hasReceivedPtz() -
getReceivedPtz
-
waitForGuard
- Throws:
InterruptedException
-
hasReceivedGuard
public static boolean hasReceivedGuard() -
getReceivedGuard
-
waitForAlarm
- Throws:
InterruptedException
-
hasReceivedAlarm
public static boolean hasReceivedAlarm() -
getReceivedAlarm
-
waitForTeleBoot
- Throws:
InterruptedException
-
hasReceivedTeleBoot
public static boolean hasReceivedTeleBoot() -
getReceivedTeleBoot
-
waitForRecord
- Throws:
InterruptedException
-
hasReceivedRecord
public static boolean hasReceivedRecord() -
getReceivedRecord
-
waitForIFame
- Throws:
InterruptedException
-
hasReceivedIFame
public static boolean hasReceivedIFame() -
getReceivedIFame
-
waitForDragIn
- Throws:
InterruptedException
-
hasReceivedDragIn
public static boolean hasReceivedDragIn() -
getReceivedDragIn
-
waitForDragOut
- Throws:
InterruptedException
-
hasReceivedDragOut
public static boolean hasReceivedDragOut() -
getReceivedDragOut
-
waitForHomePosition
- Throws:
InterruptedException
-
hasReceivedHomePosition
public static boolean hasReceivedHomePosition() -
getReceivedHomePosition
-