Commit f7e2d2141d49e2db1f1a7282a2446a56fcfa04d8

Authored by 孙向锦
1 parent 190eabe1

更新生避字下发流程

Showing 1 changed file with 22 additions and 1 deletions
海亮定制.md
... ... @@ -641,7 +641,11 @@ byte数组转int型
641 641 }
642 642 ```
643 643  
644   -获取这个生避字的编码:
  644 +获取这个生避字的编码:<br>
  645 +获取字码表的方法是该字符的GB2312的16进制数,然后根据该16进制数据从字码文件中定位该字符的字码<br>
  646 +例如计算出“綩”的GB2312得到的byte,转换byte字节为整数48719。<br>
  647 +然后在字码表文件code.dat文件偏移48719*24位置,然后读取24个字节,为该字的字码(每个字的字码为24个字节)<br>
  648 +下发给基站
645 649 ```
646 650 byte[] inputs = "綩".getBytes("GB2312"); // 原文内容
647 651 int code = bytes2ToInt(inputs,0);
... ... @@ -680,6 +684,23 @@ public byte[] readFileContent(int start, int len) {
680 684 }
681 685 ```
682 686  
  687 +最后下发的json数据
  688 +```json
  689 +
  690 +{
  691 + "i": 60,
  692 + "cmd": 70,
  693 + "current": 1,
  694 + "total": 1,
  695 + "qs": 1,
  696 + "en": "17",
  697 + "m": [{
  698 + "text": "hex:be4fdcb3c880669af203f292f6000e0006000806010007080e00",
  699 + "sn": "2126833671"
  700 + }]
  701 +}
  702 +
  703 +```
683 704  
684 705  
685 706  
... ...