Эх сурвалжийг харах

add v2x client module & v2x proto MSG & ui v2x msg

lijinliang 4 жил өмнө
parent
commit
303f6ce225

+ 10 - 0
src/include/proto/v2x.proto

@@ -17,3 +17,13 @@ message v2x
 	repeated uint32 stationID	= 5;//站点索引数组
 	repeated stationsGPS stGPS 	= 6;//站点GPS坐标数组
 };
+
+message v2xStEn
+{
+	required uint32 v2xStEn	= 1;//v2x状态请求
+};
+
+message v2xStReq
+{
+	required uint32 v2xStReq	= 1;//v2x状态请求
+};

+ 55 - 3
src/ui/ui_ads_hmi/ADCIntelligentVehicle.cpp

@@ -166,6 +166,26 @@ void ListenOBS(const char * strdata,const unsigned int nSize,const unsigned int
     //  gw->UpdateOBS(lidar_obs);
 }
 
+//v2x使能状态请求
+void ListenV2xStReq(const char * strdata,const unsigned int nSize,const unsigned int index,const QDateTime * dt,const char * strmemname)
+{
+//    gIvlog->info("hmi", "v2x enable request %d %d",nSize,sizeof(iv::v2x::v2xStReq));
+//    if(nSize < sizeof(iv::v2x::v2xStReq))
+//        return;
+
+    iv::v2x::v2xStReq xv2xStReqMsg;
+    if(!xv2xStReqMsg.ParseFromArray(strdata,nSize))
+    {
+        gIvlog->error("hmi", "iv::v2x::xv2xStReqMsg::ListenV2xStReq parse error");
+        return;
+    }
+    if(xv2xStReqMsg.v2xstreq())
+    {
+        gAV->UpdateV2xStEn(gAV->mv2xStEn);
+        gIvlog->info("hmi", "v2x enable request %d",1);
+    }
+}
+
 /**
  * @brief ADCIntelligentVehicle::ADCIntelligentVehicle
  * @param parent
@@ -187,8 +207,6 @@ ADCIntelligentVehicle::ADCIntelligentVehicle(QWidget *parent)
     gAV = this;
     gIvlog->info("ADCIntelligentVehicle Start Initialize");
     mTime.start();
-
-
 /*
     QString strpath = QCoreApplication::applicationDirPath();
     strpath = strpath + "/ADS_decision.xml";
@@ -296,6 +314,9 @@ ADCIntelligentVehicle::ADCIntelligentVehicle(QWidget *parent)
 
     mpaHMI = iv::modulecomm::RegisterSend("hmi",10*sizeof(iv::hmi::HMIBasic),10);
 
+    iv::modulecomm::RegisterRecv("v2xStReq", ListenV2xStReq);
+    mp_v2xStSend = iv::modulecomm::RegisterSend("v2xStEn",1000,1);
+
     mTimeState.start();
 
     mpManualCtrl = iv::modulecomm::RegisterSend("ivmanual",1000,1);
@@ -794,7 +815,7 @@ void ADCIntelligentVehicle::paintEvent(QPaintEvent *)
         myplan = m_plan;
         mMutexPlan.unlock();
 
-        std::cout<<"plan size is "<<myplan.size()<<std::endl;
+//        std::cout<<"plan size is "<<myplan.size()<<std::endl;
 
 
 
@@ -1645,6 +1666,23 @@ void ADCIntelligentVehicle::UpdateOBS(std::shared_ptr<std::vector<iv::ObstacleBa
     ServiceCarStatus.mLidarS = 10;
 }
 
+void ADCIntelligentVehicle::UpdateV2xStEn(unsigned int enable)
+{
+    iv::v2x::v2xStEn x;
+    x.set_v2xsten(enable);
+    int nsize = x.ByteSize();
+    char * str = new char[nsize];
+    if(x.SerializeToArray(str,nsize))
+    {
+        iv::modulecomm::ModuleSendMsg(mp_v2xStSend,str,nsize);
+    }
+    else
+    {
+        gIvlog->error("hmi","send enable st error");
+    }
+    delete str;
+}
+
 /**
  * @brief ADCIntelligentVehicle::ShareHMIMsg
  * @param xhmi
@@ -1760,3 +1798,17 @@ void ADCIntelligentVehicle::onCtrlManual(bool bCtrl)
     }
 }
 
+void ADCIntelligentVehicle::on_pb_v2xEn_clicked()
+{
+    qDebug()<<mv2xStEn;
+    if(mv2xStEn){
+        ui->pb_v2xEn->setText("云平台控制:开");
+        mv2xStEn = 0;
+    }
+    else{
+        ui->pb_v2xEn->setText("云平台控制:关");
+        mv2xStEn = 1;
+    }
+    gIvlog->info("hmi","v2x enable:%d", mv2xStEn);
+    UpdateV2xStEn(mv2xStEn);
+}

+ 6 - 3
src/ui/ui_ads_hmi/ADCIntelligentVehicle.h

@@ -60,7 +60,7 @@
 #include "decition.pb.h"
 #include "brainstate.pb.h"
 #include "canstate.pb.h"
-
+#include "v2x.pb.h"
 #include "ivlog.h"
 extern iv::Ivlog * gIvlog;
 
@@ -196,6 +196,8 @@ private slots:
 
     void onCtrlManual(bool bCtrl);
 
+    void on_pb_v2xEn_clicked();
+
 private:
     Ui::ADCIntelligentVehicle *ui;
     //    boost::shared_ptr<iv::decition::BrainDecition> brain;
@@ -283,7 +285,7 @@ private:
 
 public:
     void UpdateGPSIMU(const char * strdata,const unsigned int nSize,const unsigned int index,const QDateTime * dt,const char * strmemname);
-
+    unsigned int mv2xStEn = 0;
 private:
     void * mparadar;
 private:
@@ -325,8 +327,9 @@ private:
 
 public:
     void UpdateOBS(std::shared_ptr<std::vector<iv::ObstacleBasic> > lidar_obs);
-
+    void UpdateV2xStEn(unsigned int enable);
 private:
+    void * mp_v2xStSend;
     void ShareHMIMsg(iv::hmi::HMIBasic xhmi);
 
     iv::Ivlog * mpivlog;

+ 14 - 1
src/ui/ui_ads_hmi/ADCIntelligentVehicle.ui

@@ -98,7 +98,7 @@
      </rect>
     </property>
     <property name="currentIndex">
-     <number>2</number>
+     <number>0</number>
     </property>
     <widget class="QWidget" name="page_0">
      <widget class="QGroupBox" name="groupBox_2">
@@ -161,6 +161,18 @@
          </property>
         </widget>
        </item>
+       <item>
+        <widget class="QPushButton" name="pb_v2xEn">
+         <property name="font">
+          <font>
+           <family>AR PL UKai CN</family>
+          </font>
+         </property>
+         <property name="text">
+          <string>使能云平台控制</string>
+         </property>
+        </widget>
+       </item>
       </layout>
      </widget>
      <widget class="QGroupBox" name="groupBox_3">
@@ -2071,6 +2083,7 @@ p, li { white-space: pre-wrap; }
  <resources>
   <include location="ADCIntelligentVehicle.qrc"/>
   <include location="ADCIntelligentVehicle.qrc"/>
+  <include location="ADCIntelligentVehicle.qrc"/>
  </resources>
  <connections>
   <connection>

+ 2 - 0
src/ui/ui_ads_hmi/ui_ads_hmi.pro

@@ -50,6 +50,7 @@ SOURCES += \
     ../../include/msgtype/decition.pb.cc \
     ../../include/msgtype/gpsimu.pb.cc \
     ../../include/msgtype/canstate.pb.cc \
+    ../../include/msgtype/v2x.pb.cc \
     ../../include/msgtype/chassis.pb.cc
 
 HEADERS += \
@@ -67,6 +68,7 @@ HEADERS += \
     ../../include/msgtype/decition.pb.h \
     ../../include/msgtype/canstate.pb.h \
     ../../include/msgtype/gpsimu.pb.h \
+    ../../include/msgtype/v2x.pb.h \
     ../../include/msgtype/chassis.pb.h
 
 

+ 54 - 0
src/v2x/v2xTcpClient/data_type.h

@@ -0,0 +1,54 @@
+#ifndef DATA_TYPE_H
+#define DATA_TYPE_H
+/// cameral status, 2019-10-18
+enum DownID { StopCommand = 1, AutoPilotControl, StationCommand };
+struct VehicleStatus
+{
+    int cam0 = 0;
+    int cam1 = 0;
+    int cam2 = 0;
+    int cam3 = 0;
+};
+struct HardwareStatus
+{
+    int cam0 = 0;
+    int cam1 = 0;
+    int cam2 = 0;
+    int cam3 = 0;
+};
+struct ObstacleData
+{
+    int cam0 = 0;
+    int cam1 = 0;
+    int cam2 = 0;
+    int cam3 = 0;
+};
+struct SoftwareStatus
+{
+    int cam0 = 0;
+    int cam1 = 0;
+    int cam2 = 0;
+    int cam3 = 0;
+};
+struct EmergencyStop
+{
+    int cam0 = 0;
+    int cam1 = 0;
+    int cam2 = 0;
+    int cam3 = 0;
+};
+struct AutoPilotControl
+{
+    int cam0 = 0;
+    int cam1 = 0;
+    int cam2 = 0;
+    int cam3 = 0;
+};
+struct StationCommand
+{
+    int cam0 = 0;
+    int cam1 = 0;
+    int cam2 = 0;
+    int cam3 = 0;
+};
+#endif // DATA_TYPE_H

+ 11 - 0
src/v2x/v2xTcpClient/main.cpp

@@ -0,0 +1,11 @@
+#include "mainwindow.h"
+#include <QApplication>
+
+int main(int argc, char *argv[])
+{
+    QApplication a(argc, argv);
+    MainWindow w;
+    w.show();
+
+    return a.exec();
+}

+ 304 - 0
src/v2x/v2xTcpClient/mainwindow.cpp

@@ -0,0 +1,304 @@
+#include "mainwindow.h"
+#include "ui_mainwindow.h"
+
+iv::Ivlog *givlog;
+unsigned int gv2xEn = false;
+
+void ListenV2xStEn(const char * strdata,const unsigned int nSize,const unsigned int index,const QDateTime * dt,const char * strmemname)
+{
+//    if(nSize < sizeof(iv::v2x::v2xStEn))
+//    {
+//        givlog->error("v2x","ListenV2xStEn size error %d",nSize,sizeof(iv::v2x::v2xStEn));
+//        return;
+//    }
+
+    iv::v2x::v2xStEn xv2xStEnMsg;
+    if(!xv2xStEnMsg.ParseFromArray(strdata,nSize))
+    {
+        givlog->error("iv::v2x::v2xStEn::ListenV2xStEn parse error");
+        return;
+    }
+    gv2xEn = xv2xStEnMsg.v2xsten();
+
+    givlog->info("v2x", "v2x enable st: %d", gv2xEn);
+}
+
+MainWindow::MainWindow(QWidget *parent) :
+    QMainWindow(parent),
+    ui(new Ui::MainWindow)
+{
+    ui->setupUi(this);
+    socket=new QTcpSocket();    
+    ui->lineEdit_ip->setText("47.95.196.28");
+    ui->lineEdit_port->setText("12123");
+    //连接信号槽
+
+    givlog = new iv::Ivlog("v2x");
+    connect(socket, &QTcpSocket::readyRead, this, &MainWindow::socket_Read_Data);
+    connect(socket, &QTcpSocket::disconnected, this, &MainWindow::socket_Disconnected);
+
+    mp_v2xSend = iv::modulecomm::RegisterSend("v2x",1000,3);
+    iv::modulecomm::RegisterRecv("v2xStEn", ListenV2xStEn);
+    mp_v2xStSend = iv::modulecomm::RegisterSend("v2xStReq",1000,1);
+    shareV2xStReqMsg();
+}
+
+MainWindow::~MainWindow()
+{
+    delete this->socket;
+    delete ui;
+}
+void MainWindow::socket_Read_Data()
+{
+    QByteArray buffer;
+    //读取缓冲区数据
+    buffer = socket->readAll();
+
+    if(!buffer.isEmpty())
+    {
+        //QString str = QString::fromLocal8Bit(buffer);
+        QString str = QString(buffer);
+
+//        ui->textEdit_messages->insertPlainText("服务器消息:"+str+"\n");
+        QStringList list = str.split(",");
+        int length=list.size();
+//        if(str.contains("FFCC")) {
+//            QString len=QString::number(length);
+//            ui->textEdit_messages->insertPlainText("服务器消息:"+str+"\n");
+//            ui->textEdit_messages->insertPlainText("服务器消息:"+len+"\n");
+
+//        }
+        if(length>=4) {
+            if(checkVehicle(list[2])) {
+                ui->textEdit_messages->insertPlainText("服务器消息:"+str+"\n");
+                ui->textEdit_messages->insertPlainText("服务器消息:vehicle id is ok!\n");
+                int downstream_id =getDownStreamId(list[0]);
+                switch (downstream_id) {
+                    case StopCommand:
+                        ProStopCommand(list[3]);
+                        break;
+                    case AutoPilotControl:
+                        if(length>4) {
+                            ProAutoPilotControl(list);
+                        }
+                        break;
+                    case StationCommand:
+                        ProStationCommand(list[3]);
+                        break;
+                    default:
+                        break;
+
+
+                }
+            } else {
+                ui->textEdit_messages->insertPlainText("服务器消息:vehicle id is wrong!\n");
+            }
+
+        }
+    }
+}
+//云平台急停指令
+void MainWindow::ProStopCommand(QString str)
+{
+    int tmp;
+    iv::v2x::v2x msgV2xProto;
+    msgV2xProto.Clear();
+    QStringList list=str.split("]");
+    if(list.size()>0) {
+        tmp = list[0].toInt();
+        if(tmp==0) {
+            msgV2xProto.set_emergencystop(0);
+            ui->textEdit_messages->insertPlainText("服务器消息:vehicle emergency stop cancel!\n");
+            shareV2xProtoMsg(msgV2xProto);
+        }
+        else if(tmp==1) {
+            msgV2xProto.set_emergencystop(1);
+            ui->textEdit_messages->insertPlainText("服务器消息:vehicle emergency stop enable!\n");
+            shareV2xProtoMsg(msgV2xProto);
+        }
+    }
+}
+//云平台工作模式&坐标索引指令
+void MainWindow::ProAutoPilotControl(QStringList list)
+{
+    iv::v2x::v2x msgV2xProto;
+    iv::v2x::stationsGPS *stGps;
+    msgV2xProto.Clear();
+    int tmp = list[3].toInt();
+    int length=list.size();
+    int stationId;
+    if(tmp==1) {
+        msgV2xProto.set_carmode(1);
+        if(length>5) {
+            QStringList tmp_list0=list[4].split("[");
+            list[4]=tmp_list0[1];
+            QStringList tmp_list1=list[length-1].split("]]");
+            list[length-1]=tmp_list1[0];
+            for(int i=4;i<length;i++) {
+                stationId = list[i].toInt();
+                msgV2xProto.add_stationid(stationId);
+
+                stGps=msgV2xProto.add_stgps();
+                stGps->set_lat(0);
+                stGps->set_lon(0);
+                ui->textEdit_messages->insertPlainText("服务器消息:car station has "+list[i]+"\n");
+            }
+        } else {
+            ui->textEdit_messages->insertPlainText("服务器消息:car station at least 2!\n");
+        }
+
+    } else {
+        msgV2xProto.set_carmode(0);
+        ui->textEdit_messages->insertPlainText("服务器消息:car autoDrive mode cancle!\n");
+    }
+    shareV2xProtoMsg(msgV2xProto);
+}
+//云平台站点停止指令
+void MainWindow::ProStationCommand(QString str)
+{
+    int tmp;
+    iv::v2x::v2x msgV2xProto;
+    msgV2xProto.Clear();
+    QStringList list=str.split("]");
+    if(list.size()>0) {
+        tmp = list[0].toInt();
+        if(tmp==0) {
+            msgV2xProto.set_stationstop(1);//站点启动
+            shareV2xProtoMsg(msgV2xProto);
+            ui->textEdit_messages->insertPlainText("服务器消息:vehicle station start!\n");
+        }
+        else if(tmp==1) {
+            msgV2xProto.set_stationstop(0);//下一站停车
+            shareV2xProtoMsg(msgV2xProto);
+            ui->textEdit_messages->insertPlainText("服务器消息:vehicle station top!\n");
+        }
+    }
+}
+
+bool MainWindow::checkVehicle(QString str)
+{
+    return true;
+}
+int MainWindow::getDownStreamId(QString str)
+{
+    int downstream_id=-1;
+    if(str.contains("FFAA")) {
+        ui->textEdit_messages->insertPlainText("服务器消息:StopCommand!\n");
+        downstream_id=1;
+        return downstream_id;
+    }
+    if(str.contains("FFCC")) {
+        ui->textEdit_messages->insertPlainText("服务器消息:AutoPilotControl!\n");
+        downstream_id=2;
+        return downstream_id;
+    }
+    if(str.contains("FFBB")) {
+        ui->textEdit_messages->insertPlainText("服务器消息:StationCommand!\n");
+        downstream_id=3;
+        return downstream_id;
+    }
+    return downstream_id;
+}
+void MainWindow::socket_Disconnected()
+{
+
+    //修改按键文字
+    ui->pushButton_connect->setText("connect");
+    ui->textEdit_messages->insertPlainText("服务器消息:Disconnected");
+}
+
+void MainWindow::on_pushButton_connect_clicked()
+{
+    if(ui->pushButton_connect->text() == tr("connect"))
+    {
+        QString IP;
+        int port;
+
+        //获取IP地址
+        IP = ui->lineEdit_ip->text();
+        //获取端口号
+        port = ui->lineEdit_port->text().toInt();
+        ui->textEdit_messages->setText("");
+        ui->textEdit_messages->insertPlainText("正在连接"+ui->lineEdit_ip->text()+":"+ui->lineEdit_port->text()+"\n");
+        //取消已有的连接
+        socket->abort();
+        //连接服务器
+        socket->connectToHost(IP, port);
+        //等待连接成功
+        if(!socket->waitForConnected(30000))
+        {
+            QMessageBox::warning(this,tr("消息"),tr("连接失败!请重新连接"),QMessageBox::Yes);
+            ui->textEdit_messages->insertPlainText("连接失败\n");
+            return;
+        }
+        ui->textEdit_messages->insertPlainText("连接成功\n");
+        QMessageBox::information(this,tr("消息"),tr("连接成功"),QMessageBox::Yes);
+
+
+        //修改按键文字
+        ui->pushButton_connect->setText("disconnect");
+    }
+    else
+    {
+        //断开连接
+        ui->textEdit_messages->setText("断开连接\n");
+        socket->disconnectFromHost();
+        //修改按键文字
+        ui->pushButton_connect->setText("connect");
+    }
+}
+
+
+void MainWindow::on_textEdit_messages_textChanged()
+{
+    ui->textEdit_messages->moveCursor(QTextCursor::End);
+}
+
+QString MainWindow::getTimeStamp()
+{
+    QDateTime time = QDateTime::currentDateTime();
+    int current_timestamp=time.toTime_t();
+    QString str=QString::number(current_timestamp);
+    return  str;
+}
+
+void MainWindow::shareV2xProtoMsg(iv::v2x::v2x msgV2xProto)
+{
+    int nsize = msgV2xProto.ByteSize();
+    char * strdata = new char[msgV2xProto.ByteSize()];
+    if(msgV2xProto.SerializePartialToArray(strdata,nsize))
+    {
+        iv::modulecomm::ModuleSendMsg(mp_v2xSend,strdata,nsize);
+    }
+    givlog->info("v2x","share v2x controll Msg");
+    delete strdata;
+}
+//请求v2状态,是否接收v2x的控制,由ui发送
+void MainWindow::shareV2xStReqMsg()
+{
+    iv::v2x::v2xStReq x;
+    x.set_v2xstreq(1);
+    int nsize = x.ByteSize();
+    char * str = new char[nsize];
+    if(x.SerializeToArray(str,nsize))
+    {
+        iv::modulecomm::ModuleSendMsg(mp_v2xStSend,str,nsize);
+    }
+    else
+    {
+        givlog->error("v2x","send require error");
+    }
+    givlog->info("v2x","send st req");
+    delete str;
+}
+//void MainWindow::on_pushButton_sendVehicle_clicked()
+//{
+//    QString head= "[";
+//    QString packageID="'DDFF'";
+//    QString time_stamp=getTimeStamp();
+//    QString test="['DDFF',"+time_stamp+",[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[2,0]]";
+//    //QByteArray bytes = test.toUtf8();
+//    QByteArray bytes = test.toLatin1();
+//    socket->write(bytes);
+//}
+

+ 57 - 0
src/v2x/v2xTcpClient/mainwindow.h

@@ -0,0 +1,57 @@
+#ifndef MAINWINDOW_H
+#define MAINWINDOW_H
+
+#include <QMainWindow>
+#include <QTcpSocket>
+#include <QFile>
+#include <QDir>
+#include <QList>
+#include <QTextStream>
+#include<QDateTime>
+#include "data_type.h"
+#include "QMessageBox"
+#include "v2x.pb.h"
+#include "modulecomm.h"
+#include "ivlog.h"
+
+namespace Ui {
+class MainWindow;
+}
+
+struct stationGps
+{
+    double lon;
+    double lat;
+};
+
+class MainWindow : public QMainWindow
+{
+    Q_OBJECT
+
+public:
+    explicit MainWindow(QWidget *parent = nullptr);
+    ~MainWindow();
+    void readMp3Messages(QString path);
+    QString getTimeStamp();
+    void ProStopCommand(QString str);
+    void ProAutoPilotControl(QStringList list);
+    void ProStationCommand(QString str);
+    bool checkVehicle(QString str);
+    int getDownStreamId(QString str);
+private slots:
+
+    void socket_Read_Data();
+    void socket_Disconnected();
+    void on_pushButton_connect_clicked();
+    void on_textEdit_messages_textChanged();
+
+private:
+    Ui::MainWindow *ui;
+    QTcpSocket *socket;
+    void * mp_v2xSend;
+    void * mp_v2xStSend;
+    void shareV2xStReqMsg();
+    void shareV2xProtoMsg(iv::v2x::v2x msgV2xProto);
+
+};
+#endif // MAINWINDOW_H

+ 97 - 0
src/v2x/v2xTcpClient/mainwindow.ui

@@ -0,0 +1,97 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>MainWindow</class>
+ <widget class="QMainWindow" name="MainWindow">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>593</width>
+    <height>437</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>MainWindow</string>
+  </property>
+  <widget class="QWidget" name="centralWidget">
+   <widget class="QWidget" name="layoutWidget">
+    <property name="geometry">
+     <rect>
+      <x>30</x>
+      <y>40</y>
+      <width>451</width>
+      <height>283</height>
+     </rect>
+    </property>
+    <layout class="QVBoxLayout" name="verticalLayout">
+     <item>
+      <layout class="QHBoxLayout" name="horizontalLayout">
+       <item>
+        <widget class="QLabel" name="label">
+         <property name="text">
+          <string>IP:</string>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <widget class="QLineEdit" name="lineEdit_ip"/>
+       </item>
+       <item>
+        <widget class="QLabel" name="label_2">
+         <property name="text">
+          <string>PORT:</string>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <widget class="QLineEdit" name="lineEdit_port"/>
+       </item>
+       <item>
+        <widget class="QPushButton" name="pushButton_connect">
+         <property name="text">
+          <string>connect</string>
+         </property>
+        </widget>
+       </item>
+      </layout>
+     </item>
+     <item>
+      <widget class="QLabel" name="label_3">
+       <property name="text">
+        <string>MESSAGE BOX:</string>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <widget class="QTextEdit" name="textEdit_messages"/>
+     </item>
+     <item>
+      <layout class="QHBoxLayout" name="horizontalLayout_2"/>
+     </item>
+    </layout>
+   </widget>
+  </widget>
+  <widget class="QMenuBar" name="menuBar">
+   <property name="geometry">
+    <rect>
+     <x>0</x>
+     <y>0</y>
+     <width>593</width>
+     <height>28</height>
+    </rect>
+   </property>
+  </widget>
+  <widget class="QToolBar" name="mainToolBar">
+   <attribute name="toolBarArea">
+    <enum>TopToolBarArea</enum>
+   </attribute>
+   <attribute name="toolBarBreak">
+    <bool>false</bool>
+   </attribute>
+  </widget>
+  <widget class="QStatusBar" name="statusBar"/>
+ </widget>
+ <layoutdefault spacing="6" margin="11"/>
+ <resources/>
+ <connections/>
+</ui>

+ 48 - 0
src/v2x/v2xTcpClient/v2xTcpClient.pro

@@ -0,0 +1,48 @@
+#-------------------------------------------------
+#
+# Project created by QtCreator 2020-12-25T08:41:28
+#
+#-------------------------------------------------
+
+QT       += core gui network
+
+greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
+
+TARGET = v2xTcpClient
+TEMPLATE = app
+
+# The following define makes your compiler emit warnings if you use
+# any feature of Qt which has been marked as deprecated (the exact warnings
+# depend on your compiler). Please consult the documentation of the
+# deprecated API in order to know how to port your code away from it.
+DEFINES += QT_DEPRECATED_WARNINGS
+
+# You can also make your code fail to compile if you use deprecated APIs.
+# In order to do so, uncomment the following line.
+# You can also select to disable deprecated APIs only up to a certain version of Qt.
+#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000    # disables all the APIs deprecated before Qt 6.0.0
+
+INCLUDEPATH += $$PWD/../../../include/
+LIBS += -L$$PWD/../../../bin/ -lxmlparam -lmodulecomm -livlog -livfault -lprotobuf
+
+INCLUDEPATH += $$PWD/../../include/msgtype
+
+CONFIG += c++11
+
+SOURCES += \
+        main.cpp \
+        mainwindow.cpp \
+        ../../include/msgtype/v2x.pb.cc
+
+HEADERS += \
+        mainwindow.h \
+        data_type.h\
+        ../../include/msgtype/v2x.pb.h
+
+FORMS += \
+        mainwindow.ui
+
+# Default rules for deployment.
+qnx: target.path = /tmp/$${TARGET}/bin
+else: unix:!android: target.path = /opt/$${TARGET}/bin
+!isEmpty(target.path): INSTALLS += target