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 DeviceControlAlarm
static DeviceControlDragIn
static DeviceControlDragOut
static DeviceControlGuard
static DeviceControlPosition
static DeviceControlIFame
static DeviceControlPtz
static DeviceControlRecordCmd
static DeviceControlTeleBoot
void
handleAlarmCmd
(DeviceControlAlarm alarmCmd) 处理告警复位命令void
handleDragZoomIn
(DeviceControlDragIn dragInCmd) 处理拉框放大命令void
handleDragZoomOut
(DeviceControlDragOut dragOutCmd) 处理拉框缩小命令void
handleGuardCmd
(DeviceControlGuard guardCmd) 处理布防/撤防命令void
handleHomePosition
(DeviceControlPosition homePositionCmd) 处理看守位命令void
handleIFameCmd
(DeviceControlIFame iFameCmd) 处理强制关键帧命令void
handlePtzCmd
(DeviceControlPtz ptzCmd) 处理云台控制命令void
handleRecordCmd
(DeviceControlRecordCmd recordCmd) 处理录像控制命令void
handleTeleBoot
(DeviceControlTeleBoot teleBootCmd) 处理远程启动命令static boolean
static boolean
static boolean
static boolean
static boolean
static boolean
static boolean
static boolean
static boolean
static void
static boolean
waitForAlarm
(long timeout, TimeUnit unit) static boolean
waitForDragIn
(long timeout, TimeUnit unit) static boolean
waitForDragOut
(long timeout, TimeUnit unit) static boolean
waitForGuard
(long timeout, TimeUnit unit) static boolean
waitForHomePosition
(long timeout, TimeUnit unit) static boolean
waitForIFame
(long timeout, TimeUnit unit) static boolean
waitForPtz
(long timeout, TimeUnit unit) static boolean
waitForRecord
(long timeout, TimeUnit unit) static boolean
waitForTeleBoot
(long timeout, TimeUnit unit)
-
Constructor Details
-
TestDeviceControlRequestHandler
public TestDeviceControlRequestHandler()
-
-
Method Details
-
handlePtzCmd
Description copied from interface:DeviceControlRequestHandler
处理云台控制命令- Specified by:
handlePtzCmd
in interfaceDeviceControlRequestHandler
-
handleGuardCmd
Description copied from interface:DeviceControlRequestHandler
处理布防/撤防命令- Specified by:
handleGuardCmd
in interfaceDeviceControlRequestHandler
-
handleAlarmCmd
Description copied from interface:DeviceControlRequestHandler
处理告警复位命令- Specified by:
handleAlarmCmd
in interfaceDeviceControlRequestHandler
-
handleTeleBoot
Description copied from interface:DeviceControlRequestHandler
处理远程启动命令- Specified by:
handleTeleBoot
in interfaceDeviceControlRequestHandler
-
handleRecordCmd
Description copied from interface:DeviceControlRequestHandler
处理录像控制命令- Specified by:
handleRecordCmd
in interfaceDeviceControlRequestHandler
-
handleIFameCmd
Description copied from interface:DeviceControlRequestHandler
处理强制关键帧命令- Specified by:
handleIFameCmd
in interfaceDeviceControlRequestHandler
-
handleDragZoomIn
Description copied from interface:DeviceControlRequestHandler
处理拉框放大命令- Specified by:
handleDragZoomIn
in interfaceDeviceControlRequestHandler
-
handleDragZoomOut
Description copied from interface:DeviceControlRequestHandler
处理拉框缩小命令- Specified by:
handleDragZoomOut
in interfaceDeviceControlRequestHandler
-
handleHomePosition
Description copied from interface:DeviceControlRequestHandler
处理看守位命令- Specified by:
handleHomePosition
in 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
-