| | |
| | | |
| | | import safeluck.drive.evaluation.platformMessage.JK2019MessageBase; |
| | | import safeluck.drive.evaluation.platformMessage.PlatFormConstant; |
| | | import safeluck.drive.evaluation.platformMessage.RegisterResp; |
| | | import safeluck.drive.evaluation.platformMessage.ServerCommonRsp; |
| | | import safeluck.drive.evaluation.platformMessage.utils.MessageEscaper; |
| | | import safeluck.drive.evaluation.platformMessage.utils.MessageManager; |
| | | import safeluck.drive.evaluation.util.CThreadPoolExecutor; |
| | | import safeluck.drive.evaluation.util.Utils; |
| | | |
| | | /** |
| | | * MyApplication2 |
| | |
| | | |
| | | } |
| | | |
| | | private void parseMessage(byte[] datas) { |
| | | byte[] msgidBytes = ByteUtil.subArray(datas,1,2); |
| | | short msgid = ByteUtil.getShort(msgidBytes); |
| | | |
| | | switch (msgid){ |
| | | case (short) 0x8100: |
| | | RegisterResp registerResp = new RegisterResp(datas); |
| | | break; |
| | | case (short) 0x8001://服务器端 通用应答 |
| | | ServerCommonRsp serverCommonRsp = new ServerCommonRsp(datas); |
| | | if (serverCommonRsp.getResult() == PlatFormConstant.SUCCESS){ |
| | | MyLog.i(PlatFormConstant.TAG,"确认"+serverCommonRsp.getMsgId()+"消息成功"); |
| | | } |
| | | break; |
| | | |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public void sendMessage(final byte[] msg) { |