add mock data upload
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
package com.mogo.realtime.api;
|
||||
|
||||
|
||||
import com.mogo.realtime.entity.DataCollectWrapper;
|
||||
import com.mogo.realtime.entity.SocketReceiveDataProto3;
|
||||
|
||||
/**
|
||||
* 蘑菇AI云平台实时定位点上报服务接口
|
||||
@@ -9,13 +8,8 @@ import com.mogo.realtime.entity.DataCollectWrapper;
|
||||
public interface IRealTimeProvider {
|
||||
|
||||
/**
|
||||
* 获取 adas 识别列表,由外部传入
|
||||
* 发送消息,由外部传入
|
||||
*/
|
||||
// List<ADASRecognizedResult> getLastADASRecognizedResult(); // todo 数据实体替换成PB
|
||||
|
||||
/**
|
||||
* 发送消息,由外部传入ø
|
||||
*/
|
||||
DataCollectWrapper.DataCollectMsg getLocationMsg(); // todo 数据实体替换成PB
|
||||
SocketReceiveDataProto3.SocketReceiveDataProto getLocationMsg();
|
||||
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@ import android.content.Context;
|
||||
|
||||
import com.mogo.cloud.socket.entity.MsgBody;
|
||||
import com.mogo.realtime.constant.RealTimeConstant;
|
||||
import com.mogo.realtime.entity.DataCollectWrapper;
|
||||
import com.mogo.realtime.entity.SocketReceiveDataProto3;
|
||||
import com.mogo.realtime.socket.SocketHandler;
|
||||
import com.mogo.realtime.spi.RealTimeProviderImp;
|
||||
|
||||
@@ -57,12 +57,12 @@ public class SnapshotUploadInTime implements UploadInTimeHandler.IUploadInTimeLi
|
||||
|
||||
@Override
|
||||
public void sendLocationData() {
|
||||
DataCollectWrapper.DataCollectMsg dataCollectMsg =
|
||||
SocketReceiveDataProto3.SocketReceiveDataProto socketReceiveDataProto =
|
||||
RealTimeProviderImp.getInstance().getLocationMsg();//SPI接口返回
|
||||
if (dataCollectMsg != null) {
|
||||
if (socketReceiveDataProto != null) {
|
||||
MsgBody msgBody = new MsgBody();
|
||||
msgBody.msgType(RealTimeConstant.HIGH_FREQUENCY_CHANNEL_ID);
|
||||
msgBody.content(dataCollectMsg.toByteArray());
|
||||
msgBody.content(socketReceiveDataProto.toByteArray());
|
||||
SocketHandler.getInstance().sendMsg(msgBody);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.mogo.realtime.spi;
|
||||
|
||||
import com.mogo.realtime.api.IRealTimeProvider;
|
||||
import com.mogo.realtime.entity.DataCollectWrapper;
|
||||
import com.mogo.realtime.entity.SocketReceiveDataProto3;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -29,7 +30,7 @@ public class RealTimeProviderImp implements IRealTimeProvider {
|
||||
}
|
||||
|
||||
@Override
|
||||
public DataCollectWrapper.DataCollectMsg getLocationMsg() {
|
||||
public SocketReceiveDataProto3.SocketReceiveDataProto getLocationMsg() {
|
||||
if (mDelegate != null) {
|
||||
return mDelegate.getLocationMsg();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user