ソースを参照

调整床号和姓名显示大小,增加后台控制设备重启及打开网络调试功能,更新app图标

weizhengliang 2 年 前
コミット
0ea583ff50
18 ファイル変更266 行追加50 行削除
  1. 8 0
      android_bed/src/main/h10_w_yld/java/com/wdkl/app/ncs/callingbed/activity/CallingbedActivity.kt
  2. 2 2
      android_bed/src/main/h10_w_yld/java/com/wdkl/app/ncs/callingbed/helper/AppUpdateHelper.java
  3. 24 0
      android_bed/src/main/h10_w_yld/java/com/wdkl/app/ncs/callingbed/helper/AppUtil.java
  4. 1 1
      android_bed/src/main/h10_w_yld/java/com/wdkl/app/ncs/callingbed/settings/SettingConfig.java
  5. 16 12
      android_bed/src/main/h10_w_yld/res/layout/main_view2_layout.xml
  6. 6 5
      android_bed/src/main/h10_w_yld/res/layout/view_bed_name.xml
  7. 8 0
      android_bed/src/main/h5_3128/java/com/wdkl/app/ncs/callingbed/activity/CallingbedActivity.kt
  8. 2 2
      android_bed/src/main/h5_3128/java/com/wdkl/app/ncs/callingbed/helper/AppUpdateHelper.java
  9. 24 0
      android_bed/src/main/h5_3128/java/com/wdkl/app/ncs/callingbed/helper/AppUtil.java
  10. 15 14
      android_bed/src/main/h5_3128/res/layout/main_view.xml
  11. 5 3
      android_bed/src/main/h5_3128/res/layout/view_bed_name.xml
  12. 8 0
      android_bed/src/main/h7_3128/java/com/wdkl/app/ncs/callingbed/activity/CallingbedActivity.kt
  13. 2 2
      android_bed/src/main/h7_3128/java/com/wdkl/app/ncs/callingbed/helper/AppUpdateHelper.java
  14. 24 0
      android_bed/src/main/h7_3128/java/com/wdkl/app/ncs/callingbed/helper/AppUtil.java
  15. 1 1
      app/src/main/AndroidManifest.xml
  16. 5 0
      app/src/main/res/drawable/ic_launch_48.xml
  17. 1 1
      app/src/main/sharedUserId/AndroidManifest.xml
  18. 114 7
      middleware/src/main/code/com/wdkl/ncs/android/middleware/tcp/enums/TcpAction.java

+ 8 - 0
android_bed/src/main/h10_w_yld/java/com/wdkl/app/ncs/callingbed/activity/CallingbedActivity.kt

@@ -1237,6 +1237,14 @@ class CallingbedActivity :BaseActivity<CallingbedActivityPresenter, Callingbed2M
                                     AppUpdateHelper.restartApp(activity)
                                 }
                             }
+                        } else if (tcpModel.action == TcpAction.DeviceAction.OPEN_DEBUG) {
+                            //打开调试
+                            if (AppUtil.openNetworkDebug()) {
+                                showMessage(R.string.enable_debug)
+                            }
+                        } else if (tcpModel.action == TcpAction.DeviceAction.REBOOT) {
+                            //设备重启
+                            AppUpdateHelper.reboot(activity)
                         }
                     } else if (tcpModel.action == TcpAction.DataAction.REFRESH) {
                         Util.wakeUpAndUnlock()

+ 2 - 2
android_bed/src/main/h10_w_yld/java/com/wdkl/app/ncs/callingbed/helper/AppUpdateHelper.java

@@ -208,6 +208,8 @@ public class AppUpdateHelper {
 
     public static void reboot(Context context) {
         if (Build.MODEL.equals("rk3128")) {
+            SerialPortHelper.resetDevice();
+
             try {
                 Intent intent = new Intent(Intent.ACTION_REBOOT);
                 intent.putExtra("nowait", 1);
@@ -217,8 +219,6 @@ public class AppUpdateHelper {
             } catch (Exception e) {
                 e.printStackTrace();
             }
-
-            SerialPortHelper.resetDevice();
         } else if (Build.MODEL.equals("rk3288")) {
             Process process;
             PrintWriter printWriter;

+ 24 - 0
android_bed/src/main/h10_w_yld/java/com/wdkl/app/ncs/callingbed/helper/AppUtil.java

@@ -4,6 +4,8 @@ import android.app.AlarmManager;
 import android.content.Context;
 import android.text.TextUtils;
 
+import com.wdkl.ncs.android.middleware.common.Constant;
+
 import java.io.DataOutputStream;
 import java.io.IOException;
 import java.util.Calendar;
@@ -91,4 +93,26 @@ public class AppUtil {
         alarmManager.setTimeZone(timeZone);
         alarmManager.setTime(timeMills);
     }
+
+    //开启网络调试
+    public static boolean openNetworkDebug() {
+        try {
+            Process process = Runtime.getRuntime().exec("su");
+            if (null == process) {
+                return false;
+            }
+            DataOutputStream os = new DataOutputStream(process.getOutputStream());
+            os.writeBytes("setprop service.adb.tcp.port 5555\n");
+            os.writeBytes("stop adbd\n");
+            os.writeBytes("start adbd\n");
+            os.writeBytes("exit\n");
+            os.flush();
+
+            return true;
+        } catch (IOException e) {
+            e.printStackTrace();
+        }
+
+        return false;
+    }
 }

+ 1 - 1
android_bed/src/main/h10_w_yld/java/com/wdkl/app/ncs/callingbed/settings/SettingConfig.java

@@ -76,7 +76,7 @@ public class SettingConfig {
 
     public static int getLanguageId(Context context) {
         //0--auto, 1--English, 2--中文, 3--西班牙语, 4--俄语
-        return getSP(context).getInt(KEY_LANGUAGE_ID, 0);
+        return getSP(context).getInt(KEY_LANGUAGE_ID, 2);
     }
 
     public static void setLanguageId(Context context, int id) {

+ 16 - 12
android_bed/src/main/h10_w_yld/res/layout/main_view2_layout.xml

@@ -29,7 +29,7 @@
             <ImageView
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
-                android:layout_marginTop="20dp"
+                android:layout_marginTop="10dp"
                 android:src="@mipmap/ic_doctor_default"/>
             <TextView
                 android:id="@+id/tv_doctor_title"
@@ -37,7 +37,7 @@
                 android:layout_height="wrap_content"
                 android:layout_marginTop="8dp"
                 android:textColor="#B4B4B4"
-                android:textSize="18sp"
+                android:textSize="20sp"
                 android:text="@string/doctor_title"/>
             <TextView
                 android:id="@+id/tv_doctor_name"
@@ -45,7 +45,7 @@
                 android:layout_height="wrap_content"
                 android:layout_marginTop="4dp"
                 android:textColor="@color/black"
-                android:textSize="18sp"
+                android:textSize="20sp"
                 android:text="@string/str_empty"/>
         </LinearLayout>
 
@@ -62,7 +62,7 @@
             <ImageView
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
-                android:layout_marginTop="20dp"
+                android:layout_marginTop="10dp"
                 android:src="@mipmap/ic_nurse_default"/>
             <TextView
                 android:id="@+id/tv_nurse_title"
@@ -70,7 +70,7 @@
                 android:layout_height="wrap_content"
                 android:layout_marginTop="8dp"
                 android:textColor="#B4B4B4"
-                android:textSize="18sp"
+                android:textSize="20sp"
                 android:text="@string/nurse_title"/>
             <TextView
                 android:id="@+id/tv_nurse_name"
@@ -78,7 +78,7 @@
                 android:layout_height="wrap_content"
                 android:layout_marginTop="4dp"
                 android:textColor="@color/black"
-                android:textSize="18sp"
+                android:textSize="20sp"
                 android:text="@string/str_empty"/>
         </LinearLayout>
     </LinearLayout>
@@ -124,8 +124,8 @@
             android:layout_height="match_parent"
             android:paddingTop="10dp"
             android:paddingBottom="10dp"
-            android:paddingLeft="24dp"
-            android:paddingRight="24dp"
+            android:paddingLeft="20dp"
+            android:paddingRight="20dp"
             android:background="@color/white"
             android:orientation="vertical"
             android:visibility="gone">
@@ -247,7 +247,8 @@
                 android:id="@+id/tv_custom_name"
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
-                android:textSize="60sp"
+                android:textSize="88sp"
+                android:textStyle="bold"
                 android:textColor="@color/main_color"
                 android:text="---"/>
             <TextView
@@ -258,7 +259,7 @@
                 android:layout_alignBottom="@id/tv_custom_name"
                 android:background="@mipmap/ic_gender_male"
                 android:layout_marginLeft="20dp"
-                android:layout_marginBottom="10dp"/>
+                android:layout_marginBottom="20dp"/>
             <TextView
                 android:id="@+id/tv_custom_age"
                 android:layout_width="wrap_content"
@@ -266,6 +267,7 @@
                 android:layout_toRightOf="@id/tv_custom_gender"
                 android:layout_alignBottom="@id/tv_custom_name"
                 android:layout_marginLeft="20dp"
+                android:layout_marginBottom="10dp"
                 android:textSize="40sp"
                 android:textColor="#B4B4B4"
                 android:text="--"/>
@@ -274,7 +276,8 @@
                 android:id="@+id/ll_custom_no"
                 android:layout_width="match_parent"
                 android:layout_height="wrap_content"
-                android:layout_marginTop="10dp"
+                android:layout_marginTop="6dp"
+                android:layout_marginBottom="6dp"
                 android:layout_below="@id/tv_custom_name">
 
                 <TextView
@@ -307,7 +310,8 @@
                 android:drawablePadding="10dp"
                 android:textSize="24sp"
                 android:textColor="@color/black"
-                android:text="" />
+                android:text=""
+                android:visibility="gone"/>
             <TextView
                 android:id="@+id/tv_order_content"
                 android:layout_width="match_parent"

+ 6 - 5
android_bed/src/main/h10_w_yld/res/layout/view_bed_name.xml

@@ -2,7 +2,7 @@
 <LinearLayout
     xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="match_parent"
-    android:layout_height="86dp">
+    android:layout_height="140dp">
 
     <TextView
         android:id="@+id/tv_bed_name"
@@ -10,11 +10,12 @@
         android:layout_height="match_parent"
         android:layout_weight="1"
         android:background="@color/white"
-        android:paddingLeft="24dp"
+        android:paddingLeft="20dp"
         android:gravity="center_vertical"
         android:textColor="@color/main_color"
-        android:textSize="54sp"
-        android:text=""/>
+        android:textSize="108sp"
+        android:textStyle="bold"
+        android:text="--"/>
 
     <TextView
         android:id="@+id/tv_version"
@@ -24,6 +25,6 @@
         android:background="@color/white"
         android:gravity="bottom"
         android:textColor="@color/black"
-        android:textSize="16sp"
+        android:textSize="20sp"
         android:text="v--"/>
 </LinearLayout>

+ 8 - 0
android_bed/src/main/h5_3128/java/com/wdkl/app/ncs/callingbed/activity/CallingbedActivity.kt

@@ -1512,6 +1512,14 @@ class CallingbedActivity :BaseActivity<CallingbedActivityPresenter, CallingbedMa
                                     AppUpdateHelper.restartApp(activity)
                                 }
                             }
+                        } else if (tcpModel.action == TcpAction.DeviceAction.OPEN_DEBUG) {
+                            //打开调试
+                            if (AppUtil.openNetworkDebug()) {
+                                showMessage(R.string.enable_debug)
+                            }
+                        } else if (tcpModel.action == TcpAction.DeviceAction.REBOOT) {
+                            //设备重启
+                            AppUpdateHelper.reboot(activity)
                         }
                     } else if (tcpModel.action == TcpAction.DataAction.REFRESH) {
                         //重新加载数据,比如出院,入院等

+ 2 - 2
android_bed/src/main/h5_3128/java/com/wdkl/app/ncs/callingbed/helper/AppUpdateHelper.java

@@ -154,6 +154,8 @@ public class AppUpdateHelper {
 
 
     public static void reboot(Context context) {
+        SerialPortHelper.resetDevice();
+
         try {
             Intent intent = new Intent(Intent.ACTION_REBOOT);
             intent.putExtra("nowait", 1);
@@ -163,8 +165,6 @@ public class AppUpdateHelper {
         } catch (Exception e) {
             e.printStackTrace();
         }
-
-        SerialPortHelper.resetDevice();
     }
 
     public static void restartApp(Context context) {

+ 24 - 0
android_bed/src/main/h5_3128/java/com/wdkl/app/ncs/callingbed/helper/AppUtil.java

@@ -4,6 +4,8 @@ import android.app.AlarmManager;
 import android.content.Context;
 import android.text.TextUtils;
 
+import com.wdkl.ncs.android.middleware.common.Constant;
+
 import java.io.DataOutputStream;
 import java.io.IOException;
 import java.util.Calendar;
@@ -91,4 +93,26 @@ public class AppUtil {
         alarmManager.setTimeZone(timeZone);
         alarmManager.setTime(timeMills);
     }
+
+    //开启网络调试
+    public static boolean openNetworkDebug() {
+        try {
+            Process process = Runtime.getRuntime().exec("su");
+            if (null == process) {
+                return false;
+            }
+            DataOutputStream os = new DataOutputStream(process.getOutputStream());
+            os.writeBytes("setprop service.adb.tcp.port 5555\n");
+            os.writeBytes("stop adbd\n");
+            os.writeBytes("start adbd\n");
+            os.writeBytes("exit\n");
+            os.flush();
+
+            return true;
+        } catch (IOException e) {
+            e.printStackTrace();
+        }
+
+        return false;
+    }
 }

+ 15 - 14
android_bed/src/main/h5_3128/res/layout/main_view.xml

@@ -14,8 +14,8 @@
             android:layout_height="match_parent"
             android:layout_below="@id/lay_main_bed_name"
             android:layout_alignParentRight="true"
-            android:layout_marginTop="6dp"
-            android:layout_marginBottom="6dp"
+            android:layout_marginTop="4dp"
+            android:layout_marginBottom="4dp"
             android:orientation="vertical">
             <!--责任医生-->
             <LinearLayout
@@ -29,13 +29,13 @@
                 <ImageView
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
-                    android:layout_marginTop="12dp"
+                    android:layout_marginTop="4dp"
                     android:src="@mipmap/ic_doctor_default"/>
                 <TextView
                     android:id="@+id/tv_doctor_title"
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
-                    android:layout_marginTop="8dp"
+                    android:layout_marginTop="4dp"
                     android:textColor="#B4B4B4"
                     android:textSize="18sp"
                     android:text="@string/doctor_title"/>
@@ -62,13 +62,13 @@
                 <ImageView
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
-                    android:layout_marginTop="12dp"
+                    android:layout_marginTop="4dp"
                     android:src="@mipmap/ic_nurse_default"/>
                 <TextView
                     android:id="@+id/tv_nurse_title"
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
-                    android:layout_marginTop="8dp"
+                    android:layout_marginTop="4dp"
                     android:textColor="#B4B4B4"
                     android:textSize="18sp"
                     android:text="@string/nurse_title"/>
@@ -89,9 +89,9 @@
             android:layout_height="match_parent"
             android:layout_below="@id/lay_main_bed_name"
             android:layout_toLeftOf="@id/ll_doctor_nurse_view"
-            android:layout_marginTop="6dp"
             android:layout_marginRight="10dp"
-            android:layout_marginBottom="6dp">
+            android:layout_marginTop="4dp"
+            android:layout_marginBottom="4dp">
             <!--无人入住时展示-->
             <LinearLayout
                 android:id="@+id/ll_empty"
@@ -122,7 +122,7 @@
                 android:id="@+id/ll_custom_view"
                 android:layout_width="match_parent"
                 android:layout_height="match_parent"
-                android:paddingTop="6dp"
+                android:paddingTop="4dp"
                 android:paddingLeft="12dp"
                 android:paddingRight="12dp"
                 android:background="@color/white"
@@ -133,7 +133,7 @@
                     android:id="@+id/ll_nurse_more"
                     android:layout_width="match_parent"
                     android:layout_height="80dp"
-                    android:layout_marginTop="6dp"
+                    android:layout_marginTop="4dp"
                     android:layout_alignParentBottom="true"
                     android:gravity="center_horizontal"
                     android:visibility="gone">
@@ -246,7 +246,8 @@
                     android:id="@+id/tv_custom_name"
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
-                    android:textSize="60sp"
+                    android:textSize="56sp"
+                    android:textStyle="bold"
                     android:textColor="@color/main_color"
                     android:text="---"/>
                 <TextView
@@ -256,7 +257,7 @@
                     android:layout_toRightOf="@id/tv_custom_name"
                     android:layout_alignBottom="@id/tv_custom_name"
                     android:background="@mipmap/ic_gender_male"
-                    android:layout_marginLeft="20dp"
+                    android:layout_marginLeft="10dp"
                     android:layout_marginBottom="10dp"/>
                 <TextView
                     android:id="@+id/tv_custom_age"
@@ -264,8 +265,8 @@
                     android:layout_height="wrap_content"
                     android:layout_toRightOf="@id/tv_custom_gender"
                     android:layout_alignBottom="@id/tv_custom_name"
-                    android:layout_marginLeft="20dp"
-                    android:textSize="40sp"
+                    android:layout_marginLeft="10dp"
+                    android:textSize="28sp"
                     android:textColor="#B4B4B4"
                     android:text="--"/>
                 <TextView

+ 5 - 3
android_bed/src/main/h5_3128/res/layout/view_bed_name.xml

@@ -2,19 +2,21 @@
 <LinearLayout
     xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="match_parent"
-    android:layout_height="80dp">
+    android:layout_height="96dp">
 
     <TextView
         android:id="@+id/tv_bed_name"
         android:layout_width="0dp"
         android:layout_height="match_parent"
         android:layout_weight="1"
+        android:layout_marginTop="-10dp"
         android:background="@color/white"
         android:paddingLeft="24dp"
         android:gravity="center_vertical"
         android:textColor="@color/main_color"
-        android:textSize="54sp"
-        android:text=""/>
+        android:textSize="86sp"
+        android:textStyle="bold"
+        android:text="--"/>
 
     <TextView
         android:id="@+id/tv_version"

+ 8 - 0
android_bed/src/main/h7_3128/java/com/wdkl/app/ncs/callingbed/activity/CallingbedActivity.kt

@@ -1269,6 +1269,14 @@ class CallingbedActivity :BaseActivity<CallingbedActivityPresenter, Callingbed2M
                                     AppUpdateHelper.restartApp(activity)
                                 }
                             }
+                        } else if (tcpModel.action == TcpAction.DeviceAction.OPEN_DEBUG) {
+                            //打开调试
+                            if (AppUtil.openNetworkDebug()) {
+                                showMessage(R.string.enable_debug)
+                            }
+                        } else if (tcpModel.action == TcpAction.DeviceAction.REBOOT) {
+                            //设备重启
+                            AppUpdateHelper.reboot(activity, true)
                         }
                     } else if (tcpModel.action == TcpAction.DataAction.REFRESH) {
                         //重新加载数据

+ 2 - 2
android_bed/src/main/h7_3128/java/com/wdkl/app/ncs/callingbed/helper/AppUpdateHelper.java

@@ -186,6 +186,8 @@ public class AppUpdateHelper {
             if (reset) {
                 SerialPortHelper.resetDevice();
             } else {
+                SerialPortHelper.resetDevice();
+
                 try {
                     Intent intent = new Intent(Intent.ACTION_REBOOT);
                     intent.putExtra("nowait", 1);
@@ -195,8 +197,6 @@ public class AppUpdateHelper {
                 } catch (Exception e) {
                     e.printStackTrace();
                 }
-
-                SerialPortHelper.resetDevice();
             }
         } else if (Build.MODEL.equals("rk3288")) {
             Process process;

+ 24 - 0
android_bed/src/main/h7_3128/java/com/wdkl/app/ncs/callingbed/helper/AppUtil.java

@@ -4,6 +4,8 @@ import android.app.AlarmManager;
 import android.content.Context;
 import android.text.TextUtils;
 
+import com.wdkl.ncs.android.middleware.common.Constant;
+
 import java.io.DataOutputStream;
 import java.io.IOException;
 import java.util.Calendar;
@@ -90,4 +92,26 @@ public class AppUtil {
         alarmManager.setTimeZone(timeZone);
         alarmManager.setTime(timeMills);
     }
+
+    //开启网络调试
+    public static boolean openNetworkDebug() {
+        try {
+            Process process = Runtime.getRuntime().exec("su");
+            if (null == process) {
+                return false;
+            }
+            DataOutputStream os = new DataOutputStream(process.getOutputStream());
+            os.writeBytes("setprop service.adb.tcp.port 5555\n");
+            os.writeBytes("stop adbd\n");
+            os.writeBytes("start adbd\n");
+            os.writeBytes("exit\n");
+            os.flush();
+
+            return true;
+        } catch (IOException e) {
+            e.printStackTrace();
+        }
+
+        return false;
+    }
 }

+ 1 - 1
app/src/main/AndroidManifest.xml

@@ -25,7 +25,7 @@
     <uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS"/>
     <application
         android:allowBackup="true"
-        android:icon="@mipmap/ic_launcher"
+        android:icon="@drawable/ic_launch_48"
         android:label="@string/wdkl_app_name"
         android:supportsRtl="true"
         tools:replace="android:label"

+ 5 - 0
app/src/main/res/drawable/ic_launch_48.xml

@@ -0,0 +1,5 @@
+<vector android:height="48dp" android:tint="#B1DAF3"
+    android:viewportHeight="24" android:viewportWidth="24"
+    android:width="48dp" xmlns:android="http://schemas.android.com/apk/res/android">
+    <path android:fillColor="@android:color/white" android:pathData="M4,6h18L22,4L4,4c-1.1,0 -2,0.9 -2,2v11L0,17v3h14v-3L4,17L4,6zM23,8h-6c-0.55,0 -1,0.45 -1,1v10c0,0.55 0.45,1 1,1h6c0.55,0 1,-0.45 1,-1L24,9c0,-0.55 -0.45,-1 -1,-1zM22,17h-4v-7h4v7z"/>
+</vector>

+ 1 - 1
app/src/main/sharedUserId/AndroidManifest.xml

@@ -26,7 +26,7 @@
     <uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS"/>
     <application
         android:allowBackup="true"
-        android:icon="@mipmap/ic_launcher"
+        android:icon="@drawable/ic_launch_48"
         android:label="@string/wdkl_app_name"
         android:supportsRtl="true"
         tools:replace="android:label"

+ 114 - 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;
@@ -578,4 +592,97 @@ 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;
+        }
+    }
 }