|
@@ -32,7 +32,7 @@ public class DipperDataAsyncTaskServiceImpl implements IDipperDataAsyncTaskServi |
|
|
@Override |
|
|
@Override |
|
|
public void pullAstEPH() { |
|
|
public void pullAstEPH() { |
|
|
// (1) 发送bds获取星历数据 |
|
|
// (1) 发送bds获取星历数据 |
|
|
byte[] dipperData = pullEPHFromDipper(); |
|
|
|
|
|
|
|
|
String dipperData = pullEPHFromDipper(); |
|
|
|
|
|
|
|
|
// (2) 获取星历数据 |
|
|
// (2) 获取星历数据 |
|
|
if (dipperData == null) { |
|
|
if (dipperData == null) { |
|
@@ -44,7 +44,7 @@ public class DipperDataAsyncTaskServiceImpl implements IDipperDataAsyncTaskServi |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private byte[] pullEPHFromDipper() { |
|
|
|
|
|
|
|
|
private String pullEPHFromDipper() { |
|
|
|
|
|
|
|
|
// 创建Socket客户端实例; |
|
|
// 创建Socket客户端实例; |
|
|
SocketClient client = new SocketClient(schedulingExecutorConfig.getAstServer(), schedulingExecutorConfig.getEphAstHexPort(),schedulingExecutorConfig.getAstTimeout()); |
|
|
SocketClient client = new SocketClient(schedulingExecutorConfig.getAstServer(), schedulingExecutorConfig.getEphAstHexPort(),schedulingExecutorConfig.getAstTimeout()); |
|
@@ -54,7 +54,7 @@ public class DipperDataAsyncTaskServiceImpl implements IDipperDataAsyncTaskServi |
|
|
String hexIn = astTimeCmd + HexConvert.makeChecksum(astTimeCmd); |
|
|
String hexIn = astTimeCmd + HexConvert.makeChecksum(astTimeCmd); |
|
|
|
|
|
|
|
|
String ackAckCheckRef = "233E010102000421293C"; |
|
|
String ackAckCheckRef = "233E010102000421293C"; |
|
|
byte[] sendResult = client.sendCmd(hexIn, ackAckCheckRef); |
|
|
|
|
|
|
|
|
String sendResult = client.sendCmd(hexIn, ackAckCheckRef); |
|
|
client.closeConnection(); |
|
|
client.closeConnection(); |
|
|
|
|
|
|
|
|
return sendResult; |
|
|
return sendResult; |
|
@@ -62,7 +62,7 @@ public class DipperDataAsyncTaskServiceImpl implements IDipperDataAsyncTaskServi |
|
|
|
|
|
|
|
|
@Override |
|
|
@Override |
|
|
@Async("asyncServiceExecutor") |
|
|
@Async("asyncServiceExecutor") |
|
|
public byte[] getAstEPH(){ |
|
|
|
|
|
return (byte[])redisUtil.get(DIPPER_DATA_KEY); |
|
|
|
|
|
|
|
|
public String getAstEPH(){ |
|
|
|
|
|
return (String)redisUtil.get(DIPPER_DATA_KEY); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |