1、增加lora配置

This commit is contained in:
weidong 2024-04-05 14:22:16 +08:00
parent f1b4a56f41
commit 4cbe5d7a78
6 changed files with 33 additions and 5 deletions

View File

@ -1,8 +1,13 @@
package com.imdroid.secapi.dto; package com.imdroid.secapi.dto;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import java.sql.Timestamp;
@Mapper @Mapper
public interface ResendRecordMapper extends BaseMapper<ResendRecord> { public interface ResendRecordMapper extends BaseMapper<ResendRecord> {
@Delete({"delete from resendrecords where createtime <= #{t}"})
int deleteTimeBefore(Timestamp t);
} }

View File

@ -34,7 +34,8 @@ public class MessageParser {
types.put((short)0xd312, D31xConfigAckMessage.class);//单片机通用参数配置应答 types.put((short)0xd312, D31xConfigAckMessage.class);//单片机通用参数配置应答
types.put((short)0xd313, D31xConfigAckMessage.class);//单片机DEBUG应答 types.put((short)0xd313, D31xConfigAckMessage.class);//单片机DEBUG应答
types.put((short)0xd31A, D31xConfigAckMessage.class);//DTU配置应答 types.put((short)0xd31A, D31xConfigAckMessage.class);//DTU配置应答
types.put((short)0xd350, D350TestMessage.class);//DTU配置应答 types.put((short)0xd31B, D31xConfigAckMessage.class);//LORA配置应答
types.put((short)0xd350, D350TestMessage.class);//ACC上报
} }

View File

@ -50,6 +50,14 @@ public class D3F2StopIndicationMessage extends BaseMessage {
otherInfo = otherInfo + ", other err:"+value; otherInfo = otherInfo + ", other err:"+value;
//trxMsg.setUart2unknown((int) value); //trxMsg.setUart2unknown((int) value);
} }
else if (key == 11) {//串口3
otherInfo = otherInfo + ", uart3 tx:"+value;
//trxMsg.setUart2unknown((int) value);
}
else if (key == 12) {//串口3
otherInfo = otherInfo + ", uart3 rx:"+value;
//trxMsg.setUart2unknown((int) value);
}
} }
} }

View File

@ -63,7 +63,7 @@ public class CmdLineController extends BasicController{
else{ //hex format else{ //hex format
msgType = 0xD310+cmdType; msgType = 0xD310+cmdType;
len = (short) (sendCmd.length()/2+4); len = (short) (sendCmd.length()/2+4);
sendCmd = "D31"+ cmdType + HexUtil.Short2HexString(len)+ sendCmd = Integer.toHexString(msgType) + HexUtil.Short2HexString(len)+
HexUtil.Int2HexString(Integer.parseInt(deviceId))+sendCmd; HexUtil.Int2HexString(Integer.parseInt(deviceId))+sendCmd;
} }
HttpResp<HashMap<String, Object>> rsp = rtcmClient.config(deviceId,sendCmd); HttpResp<HashMap<String, Object>> rsp = rtcmClient.config(deviceId,sendCmd);

View File

@ -30,6 +30,10 @@ public class DatasetCleaner {
GnssTrxMsgMapper trxMsgMapper; GnssTrxMsgMapper trxMsgMapper;
@Autowired @Autowired
GnssRawDataMapper rawDataMapper; GnssRawDataMapper rawDataMapper;
@Autowired
ResendRecordMapper resendRecordMapper;
@Autowired
FwdRecordMapper fwdRecordMapper;
//cron表达式格式 //cron表达式格式
//{秒数} {分钟} {小时} {日期} {月份} {星期} {年份(可为空)} //{秒数} {分钟} {小时} {日期} {月份} {星期} {年份(可为空)}
@ -41,15 +45,22 @@ public class DatasetCleaner {
checkMsgDataset(); checkMsgDataset();
checkRawDataset(); checkRawDataset();
checkFwdDataset(); checkFwdDataset();
checkStatusDataset();
} }
void checkMsgDataset(){ void checkMsgDataset(){
long before = System.currentTimeMillis() - long before = System.currentTimeMillis() -
(long)90 * 24 * 3600 * 1000; (long)30 * 24 * 3600 * 1000;
Timestamp t = new Timestamp(before); Timestamp t = new Timestamp(before);
int count = gnssMsgMapper.deleteTimeBefore(t); int count = gnssMsgMapper.deleteTimeBefore(t);
log.info("clean msg dataset num: "+count); log.info("clean msg dataset num: "+count);
count = statusMsgMapper.deleteTimeBefore(t); }
void checkStatusDataset(){
long before = System.currentTimeMillis() -
(long)90 * 24 * 3600 * 1000;
Timestamp t = new Timestamp(before);
int count = statusMsgMapper.deleteTimeBefore(t);
log.info("clean status msg dataset num: "+count); log.info("clean status msg dataset num: "+count);
count = trxMsgMapper.deleteTimeBefore(t); count = trxMsgMapper.deleteTimeBefore(t);
log.info("clean trx msg dataset num: "+count); log.info("clean trx msg dataset num: "+count);
@ -67,7 +78,9 @@ public class DatasetCleaner {
long before = System.currentTimeMillis() - long before = System.currentTimeMillis() -
(long)365 * 24 * 3600 * 1000; (long)365 * 24 * 3600 * 1000;
Timestamp t = new Timestamp(before); Timestamp t = new Timestamp(before);
int count = rawDataMapper.deleteTimeBefore(t); int count = fwdRecordMapper.deleteTimeBefore(t);
log.info("clean fwd dataset num: "+count); log.info("clean fwd dataset num: "+count);
count = resendRecordMapper.deleteTimeBefore(t);
log.info("clean resend dataset num: "+count);
} }
} }

View File

@ -47,6 +47,7 @@
<option value="0">GNSS</option> <option value="0">GNSS</option>
<option value="1">DTU</option> <option value="1">DTU</option>
<option value="2">MPU</option> <option value="2">MPU</option>
<option value="11">LORA</option>
<option value="3">DEBUG</option> <option value="3">DEBUG</option>
</select> </select>
</div> </div>