123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869 |
- #ifndef VEHICLE_PATROL_H
- #define VEHICLE_PATROL_H
- #include <QObject>
- #include <QTimer>
- #include <QDateTime>
- #include <QVector>
- #include <QThread>
- #include <iostream>
- #include <memory>
- #include <string>
- #include <grpcpp/grpcpp.h>
- #include "VehiclePatrol_service.grpc.pb.h"
- #include "VehiclePatrol.grpc.pb.h"
- #include "modulecommext.h"
- using grpc::Channel;
- using grpc::ClientContext;
- using grpc::Status;
- using org::jeecg::defsPatrol::grpc::VehiclePatrolException; ///< service name
- using org::jeecg::defsPatrol::grpc::PatrolRequest;
- class VehiclePatrolExceptionClient : public QThread{
- Q_OBJECT
- public:
- VehiclePatrolExceptionClient(std::shared_ptr<Channel> channel);
- ~VehiclePatrolExceptionClient(void);
- std::string uploadVehiclePatrolInfo(void);
- void updatePatrolData(void);
- protected:
- void run();
- private:
- std::unique_ptr<VehiclePatrolException::Stub> stub_;
- std::string id;
- bool isTVR; //Traffic Violation Recognition
- int32_t violationStatus; //0 no violation 1 overspeed 2 illegal parking 3 direction wrong 4 run the red light
- std::string vehicleLicenseNumber;
- QByteArray violationImage;
- uint64_t violationTime; //time when get violationImage
- org::jeecg::defsPatrol::grpc::GPSPoint violationPosition; //positon when get violationImage
- bool isFSM; //Fire and Smoke Monitor
- int32_t fireStatus; //0 no fire 1 has fire
- QByteArray fireImage;
- uint64_t fireTime; //time when get fireImage
- org::jeecg::defsPatrol::grpc::GPSPoint firePosition; //positon when get fireImage
- bool isTSGM; //Turn Stile Gate Monitor
- int32_t gateStatus; //0 no gate 1 gate close 2 gate open
- QByteArray gateImage;
- uint64_t gateTime; //time when get gateImage
- org::jeecg::defsPatrol::grpc::GPSPoint gatePosition; //positon when get gateImage
- std::string plateNumber;
- };
- #endif // VEHICLE_PATROL_H
|