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