ソースを参照

3128总控主机增加语音播报床号为数字或数值模式,优化紧急呼叫处理

weizhengliang 2 年 前
コミット
d491d12941

+ 12 - 1
android_host_manager/src/main/zk_h10_wke_1h/res/layout/fragment_system_settings.xml

@@ -18,13 +18,24 @@
                 android:layout_marginLeft="10px"
                 android:orientation="vertical">
 
+                <TextView
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:layout_marginTop="6dp"
+                    android:layout_marginBottom="6dp"
+                    android:gravity="center"
+                    android:text="@string/str_settings"
+                    android:textColor="#000000"
+                    android:textSize="20sp" />
+
                 <LinearLayout
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
                     android:background="#ffffff"
                     android:layout_gravity="center_vertical"
                     android:orientation="vertical"
-                    android:paddingLeft="6px">
+                    android:paddingLeft="6px"
+                    android:visibility="gone">
 
                     <TextView
                         android:layout_width="wrap_content"

+ 12 - 2
android_host_manager/src/main/zk_h10_z3128_1h/java/com/wdkl/ncs/android/component/nursehome/activity/NurseHomeActivity.kt

@@ -21,6 +21,7 @@ import android.view.View
 import com.alibaba.fastjson.JSON
 import com.enation.javashop.android.jrouter.external.annotation.Router
 import com.enation.javashop.net.engine.model.NetState
+import com.google.common.base.Strings
 import com.google.gson.Gson
 import com.wdkl.ncs.android.component.nursehome.BuildConfig
 import com.wdkl.ncs.android.component.nursehome.R
@@ -1101,7 +1102,10 @@ class NurseHomeActivity  : BaseActivity<NurseHomeActivityPresenter, ActivityNurs
                     }*/
                 } else if (tcpModel.type == TcpType.SOS) {
                     val interactionVO = Gson().fromJson(tcpModel.data.toString(), InteractionVO::class.java)
-                    if (tcpModel.action == TcpAction.SOSAction.CALL || tcpModel.action == TcpAction.SOSAction.ROOM_CALL) {
+                    if (tcpModel.action == TcpAction.SOSAction.CALL
+                        || tcpModel.action == TcpAction.SOSAction.ROOM_CALL
+                        || tcpModel.action == TcpAction.SOSAction.OTHER_CALL
+                        || tcpModel.action == TcpAction.SOSAction.PART_USER_CALL) {
                         //紧急呼叫优先级最高,如果当前有通话或正在呼叫的需要将其打断
                         RingPlayHelper.stopRingTone()
                         if (Constants.CALL_STATE == Constants.CALL_OUTGOING) {
@@ -1125,7 +1129,13 @@ class NurseHomeActivity  : BaseActivity<NurseHomeActivityPresenter, ActivityNurs
                         if (SettingConfig.getTtsMode(activity) == SettingConfig.TTS_OFF) {
                             RingPlayHelper.playRingTone(activity, R.raw.sos2, false)
                         } else {
-                            SpeechUtil.getInstance().addSpeech(sosName + "紧急呼叫", true)
+                            if (!Strings.isNullOrEmpty(interactionVO.data)) {
+                                val speakText = Util.appendSpace(interactionVO.data.replace("-", ""))
+                                SpeechUtil.getInstance().addSpeech(speakText,true)
+                            } else {
+                                val text = BaseApplication.appContext.getString(R.string.sos_call_speech, sosName)
+                                SpeechUtil.getInstance().addSpeech(text, true)
+                            }
                         }
 
                         //只有存在后备id的时候才做呼叫转接

+ 2 - 1
android_host_manager/src/main/zk_h10_z3128_1h/java/com/wdkl/ncs/android/component/nursehome/fragment/CallRecordsFragment.kt

@@ -19,6 +19,7 @@ import com.wdkl.ncs.android.component.nursehome.settingconfig.SettingConfig
 import com.wdkl.ncs.android.component.nursehome.util.LedHelper
 import com.wdkl.ncs.android.component.nursehome.util.RingPlayHelper
 import com.wdkl.ncs.android.component.nursehome.util.SpeechUtil
+import com.wdkl.ncs.android.component.nursehome.util.Util
 import com.wdkl.ncs.android.lib.base.BaseFragment
 import com.wdkl.ncs.android.lib.utils.showMessage
 import com.wdkl.ncs.android.lib.vo.filter
@@ -317,7 +318,7 @@ class CallRecordsFragment: BaseFragment<CallRecordsFragmentPresenter, FragmentCa
                             && Constants.CALL_STATE != Constants.CALL_VISIT_CALLING
                         ) {
                             if (SettingConfig.getTtsMode(activity) == SettingConfig.TTS_ON) {
-                                val frameName = interactionVO.fromFrameFullName.replace("-", "")
+                                val frameName = Util.appendSpace(interactionVO.fromFrameFullName.replace("-", ","))
                                 SpeechUtil.getInstance().addSpeech(frameName + "呼叫", false)
                             } else {
                                 RingPlayHelper.playRingTone(activity, R.raw.ring_tone, true)

+ 17 - 6
android_host_manager/src/main/zk_h10_z3128_1h/java/com/wdkl/ncs/android/component/nursehome/fragment/SystemSettingsFragment.kt

@@ -85,6 +85,12 @@ class SystemSettingsFragment:BaseFragment<SystemSettingsPresenter,FragmentSystem
             radio_transfer_off.isChecked = true
         }
 
+        if (SettingConfig.getVoiceNumeric(activity)) {
+            radio_voice_numeric_on.isChecked = true
+        } else {
+            radio_voice_numeric_off.isChecked = true
+        }
+
         //todo 这里实际是应该从服务器拿或者本地拿数据显示
         //语音播报次数
         call_number_tv.text = SettingConfig.getCallNumber(this.activity).toString()
@@ -231,7 +237,7 @@ class SystemSettingsFragment:BaseFragment<SystemSettingsPresenter,FragmentSystem
             }
 
             if (clickTimes > 9) {
-                openNetwrokDebug()
+                openNetworkDebug()
                 clickTimes = 1
             }
             clickTime = time
@@ -243,7 +249,7 @@ class SystemSettingsFragment:BaseFragment<SystemSettingsPresenter,FragmentSystem
     }
 
     //开启网络调试
-    private fun openNetwrokDebug() {
+    private fun openNetworkDebug() {
         val commands = arrayListOf(
             "/system/bin/sh",
             "setprop service.adb.tcp.port 5555",
@@ -278,7 +284,7 @@ class SystemSettingsFragment:BaseFragment<SystemSettingsPresenter,FragmentSystem
      *绑定事件
      */
     override fun bindEvent() {
-//白昼监听
+        //白昼监听
         doubleslide_withoutrule.setOnRangeListener { low, big, lowTime, bigTime ->
             SettingConfig.setInitialDayTimeLocation(this.activity, String.format("%.0f", low))
             SettingConfig.setInitialDayTime(this.activity,lowTime)
@@ -314,6 +320,14 @@ class SystemSettingsFragment:BaseFragment<SystemSettingsPresenter,FragmentSystem
             }
         }
 
+        group_call_voice_numeric.setOnCheckedChangeListener { group, checkedId ->
+            if (checkedId == R.id.radio_voice_numeric_on) {
+                SettingConfig.setVoiceNumeric(activity, true)
+            } else {
+                SettingConfig.setVoiceNumeric(activity, false)
+            }
+        }
+
         //播报次数加减
         call_number_decrease_tv.setOnClickListener(this)
         call_number_add_tv.setOnClickListener(this)
@@ -570,12 +584,9 @@ class SystemSettingsFragment:BaseFragment<SystemSettingsPresenter,FragmentSystem
      * 设置系统音量
      */
     fun setTheSystemVolume(value:Int){
-        //todo 这里需要优化 滑动的时候会调起很多个打开权限的界面
         if (value <= 15) {
             val nm = this.activity.getSystemService(Context.NOTIFICATION_SERVICE) as NotificationManager
             if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M && !nm.isNotificationPolicyAccessGranted) {
-//                showAlterDialog()
-
                 val intent = Intent(Settings.ACTION_NOTIFICATION_POLICY_ACCESS_SETTINGS)
                 startActivity(intent)
 

+ 11 - 1
android_host_manager/src/main/zk_h10_z3128_1h/java/com/wdkl/ncs/android/component/nursehome/settingconfig/SettingConfig.java

@@ -27,7 +27,7 @@ public class SettingConfig {
 
     //播报次数
     private static final String KEY_SP_CALL_NUMBER = "KEY_SP_CALL_NUMBER";
-    private static final int call_number = 2;
+    private static final int call_number = 3;
 
     //主机白天亮度
     private static final String KEY_SP_MAIN_ENGINE_DAYTIME_BRIGHTNESS = "KEY_SP_MAIN_ENGINE_DAYTIME_BRIGHTNESS";
@@ -128,6 +128,8 @@ public class SettingConfig {
     //呼叫转移开关
     private static final String KEY_SP_CALL_TRANSFER = "KEY_SP_CALL_TRANSFER";
 
+    private static final String KEY_SP_VOICE_NUMERIC = "KEY_SP_VOICE_NUMERIC";
+
     //语音播报模式
     public static int getTtsMode(Context context) {
         return getSP(context).getInt(KEY_SP_TTS_MODE, TTS_ON);
@@ -145,6 +147,14 @@ public class SettingConfig {
         getEditor(context).putBoolean(KEY_SP_CALL_TRANSFER, on).apply();
     }
 
+    public static boolean getVoiceNumeric(Context context) {
+        return getSP(context).getBoolean(KEY_SP_VOICE_NUMERIC, true);
+    }
+
+    public static void setVoiceNumeric(Context context, boolean enable) {
+        getEditor(context).putBoolean(KEY_SP_VOICE_NUMERIC, enable).apply();
+    }
+
     /**
      * 获取播报次数
      *

+ 3 - 1
android_host_manager/src/main/zk_h10_z3128_1h/java/com/wdkl/ncs/android/component/nursehome/util/LedHelper.java

@@ -11,9 +11,11 @@ import com.wdkl.ncs.android.middleware.utils.CommonUtils;
 
 public class LedHelper {
 
+    private static final boolean ledDisable = true;
+
     public static void updateLedInfo(InteractionVO interactionVO, boolean isAdd, boolean emergency) {
         //总控主机不控制点阵屏,直接返回
-        if (true) {
+        if (ledDisable) {
             return;
         }
 

+ 73 - 0
android_host_manager/src/main/zk_h10_z3128_1h/java/com/wdkl/ncs/android/component/nursehome/util/Util.kt

@@ -0,0 +1,73 @@
+package com.wdkl.ncs.android.component.nursehome.util
+
+import android.annotation.SuppressLint
+import android.app.KeyguardManager
+import android.content.Context
+import android.content.Context.KEYGUARD_SERVICE
+import android.os.PowerManager
+import android.util.DisplayMetrics
+import android.view.WindowManager
+import com.wdkl.ncs.android.component.nursehome.settingconfig.SettingConfig
+import com.wdkl.ncs.android.lib.base.BaseApplication
+
+
+object Util {
+
+    /**
+     * 亮屏并解锁
+     */
+    @SuppressLint("InvalidWakeLockTag")
+    fun wakeUpAndUnlock(): PowerManager.WakeLock? {
+        val pm = BaseApplication.appContext.getSystemService(Context.POWER_SERVICE) as PowerManager
+        var wakeLock: PowerManager.WakeLock? = null
+
+        val screenOn = pm.isInteractive
+        if (!screenOn) { //如果是熄灭状态
+            wakeLock = pm.newWakeLock(PowerManager.ACQUIRE_CAUSES_WAKEUP or PowerManager.SCREEN_DIM_WAKE_LOCK, "TAG")
+            wakeLock.acquire(10000)//亮屏
+        }
+
+        // 屏幕解锁
+        val keyguardManager = BaseApplication.appContext.getSystemService(KEYGUARD_SERVICE) as KeyguardManager
+        val keyguardLock = keyguardManager.newKeyguardLock("unLock")
+        // 屏幕锁定
+        keyguardLock.reenableKeyguard()
+        keyguardLock.disableKeyguard() // 解锁
+        return wakeLock
+    }
+
+    @SuppressLint("InvalidWakeLockTag")
+    fun getCpuWakeLock(context: Context): PowerManager.WakeLock? {
+        val pm = context.getSystemService(Context.POWER_SERVICE) as PowerManager
+        val cpuWakeLock = pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK,
+                context.javaClass.canonicalName)
+        return cpuWakeLock
+    }
+
+    fun appendSpace(para: String): String {
+        if (SettingConfig.getVoiceNumeric(BaseApplication.appContext)) {
+            val length = para.length
+            val value = CharArray(length shl 1)
+            var i = 0
+            var j = 0
+            while (i < length) {
+                value[j] = para[i]
+                value[1 + j] = ' '
+                ++i
+                j = i shl 1
+            }
+            return String(value)
+        } else {
+            return para
+        }
+    }
+
+
+
+    fun getPixelsFromDp(context: Context, size: Int): Int {
+        val metrics = DisplayMetrics()
+        val wm = context.getSystemService(Context.WINDOW_SERVICE) as WindowManager
+        wm.getDefaultDisplay().getMetrics(metrics)
+        return size * metrics.densityDpi / DisplayMetrics.DENSITY_DEFAULT
+    }
+}

+ 55 - 3
android_host_manager/src/main/zk_h10_z3128_1h/res/layout/fragment_system_settings.xml

@@ -18,13 +18,24 @@
                 android:layout_marginLeft="10px"
                 android:orientation="vertical">
 
+                <TextView
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:layout_marginTop="6dp"
+                    android:layout_marginBottom="6dp"
+                    android:gravity="center"
+                    android:text="@string/str_settings"
+                    android:textColor="#000000"
+                    android:textSize="20sp" />
+
                 <LinearLayout
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
                     android:background="#ffffff"
                     android:layout_gravity="center_vertical"
                     android:orientation="vertical"
-                    android:paddingLeft="6px">
+                    android:paddingLeft="6px"
+                    android:visibility="gone">
 
                     <TextView
                         android:layout_width="wrap_content"
@@ -103,6 +114,45 @@
                     </LinearLayout>
 
                     <LinearLayout
+                        android:id="@+id/ll_call_voice_numeric"
+                        android:layout_width="match_parent"
+                        android:layout_height="wrap_content"
+                        android:layout_marginTop="2dp"
+                        android:layout_marginBottom="10px"
+                        android:orientation="horizontal">
+
+                        <TextView
+                            android:layout_width="wrap_content"
+                            android:layout_height="wrap_content"
+                            android:layout_gravity="center_vertical"
+                            android:text="语音播报为数字:"
+                            android:textColor="#000000"
+                            android:textSize="14px" />
+
+                        <RadioGroup
+                            android:id="@+id/group_call_voice_numeric"
+                            android:layout_width="wrap_content"
+                            android:layout_height="wrap_content"
+                            android:orientation="horizontal">
+
+                            <RadioButton
+                                android:id="@+id/radio_voice_numeric_on"
+                                android:layout_width="wrap_content"
+                                android:layout_height="wrap_content"
+                                android:text="@string/setting_call_forwarding_enable"
+                                android:textSize="14px" />
+
+                            <RadioButton
+                                android:id="@+id/radio_voice_numeric_off"
+                                android:layout_width="wrap_content"
+                                android:layout_height="wrap_content"
+                                android:text="@string/setting_call_forwarding_disable"
+                                android:textSize="14px" />
+                        </RadioGroup>
+
+                    </LinearLayout>
+
+                    <LinearLayout
                         android:layout_width="match_parent"
                         android:layout_height="wrap_content"
                         android:layout_marginTop="2dp"
@@ -624,7 +674,8 @@
                         android:layout_height="wrap_content"
                         android:layout_marginTop="2dp"
                         android:layout_marginBottom="10px"
-                        android:orientation="horizontal">
+                        android:orientation="horizontal"
+                        android:visibility="gone">
 
                         <TextView
                             android:layout_width="wrap_content"
@@ -1130,7 +1181,8 @@
                     android:layout_marginTop="4px"
                     android:background="#ffffff"
                     android:orientation="vertical"
-                    android:paddingLeft="6px">
+                    android:paddingLeft="6px"
+                    android:visibility="gone">
 
                     <TextView
                         android:layout_width="wrap_content"

+ 6 - 6
build.gradle

@@ -54,16 +54,16 @@ buildscript {
 
     if (app_device_type == "zk_h10_w_ke_1") {
         //卡尔 10寸总控主机
-        ext.app_version_code = 11
-        ext.app_version = "1.2.1"
+        ext.app_version_code = 1
+        ext.app_version = "1.1.1"
     } else if (app_device_type == "zk_h10_z_3128_1") {
         //rk3128 10寸总控主机
-        ext.app_version_code = 11
-        ext.app_version = "1.2.1"
+        ext.app_version_code = 4
+        ext.app_version = "1.1.4"
     }
     else {
-        ext.app_version_code = 10
-        ext.app_version = "1.2.0"
+        ext.app_version_code = 1
+        ext.app_version = "1.1.0"
     }
 
 

+ 52 - 47
common/src/main/code/com/wdkl/ncs/android/lib/widget/DoubleSlideSeekBar.java

@@ -340,54 +340,59 @@ public class DoubleSlideSeekBar extends View {
     @Override
     protected void onDraw(Canvas canvas) {
         super.onDraw(canvas);
-        // Y轴 坐标
-        lineY = getHeight() - paddingBottom - bitmapHeight / 2;
-        // 字所在高度 100$
-//        textHeight = lineY - bitmapHeight / 2 - 10;
-        textHeight = lineY - bitmapHeight / 2 - 20;
-        //是否画刻度
-        if (hasRule) {
-            drawRule(canvas);
-        }
-        if (linePaint == null) {
-            linePaint = new Paint();
-        }
-        //画内部线
-        linePaint.setAntiAlias(true);
-        linePaint.setStrokeWidth(lineWidth);
-        linePaint.setColor(inColor);
-        linePaint.setStrokeCap(Paint.Cap.ROUND);
-        canvas.drawLine(slideLowX, lineY, slideBigX, lineY, linePaint);
-        linePaint.setColor(outColor);
-        linePaint.setStrokeCap(Paint.Cap.ROUND);
-        //画 外部线
-        canvas.drawLine(lineStart, lineY, slideLowX, lineY, linePaint);
-        canvas.drawLine(slideBigX, lineY, lineEnd, lineY, linePaint);
-        //画游标
-        if (bitmapPaint == null) {
-            bitmapPaint = new Paint();
-        }
-        canvas.drawBitmap(bitmapLow, slideLowX - bitmapWidth / 2, lineY - bitmapHeight / 2, bitmapPaint);
-        canvas.drawBitmap(bitmapBig, slideBigX - bitmapWidth / 2, lineY - bitmapHeight / 2, bitmapPaint);
-        //画 游标上边的字
-        if (textPaint == null) {
-            textPaint = new Paint();
-        }
-        textPaint.setColor(textColor);
-        textPaint.setTextSize(textSize);
-        textPaint.setAntiAlias(true);
-
-        //这里不要直接转int 因为会去掉小数位 和实际显示的不符合 要转string 四舍五入
-        Log.e(TAG, "smallRange " + Integer.parseInt(String.format("%.0f", smallRange)));
-        Log.e(TAG, "bigRange " + Integer.parseInt(String.format("%.0f", bigRange)));
-//        canvas.drawText(String.format("%.0f" + unit, smallRange), slideLowX - bitmapWidth / 2, textHeight, textPaint);
-//        canvas.drawText(String.format("%.0f" + unit, bigRange), slideBigX - bitmapWidth / 2, textHeight, textPaint);
 
-        Log.e(TAG, "smallRange算出来的 " + computRange(slideLowX));
-        Log.e(TAG, "bigRange算出来的" + computRange(slideBigX));
-
-        canvas.drawText(time[Integer.parseInt(String.format("%.0f", smallRange)) - 1], slideLowX - bitmapWidth / 2, textHeight, textPaint);
-        canvas.drawText(time[Integer.parseInt(String.format("%.0f", bigRange)) - 1], slideBigX - bitmapWidth / 2, textHeight, textPaint);
+        try {
+            // Y轴 坐标
+            lineY = getHeight() - paddingBottom - bitmapHeight / 2;
+            // 字所在高度 100$
+            //textHeight = lineY - bitmapHeight / 2 - 10;
+            textHeight = lineY - bitmapHeight / 2 - 20;
+            //是否画刻度
+            if (hasRule) {
+                drawRule(canvas);
+            }
+            if (linePaint == null) {
+                linePaint = new Paint();
+            }
+            //画内部线
+            linePaint.setAntiAlias(true);
+            linePaint.setStrokeWidth(lineWidth);
+            linePaint.setColor(inColor);
+            linePaint.setStrokeCap(Paint.Cap.ROUND);
+            canvas.drawLine(slideLowX, lineY, slideBigX, lineY, linePaint);
+            linePaint.setColor(outColor);
+            linePaint.setStrokeCap(Paint.Cap.ROUND);
+            //画 外部线
+            canvas.drawLine(lineStart, lineY, slideLowX, lineY, linePaint);
+            canvas.drawLine(slideBigX, lineY, lineEnd, lineY, linePaint);
+            //画游标
+            if (bitmapPaint == null) {
+                bitmapPaint = new Paint();
+            }
+            canvas.drawBitmap(bitmapLow, slideLowX - bitmapWidth / 2, lineY - bitmapHeight / 2, bitmapPaint);
+            canvas.drawBitmap(bitmapBig, slideBigX - bitmapWidth / 2, lineY - bitmapHeight / 2, bitmapPaint);
+            //画 游标上边的字
+            if (textPaint == null) {
+                textPaint = new Paint();
+            }
+            textPaint.setColor(textColor);
+            textPaint.setTextSize(textSize);
+            textPaint.setAntiAlias(true);
+
+            //这里不要直接转int 因为会去掉小数位 和实际显示的不符合 要转string 四舍五入
+            Log.e(TAG, "smallRange " + Integer.parseInt(String.format("%.0f", smallRange)));
+            Log.e(TAG, "bigRange " + Integer.parseInt(String.format("%.0f", bigRange)));
+            //canvas.drawText(String.format("%.0f" + unit, smallRange), slideLowX - bitmapWidth / 2, textHeight, textPaint);
+            //canvas.drawText(String.format("%.0f" + unit, bigRange), slideBigX - bitmapWidth / 2, textHeight, textPaint);
+
+            Log.e(TAG, "smallRange算出来的 " + computRange(slideLowX));
+            Log.e(TAG, "bigRange算出来的" + computRange(slideBigX));
+
+            canvas.drawText(time[Integer.parseInt(String.format("%.0f", smallRange)) - 1], slideLowX - bitmapWidth / 2, textHeight, textPaint);
+            canvas.drawText(time[Integer.parseInt(String.format("%.0f", bigRange)) - 1], slideBigX - bitmapWidth / 2, textHeight, textPaint);
+        } catch (Exception e) {
+            //
+        }
     }
 
     @Override

+ 118 - 7
middleware/src/main/code/com/wdkl/ncs/android/middleware/tcp/enums/TcpAction.java

@@ -14,6 +14,7 @@ public interface TcpAction {
     String getDescription();
 
     enum CallbackAction implements TcpAction {
+        ACK("反馈"),
         SUCCESS("同步"),
         FAILED("失败"),
         NO_MATCH("没有匹配");
@@ -88,7 +89,7 @@ public interface TcpAction {
         HANDOFF("挂断"),
         CANCEL("取消"),
         PCALLING("已经通话中"),
-        VOICE_OFF("通话被接听"),
+        VOICE_OFF("通话被其他设备处理"),
         RS485CALL("485界面发起呼叫"),
         RS485CANCEL("485界面呼叫取消"),
         RS485CANCEL_BY_DOOR("485门口机取消房间内的呼叫"),
@@ -104,6 +105,7 @@ public interface TcpAction {
         GAINED("呼叫被应答"),
         HCALL("手柄呼叫"),
         HRESPONSE("响应手柄"),
+        HRESPONSED("响应过手柄了"),
         NO_MATCH("没有匹配");
 
 
@@ -174,8 +176,9 @@ public interface TcpAction {
 
 
     enum SOSAction implements TcpAction {
-        CALL("紧急呼叫"),
-        CANCEL("取消"),
+        CALL("紧急呼叫"),   //1
+        CANCEL("取消"),   //1
+        CANCELED("已取消"),    //1
         TRANSFER("转接"),
         ALARM_TEST("测试报警"),
         ALARM_INTRUSION("侵入报警"),
@@ -197,7 +200,11 @@ public interface TcpAction {
         AlARM_BUTTON("紧急按钮"),
         ALARM_FALL_RADAR("跌到报警"),
         ALARM_INFUSION_RADAR("输液报警"),
-        ROOM_CALL("房间紧急呼叫"),
+        ROOM_CALL("房间紧急呼叫"),    //1
+        OTHER_CALL("其他紧急呼叫"),   //1
+        RECEIVED("客户端收到确认"),
+        // 当设备在科室级时用这个PART_USER_CALL,比如:用户手环
+        PART_USER_CALL("用户紧急呼叫"),   //
         NO_MATCH("没有匹配");
 
         private final String description;
@@ -321,7 +328,9 @@ public interface TcpAction {
     }
 
     enum DeviceAction implements TcpAction {
-        RESTART("重启"),
+        RESTART("重启APP"),
+        REBOOT("重启机器"),
+        OPEN_DEBUG("打开网络调试"),
         CONNECT("连接"),
         APP_UPDATE("APP更新"),
         DEVICE_REFRESH("设备刷新"),
@@ -329,6 +338,8 @@ public interface TcpAction {
         DEVICE_CHANGE("设备更换"),
         USER_CHANGE("用户绑定"),
         SERVER_CHANGE("设备ip地址更换"),
+        S485_POWER_RESET("485控制版复位电路"),
+        S485_POWER_RESET_SUCCESS("485控制版复位电路成功"),
         NO_MATCH("没有匹配");
 
         private final String description;
@@ -357,13 +368,14 @@ public interface TcpAction {
 
     enum EventAction implements TcpAction {
         KEY_CLICK("按键事件"),
-        RESPONSE("已响应"),
+        RESPONSE("响应"),
+        RESPONSED("已响应"),
         RECEIVED("接收端收到确认"),
         CANCEL("取消"),
         CANCEL_CONFIRM("接收端确认收到取消"),
+        NO_TARGET("没有目标设备"),
         COMPLETED("完成"),
         NO_MATCH("没有匹配");
-
         private final String description;
         EventAction(String description){
             this.description = description;
@@ -396,6 +408,8 @@ public interface TcpAction {
         SOS_CANCEL("取消"),
         NURSING("护理"),
         NURSING_END("护理结束"),
+        SHOW("显示"),
+        CLEAR("清除"),
         NO_MATCH("没有匹配");
 
         private final String description;
@@ -427,6 +441,7 @@ public interface TcpAction {
     enum DataAction implements TcpAction {
         REFRESH("刷新数据"),
         INTERACTION("刷新交互列表"),
+        REMIND("提醒消息"),
         NO_MATCH("没有匹配");
 
         private final String description;
@@ -578,4 +593,100 @@ public interface TcpAction {
             return userOptionEnum == null ? NO_MATCH :userOptionEnum;
         }
     }
+
+    /**
+     * 433相关action
+      */
+    enum S433Action implements TcpAction {
+        CALL("呼叫"),
+        SOS_CALL("紧急呼叫"),
+        CANCEL("取消"),
+        SYNC_TIME("同步时间"),
+        DATA("同步数据"),
+        EXIST("调试"),
+        ACK("返回"),
+        NO_MATCH("没有匹配");
+
+        private final String description;
+        S433Action(String description){
+            this.description = description;
+        }
+        public String getDescription() {
+            return description;
+        }
+
+        public String getName(){
+            return this.name();
+        }
+
+        private final static Map<String , S433Action> ENUM_MAP = new HashMap<String, S433Action>();
+        static {
+            for(S433Action v : values()) {
+                ENUM_MAP.put(v.toString() , v);
+            }
+        }
+        public static S433Action fromString(String v) {
+            S433Action userOptionEnum = ENUM_MAP.get(v);
+            return userOptionEnum == null ? NO_MATCH :userOptionEnum;
+        }
+    }
+
+    enum SignInAction implements TcpAction{
+        SIGN_IN("发起签到"),
+        SIGN_IN_SUCCESS("签到成功"),
+        SIGN_IN_FAILED("签到失败");
+
+        private final String description;
+        SignInAction(String description){
+            this.description = description;
+        }
+        public String getDescription() {
+            return description;
+        }
+
+        public String getName(){
+            return this.name();
+        }
+
+        private final static Map<String , SignInAction> ENUM_MAP = new HashMap<String, SignInAction>();
+        static {
+            for(SignInAction v : values()) {
+                ENUM_MAP.put(v.toString() , v);
+            }
+        }
+        public static SignInAction fromString(String v) {
+            SignInAction signInAction = ENUM_MAP.get(v);
+            return signInAction;
+        }
+    }
+
+
+    enum PositionAction implements TcpAction{
+        POSITION_START("定位开始"),
+        POSITION_END("结束定位");
+        private final String description;
+        PositionAction(String description){
+            this.description = description;
+        }
+        public String getDescription() {
+            return description;
+        }
+
+        public String getName(){
+            return this.name();
+        }
+
+        private final static Map<String , PositionAction> ENUM_MAP = new HashMap<String, PositionAction>();
+        static {
+            for(PositionAction v : values()) {
+                ENUM_MAP.put(v.toString() , v);
+            }
+        }
+        public static PositionAction fromString(String v) {
+            PositionAction positionAction = ENUM_MAP.get(v);
+            return positionAction;
+        }
+    }
+
+
 }