| | |
| | | byte[] bs = this.doParse(para) ; |
| | | |
| | | MidResultToRtu midRs = new MidResultToRtu() ; |
| | | midRs.rtuResultSendWebUrl = para.rtuResultSendWebUrl ;//rtu返回命令结果 发向目的地web URL |
| | | midRs.protocolName = para.protocolName ;//协议名称 |
| | | midRs.rtuAddr = para.rtuAddr ;//Rtu地址(电信平台设备IMEI) |
| | | midRs.commandId = para.commandId ;//命令ID,发起命令的客户端(web端)生成,以匹配命令结果 |
| | |
| | | bsHead[index] = ProtocolConstantV206V1_0_0.P_Head_Byte ; |
| | | |
| | | index++ ; |
| | | bsHead[index] = commonV1_0_1.createCtrl((byte)0) ; |
| | | bsHead[index] = commonV1_0_1.createCtrl((byte)0, (byte)0) ; |
| | | |
| | | index++ ; |
| | | GlCreate.createRtuAddr(para.rtuAddr, bsHead, index); |
| | |
| | | |
| | | ByteUtil.hex2Bytes(para.commandCode, bsHead, index) ; |
| | | |
| | | byte[] bs = new byte[0] ; |
| | | byte[] bs = new byte[1] ; |
| | | //确认帧的数据域用于遥测终端工作模式的确认或转换。数据为 1 个字节 HEX,00H 时遥测终 |
| | | //端在兼容工作状态; 01H 时遥测终端在自报工作状态; 02H 时遥测终端在查询/应答工作 |
| | | //状态; 03H 时遥测终端在调试/维修状态。 |
| | |
| | | |
| | | GlCreate.createLen(bytes);//长度放字节数组中 |
| | | |
| | | bytes = GlCreate.createCrcTail(bytes) ;//CRC和尾叠加字节数组中 |
| | | byte[] bsTail = GlCreate.createCrcTail(bytes) ;//CRC和尾叠加字节数组中 |
| | | |
| | | bytes = ByteUtil.bytesMerge(bytes, bsTail) ; |
| | | |
| | | return bytes ; |
| | | } |