Browse Source

change ADCIntelligentShow_grpc. add xodrraw support.

yuchuli 1 year ago
parent
commit
da7959d669

+ 1 - 1
src/common/common/xodr/OpenDrive/OpenDriveXmlParser.cpp

@@ -3168,7 +3168,7 @@ bool OpenDriveXmlParser::ReadFile(std::string fileName)
 	}
 	
 	//failed to read the file
-	cout<<"Could not read file: "<<fileName<<endl;
+//	cout<<"Could not read file: "<<fileName<<endl;
 	return false;
 }
 //--------------

+ 20 - 0
src/driver/driver_grpc_client/ivgrpc.pb.cc

@@ -45,6 +45,7 @@ static void InitDefaultsscc_info_ModuleMsg_ivgrpc_2eproto() {
     new (ptr) ::iv::ModuleMsg();
     ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
   }
+  ::iv::ModuleMsg::InitAsDefaultInstance();
 }
 
 ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_ModuleMsg_ivgrpc_2eproto =
@@ -58,6 +59,7 @@ static void InitDefaultsscc_info_ctrlReply_ivgrpc_2eproto() {
     new (ptr) ::iv::ctrlReply();
     ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
   }
+  ::iv::ctrlReply::InitAsDefaultInstance();
 }
 
 ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_ctrlReply_ivgrpc_2eproto =
@@ -71,6 +73,7 @@ static void InitDefaultsscc_info_ctrlreq_ivgrpc_2eproto() {
     new (ptr) ::iv::ctrlreq();
     ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
   }
+  ::iv::ctrlreq::InitAsDefaultInstance();
 }
 
 ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_ctrlreq_ivgrpc_2eproto =
@@ -85,6 +88,7 @@ static void InitDefaultsscc_info_queryReply_ivgrpc_2eproto() {
     new (ptr) ::iv::queryReply();
     ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
   }
+  ::iv::queryReply::InitAsDefaultInstance();
 }
 
 ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_queryReply_ivgrpc_2eproto =
@@ -99,6 +103,7 @@ static void InitDefaultsscc_info_queryreq_ivgrpc_2eproto() {
     new (ptr) ::iv::queryreq();
     ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
   }
+  ::iv::queryreq::InitAsDefaultInstance();
 }
 
 ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_queryreq_ivgrpc_2eproto =
@@ -214,6 +219,8 @@ namespace iv {
 
 // ===================================================================
 
+void ModuleMsg::InitAsDefaultInstance() {
+}
 class ModuleMsg::_Internal {
  public:
   using HasBits = decltype(std::declval<ModuleMsg>()._has_bits_);
@@ -320,6 +327,7 @@ void ModuleMsg::Clear() {
 const char* ModuleMsg::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
   _Internal::HasBits has_bits{};
+  ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena;
   while (!ctx->Done(&ptr)) {
     ::PROTOBUF_NAMESPACE_ID::uint32 tag;
     ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
@@ -553,6 +561,8 @@ void ModuleMsg::InternalSwap(ModuleMsg* other) {
 
 // ===================================================================
 
+void queryreq::InitAsDefaultInstance() {
+}
 class queryreq::_Internal {
  public:
   using HasBits = decltype(std::declval<queryreq>()._has_bits_);
@@ -636,6 +646,7 @@ void queryreq::Clear() {
 const char* queryreq::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
   _Internal::HasBits has_bits{};
+  ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena;
   while (!ctx->Done(&ptr)) {
     ::PROTOBUF_NAMESPACE_ID::uint32 tag;
     ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
@@ -851,6 +862,8 @@ void queryreq::InternalSwap(queryreq* other) {
 
 // ===================================================================
 
+void queryReply::InitAsDefaultInstance() {
+}
 class queryReply::_Internal {
  public:
   using HasBits = decltype(std::declval<queryReply>()._has_bits_);
@@ -920,6 +933,7 @@ void queryReply::Clear() {
 const char* queryReply::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
   _Internal::HasBits has_bits{};
+  ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena;
   while (!ctx->Done(&ptr)) {
     ::PROTOBUF_NAMESPACE_ID::uint32 tag;
     ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
@@ -1090,6 +1104,8 @@ void queryReply::InternalSwap(queryReply* other) {
 
 // ===================================================================
 
+void ctrlreq::InitAsDefaultInstance() {
+}
 class ctrlreq::_Internal {
  public:
   using HasBits = decltype(std::declval<ctrlreq>()._has_bits_);
@@ -1173,6 +1189,7 @@ void ctrlreq::Clear() {
 const char* ctrlreq::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
   _Internal::HasBits has_bits{};
+  ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena;
   while (!ctx->Done(&ptr)) {
     ::PROTOBUF_NAMESPACE_ID::uint32 tag;
     ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
@@ -1381,6 +1398,8 @@ void ctrlreq::InternalSwap(ctrlreq* other) {
 
 // ===================================================================
 
+void ctrlReply::InitAsDefaultInstance() {
+}
 class ctrlReply::_Internal {
  public:
   using HasBits = decltype(std::declval<ctrlReply>()._has_bits_);
@@ -1446,6 +1465,7 @@ void ctrlReply::Clear() {
 const char* ctrlReply::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
   _Internal::HasBits has_bits{};
+  ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena;
   while (!ctx->Done(&ptr)) {
     ::PROTOBUF_NAMESPACE_ID::uint32 tag;
     ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);

+ 125 - 8
src/driver/driver_grpc_client/ivgrpc.pb.h

@@ -8,12 +8,12 @@
 #include <string>
 
 #include <google/protobuf/port_def.inc>
-#if PROTOBUF_VERSION < 3013000
+#if PROTOBUF_VERSION < 3012000
 #error This file was generated by a newer version of protoc which is
 #error incompatible with your Protocol Buffer headers. Please update
 #error your headers.
 #endif
-#if 3013000 < PROTOBUF_MIN_PROTOC_VERSION
+#if 3012004 < PROTOBUF_MIN_PROTOC_VERSION
 #error This file was generated by an older version of protoc which is
 #error incompatible with your Protocol Buffer headers. Please
 #error regenerate this file with a newer version of protoc.
@@ -45,7 +45,7 @@ PROTOBUF_NAMESPACE_CLOSE
 struct TableStruct_ivgrpc_2eproto {
   static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTableField entries[]
     PROTOBUF_SECTION_VARIABLE(protodesc_cold);
-  static const ::PROTOBUF_NAMESPACE_ID::internal::AuxiliaryParseTableField aux[]
+  static const ::PROTOBUF_NAMESPACE_ID::internal::AuxillaryParseTableField aux[]
     PROTOBUF_SECTION_VARIABLE(protodesc_cold);
   static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTable schema[5]
     PROTOBUF_SECTION_VARIABLE(protodesc_cold);
@@ -85,7 +85,7 @@ namespace iv {
 class ModuleMsg PROTOBUF_FINAL :
     public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:iv.ModuleMsg) */ {
  public:
-  inline ModuleMsg() : ModuleMsg(nullptr) {}
+  inline ModuleMsg() : ModuleMsg(nullptr) {};
   virtual ~ModuleMsg();
 
   ModuleMsg(const ModuleMsg& from);
@@ -125,6 +125,7 @@ class ModuleMsg PROTOBUF_FINAL :
   }
   static const ModuleMsg& default_instance();
 
+  static void InitAsDefaultInstance();  // FOR INTERNAL USE ONLY
   static inline const ModuleMsg* internal_default_instance() {
     return reinterpret_cast<const ModuleMsg*>(
                &_ModuleMsg_default_instance_);
@@ -220,6 +221,15 @@ class ModuleMsg PROTOBUF_FINAL :
   std::string* mutable_msgname();
   std::string* release_msgname();
   void set_allocated_msgname(std::string* msgname);
+  GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for"
+  "    string fields are deprecated and will be removed in a"
+  "    future release.")
+  std::string* unsafe_arena_release_msgname();
+  GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for"
+  "    string fields are deprecated and will be removed in a"
+  "    future release.")
+  void unsafe_arena_set_allocated_msgname(
+      std::string* msgname);
   private:
   const std::string& _internal_msgname() const;
   void _internal_set_msgname(const std::string& value);
@@ -240,6 +250,15 @@ class ModuleMsg PROTOBUF_FINAL :
   std::string* mutable_xdata();
   std::string* release_xdata();
   void set_allocated_xdata(std::string* xdata);
+  GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for"
+  "    string fields are deprecated and will be removed in a"
+  "    future release.")
+  std::string* unsafe_arena_release_xdata();
+  GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for"
+  "    string fields are deprecated and will be removed in a"
+  "    future release.")
+  void unsafe_arena_set_allocated_xdata(
+      std::string* xdata);
   private:
   const std::string& _internal_xdata() const;
   void _internal_set_xdata(const std::string& value);
@@ -292,7 +311,7 @@ class ModuleMsg PROTOBUF_FINAL :
 class queryreq PROTOBUF_FINAL :
     public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:iv.queryreq) */ {
  public:
-  inline queryreq() : queryreq(nullptr) {}
+  inline queryreq() : queryreq(nullptr) {};
   virtual ~queryreq();
 
   queryreq(const queryreq& from);
@@ -332,6 +351,7 @@ class queryreq PROTOBUF_FINAL :
   }
   static const queryreq& default_instance();
 
+  static void InitAsDefaultInstance();  // FOR INTERNAL USE ONLY
   static inline const queryreq* internal_default_instance() {
     return reinterpret_cast<const queryreq*>(
                &_queryreq_default_instance_);
@@ -450,6 +470,15 @@ class queryreq PROTOBUF_FINAL :
   std::string* mutable_strdevicename();
   std::string* release_strdevicename();
   void set_allocated_strdevicename(std::string* strdevicename);
+  GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for"
+  "    string fields are deprecated and will be removed in a"
+  "    future release.")
+  std::string* unsafe_arena_release_strdevicename();
+  GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for"
+  "    string fields are deprecated and will be removed in a"
+  "    future release.")
+  void unsafe_arena_set_allocated_strdevicename(
+      std::string* strdevicename);
   private:
   const std::string& _internal_strdevicename() const;
   void _internal_set_strdevicename(const std::string& value);
@@ -488,7 +517,7 @@ class queryreq PROTOBUF_FINAL :
 class queryReply PROTOBUF_FINAL :
     public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:iv.queryReply) */ {
  public:
-  inline queryReply() : queryReply(nullptr) {}
+  inline queryReply() : queryReply(nullptr) {};
   virtual ~queryReply();
 
   queryReply(const queryReply& from);
@@ -528,6 +557,7 @@ class queryReply PROTOBUF_FINAL :
   }
   static const queryReply& default_instance();
 
+  static void InitAsDefaultInstance();  // FOR INTERNAL USE ONLY
   static inline const queryReply* internal_default_instance() {
     return reinterpret_cast<const queryReply*>(
                &_queryReply_default_instance_);
@@ -656,7 +686,7 @@ class queryReply PROTOBUF_FINAL :
 class ctrlreq PROTOBUF_FINAL :
     public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:iv.ctrlreq) */ {
  public:
-  inline ctrlreq() : ctrlreq(nullptr) {}
+  inline ctrlreq() : ctrlreq(nullptr) {};
   virtual ~ctrlreq();
 
   ctrlreq(const ctrlreq& from);
@@ -696,6 +726,7 @@ class ctrlreq PROTOBUF_FINAL :
   }
   static const ctrlreq& default_instance();
 
+  static void InitAsDefaultInstance();  // FOR INTERNAL USE ONLY
   static inline const ctrlreq* internal_default_instance() {
     return reinterpret_cast<const ctrlreq*>(
                &_ctrlreq_default_instance_);
@@ -808,6 +839,15 @@ class ctrlreq PROTOBUF_FINAL :
   std::string* mutable_strdevicename();
   std::string* release_strdevicename();
   void set_allocated_strdevicename(std::string* strdevicename);
+  GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for"
+  "    string fields are deprecated and will be removed in a"
+  "    future release.")
+  std::string* unsafe_arena_release_strdevicename();
+  GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for"
+  "    string fields are deprecated and will be removed in a"
+  "    future release.")
+  void unsafe_arena_set_allocated_strdevicename(
+      std::string* strdevicename);
   private:
   const std::string& _internal_strdevicename() const;
   void _internal_set_strdevicename(const std::string& value);
@@ -846,7 +886,7 @@ class ctrlreq PROTOBUF_FINAL :
 class ctrlReply PROTOBUF_FINAL :
     public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:iv.ctrlReply) */ {
  public:
-  inline ctrlReply() : ctrlReply(nullptr) {}
+  inline ctrlReply() : ctrlReply(nullptr) {};
   virtual ~ctrlReply();
 
   ctrlReply(const ctrlReply& from);
@@ -886,6 +926,7 @@ class ctrlReply PROTOBUF_FINAL :
   }
   static const ctrlReply& default_instance();
 
+  static void InitAsDefaultInstance();  // FOR INTERNAL USE ONLY
   static inline const ctrlReply* internal_default_instance() {
     return reinterpret_cast<const ctrlReply*>(
                &_ctrlReply_default_instance_);
@@ -1073,6 +1114,25 @@ inline void ModuleMsg::set_allocated_msgname(std::string* msgname) {
       GetArena());
   // @@protoc_insertion_point(field_set_allocated:iv.ModuleMsg.msgname)
 }
+inline std::string* ModuleMsg::unsafe_arena_release_msgname() {
+  // @@protoc_insertion_point(field_unsafe_arena_release:iv.ModuleMsg.msgname)
+  GOOGLE_DCHECK(GetArena() != nullptr);
+  _has_bits_[0] &= ~0x00000001u;
+  return msgname_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
+      GetArena());
+}
+inline void ModuleMsg::unsafe_arena_set_allocated_msgname(
+    std::string* msgname) {
+  GOOGLE_DCHECK(GetArena() != nullptr);
+  if (msgname != nullptr) {
+    _has_bits_[0] |= 0x00000001u;
+  } else {
+    _has_bits_[0] &= ~0x00000001u;
+  }
+  msgname_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
+      msgname, GetArena());
+  // @@protoc_insertion_point(field_unsafe_arena_set_allocated:iv.ModuleMsg.msgname)
+}
 
 // optional int64 index = 2;
 inline bool ModuleMsg::_internal_has_index() const {
@@ -1203,6 +1263,25 @@ inline void ModuleMsg::set_allocated_xdata(std::string* xdata) {
       GetArena());
   // @@protoc_insertion_point(field_set_allocated:iv.ModuleMsg.xdata)
 }
+inline std::string* ModuleMsg::unsafe_arena_release_xdata() {
+  // @@protoc_insertion_point(field_unsafe_arena_release:iv.ModuleMsg.xdata)
+  GOOGLE_DCHECK(GetArena() != nullptr);
+  _has_bits_[0] &= ~0x00000002u;
+  return xdata_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
+      GetArena());
+}
+inline void ModuleMsg::unsafe_arena_set_allocated_xdata(
+    std::string* xdata) {
+  GOOGLE_DCHECK(GetArena() != nullptr);
+  if (xdata != nullptr) {
+    _has_bits_[0] |= 0x00000002u;
+  } else {
+    _has_bits_[0] &= ~0x00000002u;
+  }
+  xdata_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
+      xdata, GetArena());
+  // @@protoc_insertion_point(field_unsafe_arena_set_allocated:iv.ModuleMsg.xdata)
+}
 
 // -------------------------------------------------------------------
 
@@ -1281,6 +1360,25 @@ inline void queryreq::set_allocated_strdevicename(std::string* strdevicename) {
       GetArena());
   // @@protoc_insertion_point(field_set_allocated:iv.queryreq.strdevicename)
 }
+inline std::string* queryreq::unsafe_arena_release_strdevicename() {
+  // @@protoc_insertion_point(field_unsafe_arena_release:iv.queryreq.strdevicename)
+  GOOGLE_DCHECK(GetArena() != nullptr);
+  _has_bits_[0] &= ~0x00000001u;
+  return strdevicename_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
+      GetArena());
+}
+inline void queryreq::unsafe_arena_set_allocated_strdevicename(
+    std::string* strdevicename) {
+  GOOGLE_DCHECK(GetArena() != nullptr);
+  if (strdevicename != nullptr) {
+    _has_bits_[0] |= 0x00000001u;
+  } else {
+    _has_bits_[0] &= ~0x00000001u;
+  }
+  strdevicename_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
+      strdevicename, GetArena());
+  // @@protoc_insertion_point(field_unsafe_arena_set_allocated:iv.queryreq.strdevicename)
+}
 
 // repeated string strmsgname = 2;
 inline int queryreq::_internal_strmsgname_size() const {
@@ -1532,6 +1630,25 @@ inline void ctrlreq::set_allocated_strdevicename(std::string* strdevicename) {
       GetArena());
   // @@protoc_insertion_point(field_set_allocated:iv.ctrlreq.strdevicename)
 }
+inline std::string* ctrlreq::unsafe_arena_release_strdevicename() {
+  // @@protoc_insertion_point(field_unsafe_arena_release:iv.ctrlreq.strdevicename)
+  GOOGLE_DCHECK(GetArena() != nullptr);
+  _has_bits_[0] &= ~0x00000001u;
+  return strdevicename_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
+      GetArena());
+}
+inline void ctrlreq::unsafe_arena_set_allocated_strdevicename(
+    std::string* strdevicename) {
+  GOOGLE_DCHECK(GetArena() != nullptr);
+  if (strdevicename != nullptr) {
+    _has_bits_[0] |= 0x00000001u;
+  } else {
+    _has_bits_[0] &= ~0x00000001u;
+  }
+  strdevicename_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
+      strdevicename, GetArena());
+  // @@protoc_insertion_point(field_unsafe_arena_set_allocated:iv.ctrlreq.strdevicename)
+}
 
 // repeated .iv.ModuleMsg msg = 2;
 inline int ctrlreq::_internal_msg_size() const {

+ 14 - 0
src/ui/ADCIntelligentShow_grpc/ADCIntelligentShow_grpc_android.pro

@@ -40,12 +40,15 @@ SOURCES += \
     ./proto1804/msgtype/imu.pb.cc \
     ./proto1804/msgtype/radarobject.pb.cc \
     ./proto1804/msgtype/radarobjectarray.pb.cc \
+    const.cpp \
     dialogsetting.cpp \
+    fresnl.cpp \
     ivmapview.cpp \
     ivview.cpp \
         main.cpp \
     adcintelligentshow.cpp \
     myview.cpp \
+    polevl.c \
     proto1804/msgtype/fusionobject.pb.cc \
     proto1804/msgtype/fusionobjectarray.pb.cc \
     proto1804/msgtype/vehinfo.pb.cc
@@ -128,6 +131,17 @@ INCLUDEPATH += $$PWD/../src/include/msgtype
     error( "Couldn't find the ivyaml-cpp.pri file!" )
 }
 
+!include(../../common/common/xodr/OpenDrive/OpenDrive.pri ) {
+    error( "Couldn't find the OpenDrive.pri file!" )
+}
+
+!include(../../common/common/xodr/TinyXML/TinyXML.pri ) {
+    error( "Couldn't find the TinyXML.pri file!" )
+}
+
+
+INCLUDEPATH += $$PWD/../../common/common/xodr
+
 INCLUDEPATH += $$PWD/../../decition/common
 INCLUDEPATH += $$PWD/../../decition/common/common
 

+ 39 - 0
src/ui/ADCIntelligentShow_grpc/adcintelligentshow.cpp

@@ -163,6 +163,14 @@ void ListenTraceMap(const char * strdata,const unsigned int nSize,const unsigned
     gAShow->UpdateMap(strdata,nSize);
 }
 
+void ListenXodrRawRep(const char * strdata,const unsigned int nSize,const unsigned int index,const QDateTime * dt,const char * strmemname)
+{
+    (void)&index;
+    (void)dt;
+    (void)strmemname;
+    gAShow->UpdateXodrRaw(strdata,nSize);
+}
+
 #ifdef Android
     void ADCIntelligentShow::AndroidSetMsg(const char * msgname , const char *strdata, const unsigned int nDataLen)
     {
@@ -200,6 +208,11 @@ void ListenTraceMap(const char * strdata,const unsigned int nSize,const unsigned
    //         qDebug("li ra fusion.");
             ListenFusion(strdata,nDataLen,0,0,0);
         }
+        if(strncmp(msgname,"xodrrawrep",256) == 0)
+        {
+   //         qDebug("li ra fusion.");
+            ListenXodrRawRep(strdata,nDataLen,0,0,0);
+        }
     }
 #endif
 
@@ -211,6 +224,8 @@ ADCIntelligentShow::ADCIntelligentShow(QWidget *parent) :
     ui->setupUi(this);
     ui->pushButton->setEnabled(false);
 
+ //   qDebug("run hear.");
+
     mpivmapview = new ivmapview();
     mpivmapview->start();
 
@@ -239,6 +254,8 @@ ADCIntelligentShow::ADCIntelligentShow(QWidget *parent) :
     loadMapFromFile("map.txt");
 
 
+
+
     image = new QImage(900*2,900*2,QImage::Format_RGB32);
     painter = new QPainter(image);
     myview = new MyView(ui->widget_2);
@@ -311,6 +328,9 @@ ADCIntelligentShow::ADCIntelligentShow(QWidget *parent) :
 
     mpapad = iv::modulecomm::RegisterSend("pad",1000,1);
 
+    mpaxodrrawreq = iv::modulecomm::RegisterSend("xodrrawreq",1000,1);
+    mpaxodrrawrep = iv::modulecomm::RegisterRecv("xodrrawrep",ListenXodrRawRep);
+
     mndefaultlane = atoi(gstrdefaultlane.data());
 
 
@@ -398,6 +418,7 @@ ADCIntelligentShow::ADCIntelligentShow(QWidget *parent) :
     ui->break_1->setStyleSheet("color: rgb(255, 255, 255);background-color: transparent;border-radius:10px;font: 23px 'Arial';border:7px groove rgb(0,45,70);");
 
 
+
 #endif
 }
 
@@ -631,6 +652,7 @@ void ADCIntelligentShow::onRecv()
 void ADCIntelligentShow::onconnTimer()
 {
     qint64 xTime = QDateTime::currentMSecsSinceEpoch();
+    static bool bNeedReq = true;
     if(recvFlag!=0)
     {
         //ui->connect->setText(QStringLiteral("已连接"));
@@ -691,6 +713,18 @@ void ADCIntelligentShow::onconnTimer()
             ui->mapimg->setStyleSheet("background-image: url(:/new/pic/red.png);");
         }
 
+        if(bNeedReq)
+        {
+            char strreq[10];
+            strreq[0] = 1;
+#ifndef Android
+            iv::modulecomm::ModuleSendMsg(mpaxodrrawreq,strreq,10);
+#else
+            ggt->UpdateData(strreq,10,"xodrrawreq");
+#endif
+            bNeedReq = false;
+        }
+
     }
     else
     {
@@ -1033,6 +1067,11 @@ void ADCIntelligentShow::onUpdateGPSIMU()
     ui->label->setText(QString::number((sqrt(pow(xgpsimu.ve(),2)+pow(xgpsimu.vn(),2))*3.6),'f',1));
 }
 
+void ADCIntelligentShow::UpdateXodrRaw(const char * xodrrawdata, const unsigned int ndatasize)
+{
+    mpivmapview->SetXodrRaw(xodrrawdata,ndatasize);
+}
+
 void ADCIntelligentShow::UpdateMap(const char *mapdata, const int mapdatasize)
 {
         std::cout<<"update map "<<std::endl;

+ 2 - 1
src/ui/ADCIntelligentShow_grpc/adcintelligentshow.h

@@ -240,6 +240,7 @@ public:
     void UpdateRADAR(iv::radar::radarobjectarray * pxobj);
     void UpdateOTAVehInfo(iv::veh::vehinfo & pvehinfo);
     void UpdateFusion(iv::fusion::fusionobjectarray & xfusion);
+    void UpdateXodrRaw(const char * xodrrawdata, const unsigned int ndatasize);
 
 
 #ifdef Android
@@ -278,7 +279,7 @@ private:
     qint64 mnVehInfoTime = 0;
 
 
-    void * mpagps, * mpatracemap, * mpalidarobs, * mpabrainstate, * mpadecision, * mparadar,* mpavehinfo;
+    void * mpagps, * mpatracemap, * mpalidarobs, * mpabrainstate, * mpadecision, * mparadar,* mpavehinfo, * mpaxodrrawreq, * mpaxodrrawrep;
 
     void *mpadst;
     int mnStationIndex = 0;

+ 95 - 4
src/ui/ADCIntelligentShow_grpc/ivmapview.cpp

@@ -1,5 +1,7 @@
 #include "ivmapview.h"
 
+#include <QFile>
+
 #define VIEW_WIDTH  1100
 #define VIEW_HEIGHT 900
 
@@ -13,6 +15,7 @@ double ghdg0 = 360;
 
 extern std::vector<iv::pos_def> gvectorpos;
 
+
 #include <math.h>
 //高斯投影由经纬度(Unit:DD)反算大地坐标(含带号,Unit:Metres)
 void GaussProjCal(double longitude, double latitude, double *X, double *Y)
@@ -54,6 +57,11 @@ static bool LoadXODR(std::string strpath,OpenDrive & xxodr)
 {
     OpenDriveXmlParser xp(&xxodr);
     xp.ReadFile(strpath);
+
+
+
+    return  true;
+
 }
 
 static int getmnfac(OpenDrive & mxodr,double & fmovex,double & fmovey)
@@ -109,7 +117,7 @@ static int getmnfac(OpenDrive & mxodr,double & fmovex,double & fmovey)
 
     if(bHaveRealRoad == false)
     {
-        std::cout<<"No Real Road."<<std::endl;
+ //       std::cout<<"No Real Road."<<std::endl;
         return 1.0;
     }
 
@@ -153,7 +161,7 @@ static int getmnfac(OpenDrive & mxodr,double & fmovex,double & fmovey)
         return nrtn;
     }
 
-    if(nrtn >(VIEW_WIDTH/1600))
+    if((nrtn >(VIEW_WIDTH/1600))&&(VIEW_WIDTH>1600))
     {
         nrtn = nrtn/(VIEW_WIDTH/1600);
     }
@@ -174,11 +182,23 @@ ivmapview::ivmapview()
     mobs.reset(pobs);
     mnavigation_data.clear();
 
+
+
+#ifdef Android
+    LoadXODR("/storage/emulated/0//map.xodr",mxodr);
+#else
     LoadXODR("./map.xodr",mxodr);
+#endif
+
+
+//    qDebug("run hear.");
 
     double fmovex,fmovey;
     mnfac = getmnfac(mxodr,fmovex,fmovey);
 
+
+
+
     mfViewMoveX = mfViewMoveX - fmovex;
     mfViewMoveY = mfViewMoveY - fmovey;
 
@@ -236,6 +256,14 @@ void ivmapview::run()
         }
         else
         {
+            mmutexxodrfile.lock();
+            if(mbNeedReload)
+            {
+                mxodr.Clear();
+                LoadXODR("./map.xodr",mxodr);
+                mbNeedReload = false;
+            }
+            mmutexxodrfile.unlock();
             paintxodr();
             msleep(100);
             std::cout<<"paint."<<std::endl;
@@ -261,7 +289,7 @@ void ivmapview::paintxodr()
      mMutexPaint.lock();
 
     painter->begin(image);
-    qDebug("time is %d",x.elapsed());
+
     image->fill(QColor(255, 255, 255));//对画布进行填充
 
     //    std::vector<iv::GPSData> navigation_data = brain->navigation_data;
@@ -563,7 +591,8 @@ void ivmapview::paintxodr()
     mMutexPaint.unlock();
     mbImageUpdate = true;
 
-    std::cout<<" draw map use: "<<(QDateTime::currentMSecsSinceEpoch() - xTime)<<std::endl;
+    qDebug("time is %d",x.elapsed());
+//    std::cout<<" draw map use: "<<(QDateTime::currentMSecsSinceEpoch() - xTime)<<std::endl;
 
 }
 
@@ -930,4 +959,66 @@ void ivmapview::setStationIndex(int nStationIndex)
     mnStationIndex = nStationIndex;
 }
 
+void ivmapview::SetXodrRaw(const char * strdata,const unsigned int ndatasize)
+{
+
+    bool bSave = false;
+    QFile xFile;
+#ifdef ANDROID
+    xFile.setFileName("/storage/emulated/0//map.xodr");
+#else
+    xFile.setFileName("./map.xodr");
+#endif
+    if(xFile.open(QIODevice::ReadOnly))
+    {
+        if(xFile.size() != ndatasize)
+        {
+            bSave = true;
+            std::cout<<" old size: "<<xFile.size()<<" data size: "<<ndatasize<<std::endl;
+        }
+        else
+        {
+            QByteArray ba = xFile.readAll();
+            unsigned int i;
+            char * pold = ba.data();
+            for(i=0;i<ndatasize;i++)
+            {
+                if(pold[i] != strdata[i])
+                {
+                    bSave = true;
+                    break;
+                }
+            }
+            if(bSave == false)
+                std::cout<<" not need update . size is same.info is same."<<std::endl;
+            else
+                std::cout<<"  size is same. but data info is diff."<<std::endl;
+        }
+        xFile.close();
+    }
+    else
+    {
+        if(!xFile.exists())
+        {
+            bSave = true;
+        }
+    }
+
+    if(bSave == false)
+    {
+        return;
+    }
+
+
+    mmutexxodrfile.lock();
+    if(xFile.open(QIODevice::ReadWrite))
+    {
+        xFile.resize(0);
+        xFile.write(strdata,ndatasize);
+        xFile.close();
+        mbNeedReload = true;
+    }
+
+    mmutexxodrfile.unlock();
+}
 

+ 4 - 0
src/ui/ADCIntelligentShow_grpc/ivmapview.h

@@ -96,6 +96,9 @@ private:
 
      int mnStationIndex = 0;
 
+     bool mbNeedReload = false;
+     std::mutex mmutexxodrfile;
+
 
 public:
     void setgps(iv::gps::gpsimu * pxgpsimu);
@@ -105,6 +108,7 @@ public:
     void setfusion(iv::fusion::fusionobjectarray & xfusion);
     void setMapMode(int nMode);
     void setStationIndex(int nStationIndex);
+    void SetXodrRaw(const char * strdata,const unsigned int ndatasize);
 };
 
 #endif // IVMAPVIEW_H

+ 2 - 0
src/ui/ADCIntelligentShow_grpc/main.cpp

@@ -209,8 +209,10 @@ int main(int argc, char *argv[])
        xrpcthread.addquerymsgunit("brainstate",10000,1);
        xrpcthread.addquerymsgunit("deciton",10000,1);
        xrpcthread.addquerymsgunit("radar",100000,1);
+       xrpcthread.addquerymsgunit("xodrrawrep",30000000,1);
        xrpcthread.addctrlmsgunit("pad",1000,1);
        xrpcthread.addctrlmsgunit("xodrreq",1000,1);
+       xrpcthread.addctrlmsgunit("xodrrawreq",1000,1);
        xrpcthread.addquerymsgunit("otavehinfo",1000,1);
        xrpcthread.addquerymsgunit("li_ra_fusion",10000000,1);