1、暂停log收集
2、如果连续无固定解,发冷启动指令
This commit is contained in:
parent
579a15e1bd
commit
bbff4754d3
@ -113,8 +113,4 @@ public class D341LocationMessageExecutor implements Executor<D341LocationMessage
|
|||||||
public Class<?> getMessageType() {
|
public Class<?> getMessageType() {
|
||||||
return D341LocationMessage.class;
|
return D341LocationMessage.class;
|
||||||
}
|
}
|
||||||
|
|
||||||
void executeInThread(D341LocationMessage message){
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -4,6 +4,7 @@ import com.imdroid.common.util.DataTypeUtil;
|
|||||||
import com.imdroid.common.util.HexUtil;
|
import com.imdroid.common.util.HexUtil;
|
||||||
import com.imdroid.common.util.ThreadManager;
|
import com.imdroid.common.util.ThreadManager;
|
||||||
import com.imdroid.secapi.client.BeidouClient;
|
import com.imdroid.secapi.client.BeidouClient;
|
||||||
|
import com.imdroid.secapi.dto.GnssDevice;
|
||||||
import com.imdroid.secapi.dto.GnssMsg;
|
import com.imdroid.secapi.dto.GnssMsg;
|
||||||
import com.imdroid.secapi.dto.GnssMsgMapper;
|
import com.imdroid.secapi.dto.GnssMsgMapper;
|
||||||
import com.imdroid.secapi.dto.GnssStatus;
|
import com.imdroid.secapi.dto.GnssStatus;
|
||||||
@ -52,8 +53,8 @@ public class D3F0SelfCheckMessageExecutor implements Executor<D3F0SelfCheckMessa
|
|||||||
//应答
|
//应答
|
||||||
sendD3F1Ack(device);
|
sendD3F1Ack(device);
|
||||||
|
|
||||||
// 检查是否需要对设备的F9P进行断电操作
|
// 检查是否需要对设备的F9P进行冷启动操作
|
||||||
checkAndSendF9PPowerOffCommand(device);
|
checkAndSendF9PColdStartCommand(device);
|
||||||
// 补齐tenantId
|
// 补齐tenantId
|
||||||
message.setTenantId(device.getTenantId());
|
message.setTenantId(device.getTenantId());
|
||||||
device.updateRx(message.getHeader(),message.getLen(),1);
|
device.updateRx(message.getHeader(),message.getLen(),1);
|
||||||
@ -83,7 +84,7 @@ public class D3F0SelfCheckMessageExecutor implements Executor<D3F0SelfCheckMessa
|
|||||||
return D3F0SelfCheckMessage.class;
|
return D3F0SelfCheckMessage.class;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void checkAndSendF9PPowerOffCommand(Device device){
|
/*private void checkAndSendF9PPowerOffCommand(Device device){
|
||||||
if(device.getDeviceId().startsWith("2419") && device.getDeviceType() == Device.DEVICE_ROVER){
|
if(device.getDeviceId().startsWith("2419") && device.getDeviceType() == Device.DEVICE_ROVER){
|
||||||
// 连续6个周期无解,则立即发送F9P断电指令
|
// 连续6个周期无解,则立即发送F9P断电指令
|
||||||
if(device.getNoFixedAndFloatResult() >= 6){
|
if(device.getNoFixedAndFloatResult() >= 6){
|
||||||
@ -92,6 +93,17 @@ public class D3F0SelfCheckMessageExecutor implements Executor<D3F0SelfCheckMessa
|
|||||||
device.clearNoResultStat();
|
device.clearNoResultStat();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}*/
|
||||||
|
|
||||||
|
private void checkAndSendF9PColdStartCommand(Device device){
|
||||||
|
if(device.getModel() == GnssDevice.MODEL_G505){
|
||||||
|
// 连续6个周期无解,则发送 F9P 冷启动指令
|
||||||
|
if(device.getNoFixedAndFloatResult() >= 6){
|
||||||
|
sendF9PColdStartCommand(device);
|
||||||
|
logger.debug("{}: 连续{}次无固定解和浮点解,发送 F9P 冷启动指令",device.getDeviceId(), device.getNoFixedAndFloatResult());
|
||||||
|
device.clearNoResultStat();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void saveMsg(String deviceId, int tenantId, int msgType, String content,boolean isTx){
|
void saveMsg(String deviceId, int tenantId, int msgType, String content,boolean isTx){
|
||||||
@ -110,7 +122,7 @@ public class D3F0SelfCheckMessageExecutor implements Executor<D3F0SelfCheckMessa
|
|||||||
gnssMsg.setContent(content.substring(0,128));
|
gnssMsg.setContent(content.substring(0,128));
|
||||||
msgMapper.insert(gnssMsg);
|
msgMapper.insert(gnssMsg);
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
void sendF9PPowerOffCommand(Device device){
|
void sendF9PPowerOffCommand(Device device){
|
||||||
int flag = 0xD313;
|
int flag = 0xD313;
|
||||||
String sendCmd = "2500";
|
String sendCmd = "2500";
|
||||||
@ -123,6 +135,17 @@ public class D3F0SelfCheckMessageExecutor implements Executor<D3F0SelfCheckMessa
|
|||||||
rtcmClient.config(device.getDeviceId(), sendCmd);
|
rtcmClient.config(device.getDeviceId(), sendCmd);
|
||||||
saveMsg(device.getDeviceId(), device.getTenantId(),0xD313, sendCmd, true);
|
saveMsg(device.getDeviceId(), device.getTenantId(),0xD313, sendCmd, true);
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
void sendF9PColdStartCommand(Device device){
|
||||||
|
int msgType = 0xD310;
|
||||||
|
// F9P 冷启动 b5 62 06 04 04 00 00 00 02 00 10 68
|
||||||
|
String sendCmd = "b56206040400000002001068";
|
||||||
|
short len = (short) (sendCmd.length()/2+4);
|
||||||
|
sendCmd = Integer.toHexString(msgType) + HexUtil.Short2HexString(len)+
|
||||||
|
HexUtil.Int2HexString(Integer.parseInt(device.getDeviceId()))+sendCmd;
|
||||||
|
rtcmClient.config(device.getDeviceId(), sendCmd);
|
||||||
|
saveMsg(device.getDeviceId(), device.getTenantId(),0xD310, sendCmd, true);
|
||||||
|
}
|
||||||
|
|
||||||
void sendD3F1Ack(Device device){
|
void sendD3F1Ack(Device device){
|
||||||
int flag = 0xD3F1;
|
int flag = 0xD3F1;
|
||||||
|
|||||||
@ -181,7 +181,7 @@ public class WarningServiceImpl implements WarningService {
|
|||||||
curStatus.setWarningcode(curStatus.getWarningcode() | warningType);
|
curStatus.setWarningcode(curStatus.getWarningcode() | warningType);
|
||||||
|
|
||||||
// 新告警出现后,生成对应设备的 warning 日志文件
|
// 新告警出现后,生成对应设备的 warning 日志文件
|
||||||
generate_warning_logs(curStatus.getDeviceid(),warningType,auxInfo);
|
//generate_warning_logs(curStatus.getDeviceid(),warningType,auxInfo);
|
||||||
}
|
}
|
||||||
isUpdated = true;
|
isUpdated = true;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user