Commit fc244af6b217e5809b637bf67e304e990c294639
1 parent
bee414de
海亮定制
Showing
1 changed file
with
13 additions
and
6 deletions
海亮定制.md
... | ... | @@ -121,7 +121,9 @@ ${clinetId} clinetId 是基站编号,为替换字符串。 |
121 | 121 | | /client/${clientId}/offline | 基站下线通知。 | |
122 | 122 | | /client/${clientId}/card/online | 答题器上线通知。 | |
123 | 123 | | /client/${clientId}/card/offline | 答题器离线通知。 | |
124 | +| /client/${client}/operate | 对基站进行设置或查询信息 | | |
124 | 125 | | /client/${clientId}/report | 基站主动上报状态,或者对设置指令的回应。 | |
126 | +| /lesson/class/${clinetId}/receive | 基站对答题的设置 | | |
125 | 127 | | /lesson/class/${clinetId}/send | 基站对答题的反馈 | |
126 | 128 | | /client/${clientId}/error | 基站错误信息上报 | |
127 | 129 | |
... | ... | @@ -231,7 +233,7 @@ ${clinetId} clinetId 是基站编号,为替换字符串。 |
231 | 233 | "m": { |
232 | 234 | "f": 1, |
233 | 235 | "mqtt_ip": "edunew.sunvotecloud.cn", |
234 | - "mqtt_port": 8443, | |
236 | + "mqtt_port": 1883, | |
235 | 237 | "mqtt_username": "admin", |
236 | 238 | "mqtt_password": "1223456789" |
237 | 239 | } |
... | ... | @@ -799,13 +801,15 @@ public static String bytesToHexString(byte[] src) { |
799 | 801 | ### 文本下发 |
800 | 802 | |
801 | 803 | #### 文本下发 |
802 | -<br>主题: /client/${client}/operate | |
804 | +<br>主题: /lesson/class/${clinetId}/receive | |
803 | 805 | <br>指令内容: |
804 | 806 | ```json |
805 | 807 | { |
806 | 808 | "i": 60, |
807 | 809 | "en": "6", |
808 | 810 | "cmd": 1, |
811 | + "total": 1, | |
812 | + "current": 1, | |
809 | 813 | "m": [{ |
810 | 814 | "sn": "2126833671", |
811 | 815 | "text": "hex:d5c5c8fd" |
... | ... | @@ -819,6 +823,8 @@ public static String bytesToHexString(byte[] src) { |
819 | 823 | | --- | --- | |
820 | 824 | | i = 60 | 文本下发 | |
821 | 825 | | sn |键盘列表 | |
826 | +| current |当前第几包 | | |
827 | +| total |一共多少包 | | |
822 | 828 | | cmd |下发的命令 <br> 1: 姓名下发 <br> 4: 第二行文本 <br> 85: 自判题判断 <br> 87: 清除 | |
823 | 829 | | text |标题信息,以hex:开头添加的内容 内容为GBK的hex编码 | |
824 | 830 | |
... | ... | @@ -855,12 +861,11 @@ public static String bytesToHexString(byte[] src) { |
855 | 861 | "i": 61, |
856 | 862 | "en": "6", |
857 | 863 | "cmd": 1, |
864 | + "total": 1, | |
865 | + "current": 1, | |
858 | 866 | "m": [{ |
859 | 867 | "sn": "2126833671", |
860 | 868 | "success": 0 |
861 | - },{ | |
862 | - "sn": "2126833672", | |
863 | - "success": 0 | |
864 | 869 | }] |
865 | 870 | } |
866 | 871 | ``` |
... | ... | @@ -868,12 +873,14 @@ public static String bytesToHexString(byte[] src) { |
868 | 873 | | --- | --- | |
869 | 874 | | i = 61 | 文本下发返回 | |
870 | 875 | | sn |键盘号 | |
876 | +| current |当前第几包 | | |
877 | +| total |一共多少包 | | |
871 | 878 | | cmd |下发的命令 <br> 1: 姓名下发 <br> 4: 第二行文本 <br> 85:自判题判断 <br> 87:清除 | |
872 | 879 | | success | 是否成功。<br> 0 表示成功 <br> -1 失败 | |
873 | 880 | |
874 | 881 | ### 学生卡信息上报 |
875 | 882 | 卡初始化组网的时候会上报一次 |
876 | -<br>主题:/client/${client}/report | |
883 | +<br>主题:/lesson/class/${clinetId}/send | |
877 | 884 | <br>指令内容: |
878 | 885 | ```json |
879 | 886 | { | ... | ... |