|
@@ -40,21 +40,64 @@ public interface TcpAction {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ enum PhoneAction implements TcpAction {
|
|
|
+ CALL("呼叫"),
|
|
|
+ ACCEPT("接受呼叫"),
|
|
|
+ REJECT("拒绝"),
|
|
|
+ CALLING("通话中"),
|
|
|
+ HANDOFF("挂断"),
|
|
|
+ DATA("数据传输"),
|
|
|
+ CANCEL("取消");
|
|
|
+
|
|
|
+
|
|
|
+ private String description;
|
|
|
+ PhoneAction(String description){
|
|
|
+ this.description = description;
|
|
|
+ }
|
|
|
+
|
|
|
+ public String getDescription() {
|
|
|
+ return description;
|
|
|
+ }
|
|
|
+
|
|
|
+ public String getName(){
|
|
|
+ return this.name();
|
|
|
+ }
|
|
|
+
|
|
|
+ private final static Map<String , PhoneAction> ENUM_MAP = new HashMap<String, PhoneAction>();
|
|
|
+ static {
|
|
|
+ for(PhoneAction v : values()) {
|
|
|
+ ENUM_MAP.put(v.toString() , v);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ public static PhoneAction fromString(String v) {
|
|
|
+ PhoneAction userOptionEnum = ENUM_MAP.get(v);
|
|
|
+ return userOptionEnum == null ? CALL :userOptionEnum;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
enum VoiceAction implements TcpAction {
|
|
|
CALL("呼叫"),
|
|
|
ACCEPT("接受呼叫"),
|
|
|
+ ACCEPTED("已接听"),
|
|
|
REJECT("拒绝"),
|
|
|
CALLING("通话中"),
|
|
|
TRANSFER("转接"),
|
|
|
HANDOFF("挂断"),
|
|
|
CANCEL("取消"),
|
|
|
+ PCALLING("已经通话中"),
|
|
|
+ VOICE_OFF("通话被接听"),
|
|
|
RS485CALL("485界面发起呼叫"),
|
|
|
RS485CANCEL("485界面呼叫取消"),
|
|
|
+ RS485CANCEL_BY_DOOR("485门口机取消房间内的呼叫"),
|
|
|
RS485HANDOFF("485界面挂断"),
|
|
|
RS485ACCEPT("485界面接听"),
|
|
|
RS485REJECT("485界面拒绝"),
|
|
|
SUCCESS("呼叫成功"),
|
|
|
- FAILED("呼叫失败");
|
|
|
+ FAILED("呼叫失败"),
|
|
|
+ GAIN_CALL("应答"),
|
|
|
+ GAIN_OK("应答成功"),
|
|
|
+ GAIN_FAIL("应答失败"),
|
|
|
+ GAINED("呼叫被应答");
|
|
|
|
|
|
|
|
|
private String description;
|
|
@@ -124,7 +167,18 @@ public interface TcpAction {
|
|
|
|
|
|
enum SOSAction implements TcpAction {
|
|
|
CALL("紧急呼叫"),
|
|
|
- CANCEL("取消");
|
|
|
+ CANCEL("取消"),
|
|
|
+ ALARM_TEST("测试报警"),
|
|
|
+ ALARM_INTRUSION("侵入报警"),
|
|
|
+ ALARM_ON_EIGHT_HOURS("八小时无人报警"),
|
|
|
+ ALARM_ON_TWELVE_HOURS("十二小时无人报警"),
|
|
|
+ ALARM_ON_TWENTY_FOUR_HOURS("二十四小时无人报警"),
|
|
|
+ ALARM_DISASSEMBLE("防拆报警"),
|
|
|
+ ALARM_FAULT("故障报警"),
|
|
|
+ ALARM_DOOR_LOCK("门磁报警"),
|
|
|
+ ALARM_SMOKE("烟感报警"),
|
|
|
+ ALARM_GAS("燃气报警"),
|
|
|
+ ALARM_WATER_OVERFLOW("浸水报警");
|
|
|
|
|
|
private String description;
|
|
|
SOSAction(String description){
|
|
@@ -151,10 +205,40 @@ public interface TcpAction {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ enum ReinforceAction implements TcpAction {
|
|
|
+ CALL("增援"),
|
|
|
+ RESPONSED("已响应");
|
|
|
+
|
|
|
+ private String description;
|
|
|
+ ReinforceAction(String description){
|
|
|
+ this.description = description;
|
|
|
+ }
|
|
|
+
|
|
|
+ public String getDescription() {
|
|
|
+ return description;
|
|
|
+ }
|
|
|
+
|
|
|
+ public String getName(){
|
|
|
+ return this.name();
|
|
|
+ }
|
|
|
+
|
|
|
+ private final static Map<String , ReinforceAction> ENUM_MAP = new HashMap<String, ReinforceAction>();
|
|
|
+ static {
|
|
|
+ for(ReinforceAction v : values()) {
|
|
|
+ ENUM_MAP.put(v.toString() , v);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ public static ReinforceAction fromString(String v) {
|
|
|
+ ReinforceAction userOptionEnum = ENUM_MAP.get(v);
|
|
|
+ return userOptionEnum == null ? CALL :userOptionEnum;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
enum IMAction implements TcpAction {
|
|
|
MSG("语音留言"),
|
|
|
- MSG_READ("语音留言已读");
|
|
|
+ MSG_READ("语音留言已读"),
|
|
|
+ RECEIVED("客户端收到确认");
|
|
|
|
|
|
private String description;
|
|
|
IMAction(String description){
|
|
@@ -182,6 +266,37 @@ public interface TcpAction {
|
|
|
|
|
|
}
|
|
|
|
|
|
+ enum CHANNELIMAction implements TcpAction {
|
|
|
+ MSG("语音留言"),
|
|
|
+ MSG_READ("语音留言已读"),
|
|
|
+ RECEIVED("接收端收到确认");
|
|
|
+
|
|
|
+ private String description;
|
|
|
+ CHANNELIMAction(String description){
|
|
|
+ this.description = description;
|
|
|
+ }
|
|
|
+
|
|
|
+ public String getDescription() {
|
|
|
+ return description;
|
|
|
+ }
|
|
|
+
|
|
|
+ public String getName(){
|
|
|
+ return this.name();
|
|
|
+ }
|
|
|
+
|
|
|
+ private final static Map<String , CHANNELIMAction> ENUM_MAP = new HashMap<String, CHANNELIMAction>();
|
|
|
+ static {
|
|
|
+ for(CHANNELIMAction v : values()) {
|
|
|
+ ENUM_MAP.put(v.toString() , v);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ public static CHANNELIMAction fromString(String v) {
|
|
|
+ CHANNELIMAction userOptionEnum = ENUM_MAP.get(v);
|
|
|
+ return userOptionEnum == null ? MSG_READ :userOptionEnum;
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
enum DeviceAction implements TcpAction {
|
|
|
RESTART("重启"),
|
|
|
CONNECT("连接"),
|
|
@@ -217,7 +332,11 @@ public interface TcpAction {
|
|
|
|
|
|
enum EventAction implements TcpAction {
|
|
|
KEY_CLICK("按键事件"),
|
|
|
- RESPONSE("已响应");
|
|
|
+ RESPONSE("已响应"),
|
|
|
+ RECEIVED("接收端收到确认"),
|
|
|
+ CANCEL("取消"),
|
|
|
+ CANCEL_CONFIRM("接收端确认收到取消"),
|
|
|
+ COMPLETED("完成");
|
|
|
private String description;
|
|
|
EventAction(String description){
|
|
|
this.description = description;
|
|
@@ -242,6 +361,40 @@ public interface TcpAction {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ enum SideAction implements TcpAction {
|
|
|
+ CALL("呼叫"),
|
|
|
+ ACCEPT("接听"),
|
|
|
+ CANCEL("结束"),
|
|
|
+ SOS_CALL("紧急呼叫"),
|
|
|
+ SOS_CANCEL("取消"),
|
|
|
+ NURSING("护理"),
|
|
|
+ NURSING_END("护理结束");
|
|
|
+ private String description;
|
|
|
+ SideAction(String description){
|
|
|
+ this.description = description;
|
|
|
+ }
|
|
|
+ public String getDescription() {
|
|
|
+ return description;
|
|
|
+ }
|
|
|
+
|
|
|
+ public String getName(){
|
|
|
+ return this.name();
|
|
|
+ }
|
|
|
+
|
|
|
+ private final static Map<String , SideAction> ENUM_MAP = new HashMap<String, SideAction>();
|
|
|
+ static {
|
|
|
+ for(SideAction v : values()) {
|
|
|
+ ENUM_MAP.put(v.toString() , v);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ public static SideAction fromString(String v) {
|
|
|
+ SideAction userOptionEnum = ENUM_MAP.get(v);
|
|
|
+ return userOptionEnum == null ? CALL :userOptionEnum;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
enum DataAction implements TcpAction {
|
|
|
REFRESH("刷新数据"),
|
|
|
INTERACTION("刷新交互列表");
|
|
@@ -321,4 +474,44 @@ public interface TcpAction {
|
|
|
return userOptionEnum == null ? SYNC :userOptionEnum;
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ enum EntraceGuardAction implements TcpAction {
|
|
|
+ STRANGER("陌生访客"),
|
|
|
+ LOCKDOOR("锁门"),
|
|
|
+ UNLOCKDOOR("开门"),
|
|
|
+ ACCEPT("主机接受视频"),//通话空闲时自动接受
|
|
|
+ REJECT("拒绝"), // 通话忙时自动拒接
|
|
|
+ OPENSPEAKER("打开麦克风"),//护士主机打开麦克风,门禁机也打开,双方停止等待音乐,打开后可以通话,默认只有视频界面,没有声音
|
|
|
+ CLOSESPEAKER("关闭麦克风"),//关闭音频
|
|
|
+ SUCCESS("连接主机成功"),
|
|
|
+ HANGUP("挂断"),
|
|
|
+ TIMEOUT("响应超时"),
|
|
|
+ FAILED("连接失败");
|
|
|
+
|
|
|
+
|
|
|
+ private String description;
|
|
|
+
|
|
|
+ EntraceGuardAction(String description) {
|
|
|
+ this.description = description;
|
|
|
+ }
|
|
|
+ public String getDescription() {
|
|
|
+ return description;
|
|
|
+ }
|
|
|
+
|
|
|
+ public String getName(){
|
|
|
+ return this.name();
|
|
|
+ }
|
|
|
+
|
|
|
+ private final static Map<String , EntraceGuardAction> ENUM_MAP = new HashMap<String, EntraceGuardAction>();
|
|
|
+ static {
|
|
|
+ for(EntraceGuardAction v : values()) {
|
|
|
+ ENUM_MAP.put(v.toString() , v);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ public static EntraceGuardAction fromString(String v) {
|
|
|
+ EntraceGuardAction userOptionEnum = ENUM_MAP.get(v);
|
|
|
+ return userOptionEnum;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
}
|