#ifndef VEHINFO_H
#define VEHINFO_H
#include <iostream>
#include <vector>
#include <QQueue>
using namespace std;
#pragma pack(1)
//
struct VehInfor
{
    string stationCode; //站点编号
    string weightNum;   //磅号
    string plateNum;    //车牌号
    int axleCnt;    //轴数
    float sumWeight;    //车货总重，放大一百倍
    float tareWeight;   //轴数
    float grossWeight;
    float suttleWeight;
    int reduceWeightPer;
    float realWeight;
    float limitWeight;  //限重，放大一百倍
    float overWeight;   //超重，放大一百倍
    float overPer;
    string goodsName;
    string goodsType;
    string driver;
    string sendCompany;
    string recvCompany;
    string trafficCompany;
    string remark;
    int go;
    int lane;
    int speed;
    int length;
    int width;
    int height;
    string picPath;
    string dateTime;
    string createTime;
    string interTime;//入口时间，格式yyyy-MM-dd HH:mm:ss
    string platePic;    //车牌特写图，base64编码
    string platePicPostfix;//图片后缀，默认jpg
    string frontPic;//前抓拍，base64编码
    string frontPicPostfix;//图片后缀，默认jpg
    string key = "123456";
};
struct SelectInfor
{
    string startTime;
    string stopTime;
    string plateNum;
    int overPer;
    float startWeight;
    float stopWeight;
    string remark;
    string Operator;
};
struct SelectInfor1
{
    string startTime;
    string stopTime;
    string plateNum;
    float startWeight;
    float stopWeight;
    string remark;
};
typedef struct TSversion
{
    char szVersion[64];
    char szDateTime[64];
    char szDescription[128];
}TSVERSION;
struct Vehicle{
    int lane;
    long flowNo;
    char dateTime[50];
    unsigned char runState;
    unsigned char deviceState;
    double speed;
    double acceleration;
    int reverse;//0 正向，1 逆向
    int axleCnt;
    int axleGrpCnt;
    string axleWeight;
    string axleGrpWeight;
    string axleDis;
    string axleCrpType;
    long sumWeight;
    int length;
    char timeFlowNo[64];
};
struct VehicleCam
{
    string plateNum;
    string picPath;
    string deviceId;
    void* picContent;
    long picLen;
};
struct CameraInfor
{
    string ip;
    int port;
    string user;
    string pwd;
    int lane;
    int direction;
    string deviceId;
};
struct screenArea
{
    int areaId;
    int x;
    int y;
    int w;
    int h;
    int fontSize;
};
struct User
{
    string userName;
    string pwd;
    string sex;
    string mobile;
    string remark;
    bool isRemeber;
};
struct SendWeightForm
{
    string key = "123456";
    string poundNo; //磅号
    string checkNo;
    string stationCode; //站点编号
    string plateNum;    //车牌号
    int tareWeight;
    int grossWeight;
    int suttleWeight;
    string dateTime;

    //新增字段
    int go;
    int result; //上传称重回复
    int success; //注册成功
    int exceptionCode; //异常代码
    int vehicleType; //车型
    int axleCnt;    //轴数
    int  axleType;  //轴型
    int sumWeight;  //车货总重，放大一百倍
    int axleWeight1;    //1轴重，放大一百倍
    int axleWeight2;    //2轴重，放大一百倍
    int axleWeight3;    //3轴重，放大一百倍
    int axleWeight4;    //4轴重，放大一百倍
    int axleWeight5;    //5轴重，放大一百倍
    int axleWeight6;    //6轴重，放大一百倍
    int axleWeight7;    //7轴重，放大一百倍
    int axleWeight8;    //8轴重，放大一百倍
    int limitWeight;    //限重，放大一百倍
    int overWeight; //超重，放大一百倍
    string weightTime;  //称重时间，格式yyyy-MM-dd HH:mm:ss
    string platePic;    //车牌特写图，base64编码
    string platePicPostfix; //图片后缀，默认jpg
    string frontPic;    //前抓拍，base64编码
    string frontPicPostfix; //图片后缀，默认jpg
    string backPic; //后抓拍，base64编码
    string backPicPostfix;  //图片后缀，默认jpg
    string lSidePic;    //左侧侧抓拍，base64编码
    string lsidePicPostfix; //图片后缀，默认jpg
    string rSidePic;    //右侧侧抓拍，base64编码
    string rsidePicPostfix; //图片后缀，默认jpg
    string upPic;   //顶抓拍，base64编码
    string upPicPostfix;    //图片后缀，默认jpg
    string movie;   //过车小视频，base64编码
    string moviePostfix;    //短视频后缀，默认mp4
};

struct PacketRegister
{/*注册包
    上行指令 0x05: 心跳包
    Json字段	数据类型	描述
    ping	String	值为1*/
    string key = "123456";
    string stationCode; //站点编号
};
struct PacketBinding
{/*绑定
    上行指令 0x05: 心跳包
    Json字段	数据类型	描述
    ping	String	值为1*/
    string key = "123456";
    string plateNum; //车牌号
    string vehicleId; //车辆ID
};
struct PacketHeartBeat
{/*心跳包
    上行指令 0x05: 心跳包
    Json字段	数据类型	描述
    ping	String	值为1*/
    string key = "123456";
    string ping;
    string pang = "1";
};


#pragma pack ()
#endif // VEHINFO_H
