Constants.java 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349
  1. package com.wdkl.callingmainnursemanager.common;
  2. import com.wdkl.callingmainnursemanager.ui.activity.InitActivity;
  3. /**
  4. * Created by xuhuan on 2017/9/13.
  5. */
  6. public class Constants {
  7. public static final String MSG_SP = "msg_sp";
  8. public static final String INITENTITY = "initEntity";
  9. /**
  10. * SIP注册状态<br></>
  11. * 0 :SIP注册失败;1:SIP注册中;2:SIP注册成功;
  12. */
  13. public static int SIP_REGIST_STATUS = 1;
  14. /**
  15. * 托管状态
  16. */
  17. public static final String INITTRUST = "initTrust";
  18. /**
  19. * 以太网是否ping成功,sip UI同步刷新
  20. */
  21. public static final String ETHERNETSTATUS = "ethernetStatus";
  22. public static final String DELIMITER = Character.toString((char) 3);
  23. //sip账号
  24. public static String SIP_ID = "";
  25. //sip密码
  26. public static String SIP_PASS_WORD = "";
  27. //sip地址
  28. public static String SIP_IP = "";
  29. /**
  30. * sip端口号
  31. */
  32. public static final String SIP_IP_END = ":5060";
  33. //mac地址
  34. public static String MAC_ADDRESS = "";
  35. //护理等级标题
  36. public static String NURSE_TITLE;
  37. //饮食等级标题
  38. public static String DIET_TITLE;
  39. //计量等级标题
  40. public static String METERING;
  41. //隔离等级标题
  42. public static String deviceNurse_Level3;
  43. //过敏等级标题
  44. public static String deviceNurse_Level4;
  45. //网关地址
  46. public static String URL = "";
  47. //端口号
  48. public static final String URL_END = ":81";
  49. //初始化数据
  50. public static final String CALLINGMAINNURSE_INIT = "/WDHS-I/callingMainNurse_init.aspx";
  51. //病房数据
  52. public static final String CALLINGMAINNURSE_ROOM = "/WDHS-I/callingMainNurse_room.aspx";
  53. //医院信息数据
  54. public static final String CALLINGMAINNURSE_HOSPITAL = "/WDHS-I/callingMainNurse_hospitalInfo.aspx";
  55. //病人个人数据
  56. public static final String CALLINGMAINNURSE_PATIENT = "/WDHS-I/callingMainNurse_patientinfo.aspx";
  57. //广播数据
  58. public static final String CALLINGMAINNURSE_BROADCAST = "/WDHS-I/callingMainNurse_BroadcastInfo.aspx";
  59. //广播音量大小
  60. public static final String CALLINGMAINNURSE_BROADCAST_VOL = "/WDHS-I/callingMainNurse_BroadcastVol.aspx";
  61. //主机请求托管
  62. public static final String CALLINGMAINNURSE_TRUSTQUEST = "/WDHS-I/callingMainNurse_trust.aspx";
  63. //医护主机列表
  64. public static final String CALLINGMAINNURSE_NURSELIST = "/WDHS-I/callingMainNurse_NurseHostList.aspx";
  65. //医生主机列表
  66. public static final String CALLINGMAINNURSE_DOCTORLIST = "/WDHS-I/callingMainNurse_DoctorHostList.aspx";
  67. //系统设置数据
  68. public static final String SYSTEM_INFO = "/WDHS-I/callingMainNurse_systemInfo.aspx";
  69. //所有科室信息
  70. public static final String CALLINGMAINNURSE_PART_INFO = "/Mgr/GetWD_PartInfoArray.aspx";
  71. //所有设备信息
  72. public static final String CALLINGMAINNURSE_DEVICE_INFO = "/Mgr/GetWD_DeviceInfoArray.aspx";
  73. /**
  74. * 检查APP更新版本
  75. */
  76. public static final String APP_CHECK_UPDATE = "/WDHS-I/callingMainNurseManager_APP_CheckUpdate.aspx";
  77. //public static final String APP_CHECK_UPDATE = "";
  78. //呼叫状态
  79. public static String CALL_STATE = "-1";
  80. //待机状态
  81. public static final String STANDBY = "0";
  82. //呼叫中
  83. public static final String IN_CALL = "1";
  84. //通话中
  85. public static final String IN_CALLING = "2";
  86. //挂断状态 21
  87. public static int CALLING_ENDING = 21;
  88. //呼叫护士主机id
  89. public static String CALLING_HOST_ID = "";
  90. //EventBus 所需判断类型
  91. public static final int EVENT_UDP = 0x01;
  92. public static final int EVENT_SIP = 0x02;
  93. public static final int EVENT_FRAGMENT = 0x03;
  94. /**
  95. * 托管反馈
  96. */
  97. public static final int EVENT_FRAGMENT_TRUST = 0x11;
  98. public static final int EVENT_MGR_UPDATE = 0x04;
  99. /**
  100. * APP更新
  101. */
  102. public static final int EVENT_MGR_APP_UPDATE = 0x09;
  103. public static final int EVENT_UDP2 = 0x20;
  104. public static final int EVENT_CALL = 0x21;
  105. /**
  106. * APP更新flag值<br></>
  107. * false为无更新指令。
  108. */
  109. public static boolean UPDATE_APP_FLAG = false;
  110. public static boolean MGR_UPDATE = false;
  111. /**
  112. * 循环检测SIP
  113. */
  114. public static final int EVENT_SIP_INTERNETPING_ = 0x05;
  115. /**
  116. * 检测网络状态
  117. */
  118. public static final int EVENT_INTERNET_STATUS = 0x06;
  119. public static final int EVENT_SETSYS = 0x07;
  120. public static final int EVENT_UPLOAD = 0x08;
  121. /**
  122. * 检测SIP,以太网ping状态
  123. */
  124. public static final int EVENT_SIP_INTERNETPING = 0x10;
  125. //重启
  126. public static final int EVENT_MGR_RESET = 0x88;
  127. //语音留言列表
  128. public static final int EVENT_VOICE_MESSAGE = 0x12;
  129. //语音留言列表详情
  130. public static final int EVENT_VOICE_MESSAGE_DETAIL = 0x13;
  131. //语音留言录音
  132. public static final int EVENT_VOICE_MESSAGE_RECORD = 0x14;
  133. /**
  134. * FTP——广播文件夹路径
  135. */
  136. public static String FTP_BROADCAST = "Broadcast";
  137. /**
  138. * FTP——语音留言文件夹路径
  139. */
  140. public static String FTP_VOICE = "WDMsg/UpLoad";
  141. /**
  142. * 语音留言文件夹下载播放路径
  143. */
  144. public static String VOICE_PLAY = "/WDMsg/DownLoad";
  145. //语音文件下载
  146. public static final String CALLINGMAINNURSE_VOICE_MESSAGE = "/WDmsg/DownLoad.aspx";
  147. //语音留言详情分页
  148. public static final String CALLINGMAINNURSE_VOICE_MESSAGE_LIST = "/WDHS-I/callingMainNurse_Mgr_VoiceMessage_History_List.aspx";
  149. //语音留言护士参数udp去重
  150. public static String VOICE_MESSAGE_HOSMANINFO_NURSE = "";
  151. public static String VOICE_MESSAGE_DEVICETYPE_NURSE = "";
  152. public static String VOICE_MESSAGE_DEVICEID_NURSE = "";
  153. public static String VOICE_MESSAGE_PATIENTID_NURSE = "";
  154. public static String VOICE_MESSAGE_PATIENTNAME_NURSE = "";
  155. public static String VOICE_MESSAGE_FILEORIGINALNAME_NURSE = "";
  156. public static String VOICE_MESSAGE_FILESTORENAME_NURSE = "";
  157. public static String VOICE_MESSAGE_MESSAGETIME_NURSE = "";
  158. public static String VOICE_MESSAGE_CONTENT_NURSE = "";
  159. public static String VOICE_MESSAGE_ID_NURSE = "";
  160. //语音留言患者参数udp去重
  161. public static String[] voiceTimes = new String[15];
  162. private static int count = 0;
  163. public static boolean setVoiceTimes(String times) {
  164. synchronized (times) {
  165. boolean isSame = false;
  166. String aLong = times;
  167. if (count >= 15) {
  168. count = 0;
  169. }
  170. for (int i = 0; i < voiceTimes.length; i++) {
  171. //初始化
  172. if (voiceTimes[i] == null) {
  173. voiceTimes[i] = "";
  174. }
  175. if (voiceTimes[i].equals(aLong)) {
  176. isSame = true;
  177. break;
  178. }
  179. }
  180. voiceTimes[count] = aLong;
  181. count++;
  182. return isSame;
  183. }
  184. }
  185. /**
  186. * 各种呼叫的机型
  187. * type : 1门口机 2主机 3 子机 4请求增援 5卫生间 6总控机 优先等级依次升高 12传统机
  188. */
  189. public static final String DOOR_CALL = "1";
  190. public static final String MAIN_CALL = "2";
  191. public static final String SON_CALL = "3";
  192. public static final String ROOMHELP_CALL = "4";
  193. public static final String WSHROOM_CALL = "5";
  194. public static final String MANAGER_CALL = "6";
  195. public static final String TRADITION_CALL = "12";
  196. public static String CallType = "";
  197. public static String DEVICE_ID = "";
  198. public static String MYSELF_ID = "";//自己的机器ID
  199. public static String CALLMAIN_ID = "";//所属主机机器ID
  200. public static String DOOR_ID = "";//门口机机器ID
  201. public static String TRUST_OLD_MAIN_ID = "";//托管主机的Id
  202. public static int TRUST_FLAG_VALUE = 88;//托管是否取消成功的值:66成功;88失败
  203. //设备类型
  204. public static String DEVICE_HOST = "1"; //护士主机
  205. public static String DEVICE_DOOR = "3"; //门口机
  206. public static String DEVICE_SLAVE = "4"; //分机
  207. /**
  208. * PartID:科室 ID 号
  209. */
  210. public static String PartID = "";
  211. public static String PartName = "";
  212. public static String SelectedPartId = "";
  213. public static String SelectedPartName = "";
  214. public static int currentFragment = 0;
  215. /**
  216. * 白天还是晚上<br>
  217. * type :0 白天 1 晚上
  218. */
  219. public static String MORNING_NIGTH = "0";
  220. /**
  221. * 白天轮播循环次数<br>
  222. */
  223. public static String DAY_RING_TIMES = "1";
  224. /**
  225. * 晚上轮播循环次数<br>
  226. */
  227. public static String NIGHT_RING_TIMES = "1";
  228. /**
  229. * 屏幕亮度百分比<br>
  230. */
  231. public static String SCREENLIGHT = "100";
  232. /**
  233. * 子机系统音量百分比<br>
  234. */
  235. public static String BEDSYSVOICE = "100";
  236. /**
  237. * 铃声音量百分比<br>
  238. */
  239. public static String RINGLVOICE = "100";
  240. /**
  241. * 轮播循环次数UDP用<br>
  242. */
  243. public static String RINGLVOICELOOP = "1";
  244. /**
  245. * 护理灯亮度<br>
  246. */
  247. public static String NURSINGLIGHT = "100";
  248. /**
  249. * 语音呼叫超时时间<br>
  250. */
  251. public static String CALLINGTIMEOUT = "60";
  252. /**
  253. * 熄屏时间<br>
  254. */
  255. public static String SCREENEXTINGUISHTIME = "";
  256. /**
  257. * 门口机通话音量<br>
  258. */
  259. public static String DOORCALLVOICE = "100";
  260. /**
  261. * 子机通话音量<br>
  262. */
  263. public static String BEDCALLVOICE = "100";
  264. /**
  265. * 是否已经开了音频PA
  266. */
  267. public static boolean volumePAStatus = true;
  268. /**
  269. * 语音播报类型值<br>
  270. */
  271. public static String VOICE_BROADCAST_TYPE = "1";
  272. /**
  273. * 语音播报SP保存的TAG值<br>
  274. */
  275. public static final String VOICE_BROADCAST_TAG = "voiceBroadcastType";
  276. /**
  277. * 是否处于托管状态,用于处理已经显示托管中的主机还想再托管别的设备情况
  278. */
  279. public static boolean trustStatused = false;
  280. /**
  281. * 是否截断其他托管指令
  282. */
  283. public static boolean isInterruptOtherTrustCommand = false;
  284. /**
  285. * ANR FC ANR 奔溃 异常处理
  286. */
  287. public static Class ANR_FC = InitActivity.class;
  288. /**
  289. * 网络信息初始化错误连续出现5次,不再重启系统,需更换机子.
  290. */
  291. public static String NET_ERROR_FIVE_AFTER_TOAST = "fifthReboot";
  292. /**
  293. * 单片机版本号 add by waderson 20190708
  294. */
  295. public static String MCU_VERSION_NUMBER = "";
  296. /**
  297. * 是否是免提状态 add by waderson 20190802
  298. */
  299. public static boolean HANDS_FREE = true;
  300. }