#ifndef APPMODEL_H #define APPMODEL_H #include "EgoInterface.h" #include "ImageProvider.h" #include #include #include #include #include class CarData : public QObject { Q_OBJECT Q_PROPERTY(int32_t uid READ uid WRITE setUid NOTIFY dataChanged) Q_PROPERTY(QString name READ name WRITE setName NOTIFY dataChanged) Q_PROPERTY(QString type READ type WRITE setType NOTIFY dataChanged) Q_PROPERTY(QString state READ state WRITE setState NOTIFY dataChanged) public: explicit CarData(QObject *parent = 0); CarData(const CarData &other); int32_t uid() const; QString name() const; QString type() const; QString state() const; int32_t carType() const; void setUid(const int32_t &value); void setName(const QString &value); void setType(const QString &value); void setState(const QString &value); void setCarType(const int32_t& value); signals: void dataChanged(); private: int32_t m_uid; int32_t m_carType; QString m_name; QString m_type; QString m_state; }; Q_DECLARE_METATYPE(CarData) class AppModelPrivate; class CFishEyeWindow; class AppModel : public QObject { Q_OBJECT Q_PROPERTY(bool ready READ ready WRITE setReady NOTIFY readyChanged) Q_PROPERTY(QQmlListProperty car READ car NOTIFY carChanged) Q_PROPERTY(int32_t radar1 READ radar1 WRITE setRadar1 NOTIFY radar1Changed) Q_PROPERTY(int32_t radar2 READ radar2 WRITE setRadar2 NOTIFY radar2Changed) Q_PROPERTY(int32_t radar3 READ radar3 WRITE setRadar3 NOTIFY radar3Changed) Q_PROPERTY(int32_t radar4 READ radar4 WRITE setRadar4 NOTIFY radar4Changed) Q_PROPERTY(int32_t radar5 READ radar5 WRITE setRadar5 NOTIFY radar5Changed) Q_PROPERTY(int32_t radar6 READ radar6 WRITE setRadar6 NOTIFY radar6Changed) Q_PROPERTY(int32_t radar7 READ radar7 WRITE setRadar7 NOTIFY radar7Changed) Q_PROPERTY(int32_t radar8 READ radar8 WRITE setRadar8 NOTIFY radar8Changed) Q_PROPERTY(float Steer READ Steer WRITE setSteerAngle NOTIFY steerAngleChanged) Q_PROPERTY(int32_t ping READ ping WRITE setPing NOTIFY pingChanged) Q_PROPERTY(int32_t temp READ temp WRITE setTemp NOTIFY tempChanged) Q_PROPERTY(int32_t alertSound READ alertSound NOTIFY playAlertSound) Q_PROPERTY(int32_t Speed READ Speed WRITE SetSpeed NOTIFY speedChanged) Q_PROPERTY(int32_t Visible READ Visible WRITE SetVisible NOTIFY visibleChanged) // Q_PROPERTY(int32_t Gear READ Gear WRITE SetGear NOTIFY gearChanged) Q_PROPERTY(QString Account READ Account WRITE setAccount NOTIFY accountChanged) Q_PROPERTY(QString Password READ Password WRITE setPassword NOTIFY passwordChanged) Q_PROPERTY(QString CarName READ CarName WRITE setCarName NOTIFY carNameChanged) Q_PROPERTY(QString DriveName READ DriveName WRITE setDriveName NOTIFY driveNameChanged) Q_PROPERTY(int32_t BrakePressure READ BrakePressure WRITE SetBrakePressure NOTIFY brakePressureChanged) Q_PROPERTY(int32_t GearboxOilPressure READ GearboxOilPressure WRITE SetGearBoxOilPressure NOTIFY gearboxOilPressureChanged) Q_PROPERTY(int32_t GearboxOilTemp READ GearboxOilTemp WRITE SetGearBoxOilTemp NOTIFY gearboxOilTempChanged) Q_PROPERTY(int32_t EnginRpm READ EnginRpm WRITE SetEngingRpm NOTIFY engineRpmChanged) Q_PROPERTY(int32_t EngineOilPressure READ EngineOilPressure WRITE SetEngineOilPressure NOTIFY engineoilPressureChanged) Q_PROPERTY(int32_t OilPos READ OilPos WRITE SetOilPos NOTIFY oilPosChanged) Q_PROPERTY(int32_t WorkPressure READ WorkPressure WRITE setWorkPressure NOTIFY workPressureChanged) Q_PROPERTY(int32_t Cold READ Cold WRITE SetCold NOTIFY coldChanged) Q_PROPERTY(int32_t leftAngle READ leftAngle WRITE setLeftAngle NOTIFY leftAngleChanged) Q_PROPERTY(int32_t rightAngle READ rightAngle WRITE setRightAngle NOTIFY rightAngleChanged) //RTK定位惯导数据 Q_PROPERTY(float imux READ imux WRITE setImux NOTIFY imuxChanged) Q_PROPERTY(float imuy READ imuy WRITE setImuy NOTIFY imuyChanged) Q_PROPERTY(bool cautionLight READ cautionLight WRITE setCautionLight NOTIFY cautionLightChanged) Q_PROPERTY(bool lightL READ lightL WRITE setLightL NOTIFY lightLChanged) Q_PROPERTY(bool lightR READ lightR WRITE setLightR NOTIFY lightRChanged) Q_PROPERTY(bool gearF READ gearF WRITE setGearF NOTIFY gearFChanged) Q_PROPERTY(bool gearR READ gearR WRITE setGearR NOTIFY gearRChanged) Q_PROPERTY(bool carPark READ carPark WRITE setCarPark NOTIFY carParkChanged) Q_PROPERTY(bool buzzerPlay READ buzzerPlay WRITE setBuzzerPlay NOTIFY buzzerPlayChanged) Q_PROPERTY(bool lightFront READ lightFront WRITE setLightFront NOTIFY lightFrontChanged) Q_PROPERTY(bool lightWork READ lightWork WRITE setLightWork NOTIFY lightWorkChanged) Q_PROPERTY(bool emergency1 READ emergency1 WRITE setEmergency NOTIFY emergencyChanged) Q_PROPERTY(int32_t engineSpeed READ engineSpeed WRITE setEngineSpeed NOTIFY engineSpeedChanged) Q_PROPERTY(int32_t travelSpeed READ travelSpeed WRITE setTravelSpeed NOTIFY travelSpeedChanged) Q_PROPERTY(int32_t fuelLevel READ fuelLevel WRITE setFuelLevel NOTIFY fuelLevelChanged) Q_PROPERTY(int32_t engineTemperature READ engineTemperature WRITE setEngineTemperature NOTIFY engineTemperatureChanged) Q_PROPERTY(int32_t hydraulicOilTemperature READ hydraulicOilTemperature WRITE setHydraulicOilTemperature NOTIFY hydraulicOilTemperatureChanged) Q_PROPERTY(int32_t mainPump1Pressure READ mainPump1Pressure WRITE setMainPump1Pressure NOTIFY mainPump1PressureChanged) Q_PROPERTY(int32_t mainPump2Pressure READ mainPump2Pressure WRITE setMainPump2Pressure NOTIFY mainPump2PressureChanged) Q_PROPERTY(int32_t handGear READ handGear WRITE setHandGear NOTIFY handGearChanged) Q_PROPERTY(int32_t actualGear READ actualGear WRITE setActualGear NOTIFY actualGearChanged) Q_PROPERTY(float gripperHeight READ gripperHeight WRITE setGripperHeight NOTIFY gripperHeightChanged) Q_PROPERTY(float amplitude1 READ amplitude1 WRITE setAmplitude NOTIFY amplitudeChanged) Q_PROPERTY(int64_t boomAngle READ boomAngle WRITE setBoomAngle NOTIFY boomAngleChanged) Q_PROPERTY(int64_t stickAngle READ stickAngle WRITE setStickAngle NOTIFY stickAngleChanged) Q_PROPERTY(bool idleProtection READ idleProtection WRITE setIdleProtection NOTIFY idleProtectionChanged) Q_PROPERTY(bool frontToggle READ frontToggle WRITE setFrontToggle NOTIFY frontToggleChanged) Q_PROPERTY(bool backToggle READ backToggle WRITE setBackToggle NOTIFY backToggleChanged) Q_PROPERTY(int32_t interLock READ interLock WRITE setInterLock NOTIFY interLockChanged) Q_PROPERTY(int32_t safetySwitch READ safetySwitch WRITE setSafetySwitch NOTIFY safetySwitchChanged) Q_PROPERTY(int32_t armLiftPilot READ armLiftPilot WRITE setArmLiftPilot NOTIFY armLiftPilotChanged) Q_PROPERTY(int32_t armLoweringPilot READ armLoweringPilot WRITE setArmLoweringPilot NOTIFY armLoweringPilotChanged) Q_PROPERTY(int32_t leverLiftingLilot READ leverLiftingLilot WRITE setLeverLiftingLilot NOTIFY leverLiftingLilotChanged) Q_PROPERTY(int32_t rodLoweringPilot READ rodLoweringPilot WRITE setRodLoweringPilot NOTIFY rodLoweringPilotChanged) Q_PROPERTY(int32_t leftRotaryPilot READ leftRotaryPilot WRITE setLeftRotaryPilot NOTIFY leftRotaryPilotChanged) Q_PROPERTY(int32_t rightRotaryPilot READ rightRotaryPilot WRITE setRightRotaryPilot NOTIFY rightRotaryPilotChanged) Q_PROPERTY(int32_t grabOpenPilot READ grabOpenPilot WRITE setGrabOpenPilot NOTIFY grabOpenPilotChanged) Q_PROPERTY(int32_t grabClosePilot READ grabClosePilot WRITE setGrabClosePilot NOTIFY grabClosePilotChanged) Q_PROPERTY(int32_t safetyValves READ safetyValves WRITE setSafetyValves NOTIFY safetyValvesChanged) Q_PROPERTY(bool liftPilotPressureSensor_F READ liftPilotPressureSensor_F WRITE setLiftPilotPressureSensor_F NOTIFY liftPilotPressureSensor_FChanged) Q_PROPERTY(bool loweringPilotPressureSensor_F READ loweringPilotPressureSensor_F WRITE setLoweringPilotPressureSensor_F NOTIFY loweringPilotPressureSensor_FChanged) Q_PROPERTY(bool leverLiftPilotPressureSensor_F READ leverLiftPilotPressureSensor_F WRITE setLeverLiftPilotPressureSensor_F NOTIFY leverLiftPilotPressureSensor_FChanged) Q_PROPERTY(bool rodLoweringPilotPressurePensor_F READ rodLoweringPilotPressurePensor_F WRITE setRodLoweringPilotPressurePensor_F NOTIFY rodLoweringPilotPressurePensor_FChanged) Q_PROPERTY(bool leftTurnPilotPressureSensor_F READ leftTurnPilotPressureSensor_F WRITE setLeftTurnPilotPressureSensor_F NOTIFY leftTurnPilotPressureSensor_FChanged) Q_PROPERTY(bool rightTurnPilotPressureSensor_F READ rightTurnPilotPressureSensor_F WRITE setRightTurnPilotPressureSensor_F NOTIFY rightTurnPilotPressureSensor_FChanged) Q_PROPERTY(bool legExtensionPilotPressureSensor_F READ legExtensionPilotPressureSensor_F WRITE setLegExtensionPilotPressureSensor_F NOTIFY legExtensionPilotPressureSensor_FChanged) Q_PROPERTY(bool legRetractPilotPressureSensor_F READ legRetractPilotPressureSensor_F WRITE setLegRetractPilotPressureSensor_F NOTIFY legRetractPilotPressureSensor_FChanged) Q_PROPERTY(bool grabOpenPilotPressureSensor_F READ grabOpenPilotPressureSensor_F WRITE setGrabOpenPilotPressureSensor_F NOTIFY grabOpenPilotPressureSensor_FChanged) Q_PROPERTY(bool grabClosurePilotPressureSensor_F READ grabClosurePilotPressureSensor_F WRITE setGrabClosurePilotPressureSensor_F NOTIFY grabClosurePilotPressureSensor_FChanged) Q_PROPERTY(bool mainPump1PressureSensor_F READ mainPump1PressureSensor_F WRITE setMainPump1PressureSensor_F NOTIFY mainPump1PressureSensor_FChanged) Q_PROPERTY(bool mainPump2PressureSensor_F READ mainPump2PressureSensor_F WRITE setMainPump2PressureSensor_F NOTIFY mainPump2PressureSensor_FChanged) Q_PROPERTY(bool chamberPressureSensor_F READ chamberPressureSensor_F WRITE setChamberPressureSensor_F NOTIFY chamberPressureSensor_FChanged) Q_PROPERTY(bool bucketRodPressureSensor_F READ bucketRodPressureSensor_F WRITE setBucketRodPressureSensor_F NOTIFY bucketRodPressureSensor_FChanged) Q_PROPERTY(bool parkingPressureSensor_F READ parkingPressureSensor_F WRITE setParkingPressureSensor_F NOTIFY parkingPressureSensor_FChanged) Q_PROPERTY(bool accumulatorPressureSensor_F READ accumulatorPressureSensor_F WRITE setAccumulatorPressureSensor_F NOTIFY accumulatorPressureSensor_FChanged) Q_PROPERTY(bool gasPedal_F READ gasPedal_F WRITE setGasPedal_F NOTIFY gasPedal_FChanged) Q_PROPERTY(bool throttleKnob_F READ throttleKnob_F WRITE setThrottleKnob_F NOTIFY throttleKnob_FChanged) Q_PROPERTY(bool legHandle_F READ legHandle_F WRITE setLegHandle_F NOTIFY legHandle_FChanged) Q_PROPERTY(bool gripKnob_F READ gripKnob_F WRITE setGripKnob_F NOTIFY gripKnob_FChanged) Q_PROPERTY(bool hydraulicOilTemperatureSensor_F READ hydraulicOilTemperatureSensor_F WRITE setHydraulicOilTemperatureSensor_F NOTIFY hydraulicOilTemperatureSensor_FChanged) Q_PROPERTY(bool fuelLevelSensor_F READ fuelLevelSensor_F WRITE setFuelLevelSensor_F NOTIFY fuelLevelSensor_FChanged) Q_PROPERTY(bool boomAngleSensor_F READ boomAngleSensor_F WRITE setBoomAngleSensor_F NOTIFY boomAngleSensor_FChanged) Q_PROPERTY(bool bucketLeverTiltSensor_F READ bucketLeverTiltSensor_F WRITE setBucketLeverTiltSensor_F NOTIFY bucketLeverTiltSensor_FChanged) Q_PROPERTY(bool expansionModule_F READ expansionModule_F WRITE setExpansionModule_F NOTIFY expansionModule_FChanged) Q_PROPERTY(bool workingDistanceOverrun_F READ workingDistanceOverrun_F WRITE setWorkingDistanceOverrun_F NOTIFY workingDistanceOverrun_FChanged) Q_PROPERTY(bool lowOilLevel_F READ lowOilLevel_F WRITE setLowOilLevel_F NOTIFY lowOilLevel_FChanged) Q_PROPERTY(bool batteryLowVoltage_F READ batteryLowVoltage_F WRITE setBatteryLowVoltage_F NOTIFY batteryLowVoltage_FChanged) Q_PROPERTY(bool batteryHighVoltage_F READ batteryHighVoltage_F WRITE setBatteryHighVoltage_F NOTIFY batteryHighVoltage_FChanged) Q_PROPERTY(bool accumulatorPressure_F READ accumulatorPressure_F WRITE setAccumulatorPressure_F NOTIFY accumulatorPressure_FChanged) Q_PROPERTY(bool highHydraulicOilTemperature_F READ highHydraulicOilTemperature_F WRITE setHighHydraulicOilTemperature_F NOTIFY highHydraulicOilTemperature_FChanged) Q_PROPERTY(bool lowOilPressure_F READ lowOilPressure_F WRITE setLowOilPressure_F NOTIFY lowOilPressure_FChanged) Q_PROPERTY(bool coolantLevelLow_F READ coolantLevelLow_F WRITE setCoolantLevelLow_F NOTIFY coolantLevelLow_FChanged) Q_PROPERTY(bool coolantTemperatureHigh_F READ coolantTemperatureHigh_F WRITE setCoolantTemperatureHigh_F NOTIFY coolantTemperatureHigh_FChanged) Q_PROPERTY(bool systemOverload_F READ systemOverload_F WRITE setSystemOverload_F NOTIFY systemOverload_FChanged) Q_PROPERTY(bool safebypassPressDown_F READ safebypassPressDown_F WRITE setSafebypassPressDown_F NOTIFY safebypassPressDown_FChanged) Q_PROPERTY(bool engineSPN_F READ engineSPN_F WRITE setEngineSPN_F NOTIFY engineSPN_FChanged) Q_PROPERTY(bool engineWarmUp_F READ engineWarmUp_F WRITE setEngineWarmUp_F NOTIFY engineWarmUp_FChanged) Q_PROPERTY(bool engineWarmUpTimeout_F READ engineWarmUpTimeout_F WRITE setEngineWarmUpTimeout_F NOTIFY engineWarmUpTimeout_FChanged) Q_PROPERTY(bool emergencyStopPress_F READ emergencyStopPress_F WRITE setEmergencyStopPress_F NOTIFY emergencyStopPress_FChanged) Q_PROPERTY(bool leftFrontLegChosed READ leftFrontLegChosed WRITE setLeftFrontLegChosed NOTIFY leftFrontLegChosedChanged) Q_PROPERTY(bool rightFrontLegChosed READ rightFrontLegChosed WRITE setRightFrontLegChosed NOTIFY rightFrontLegChosedChanged) Q_PROPERTY(bool leftRearLegChosed READ leftRearLegChosed WRITE setLeftRearLegChosed NOTIFY leftRearLegChosedChanged) Q_PROPERTY(bool rightRearLegChosed READ rightRearLegChosed WRITE setRightRearLegChosed NOTIFY rightRearLegChosedChanged) // Q_PROPERTY(int32_t ModelX READ ModelX WRITE setModelX NOTIFY modelXChanged) // Q_PROPERTY(int32_t ModelY READ ModelY WRITE setModelY NOTIFY modelYChanged) // Q_PROPERTY(int32_t ModelZ READ ModelZ WRITE setModelZ NOTIFY modelZChanged) public: explicit AppModel(IEgoNotify *n , IEgoControl *c , QObject* qmlObj, QObject *parent = 0); ~AppModel(); Q_INVOKABLE void userLogin(QString useName, QString password); Q_INVOKABLE void connectCar(int id); //退出程序时下线车辆 Q_INVOKABLE void leaveCar(); Q_INVOKABLE void logout(); Q_INVOKABLE void moveBegin(int32_t area,int32_t no); // Q_INVOKABLE void switchDriver(); //Q_INVOKABLE void areaChanged(int32_t area); Q_INVOKABLE void controlCar(int id); Q_INVOKABLE void cancelControl(); Q_INVOKABLE void showBackDlg(QString content, WorkArea area, int32_t no, int32_t uid); Q_INVOKABLE void showMoveDlg(MoveDesc desc); Q_INVOKABLE bool idle(int32_t uid); //Q_INVOKABLE void showTrackDlg(); // Q_INVOKABLE void track(); //Q_INVOKABLE void unTrack(); //Q_INVOKABLE bool autoClose(); //Q_INVOKABLE QString ReadyText(); bool ready() const; int radar1() const; int radar2() const; int radar3() const; int radar4() const; int radar5() const; int radar6() const; int radar7() const; int radar8() const; QString Account() const; QString Password() const; QString CarName() const; QString DriveName() const; float imux() const; float imuy() const; int ping() const; double temp() const; bool cautionLight() const; bool lightL() const; bool lightR() const; bool gearF() const; bool gearR() const; bool carPark() const; bool buzzerPlay() const; bool lightFront() const; bool lightWork() const; bool emergency1() const; int engineSpeed() const; int travelSpeed() const; int fuelLevel() const; int engineTemperature() const; int hydraulicOilTemperature() const; int mainPump1Pressure() const; int mainPump2Pressure() const; int handGear() const; int actualGear() const; float gripperHeight() const; float amplitude1() const; int64_t boomAngle() const; int64_t stickAngle() const; bool idleProtection() const;//怠速保护是报警信息,需要加入到滚动窗口里 bool frontToggle() const; bool backToggle() const; int interLock() const; int safetySwitch() const; int armLiftPilot() const; int armLoweringPilot() const; int leverLiftingLilot() const; int rodLoweringPilot() const; int leftRotaryPilot() const; int rightRotaryPilot() const; int grabOpenPilot() const; int grabClosePilot() const; int safetyValves() const; bool liftPilotPressureSensor_F() const; bool loweringPilotPressureSensor_F() const; bool leverLiftPilotPressureSensor_F() const; bool rodLoweringPilotPressurePensor_F() const; bool leftTurnPilotPressureSensor_F() const; bool rightTurnPilotPressureSensor_F() const; bool legExtensionPilotPressureSensor_F() const; bool legRetractPilotPressureSensor_F() const; bool grabOpenPilotPressureSensor_F() const; bool grabClosurePilotPressureSensor_F() const; bool mainPump1PressureSensor_F() const; bool mainPump2PressureSensor_F() const; bool chamberPressureSensor_F() const; bool bucketRodPressureSensor_F() const; bool parkingPressureSensor_F() const; bool accumulatorPressureSensor_F() const; bool gasPedal_F() const; bool throttleKnob_F() const; bool legHandle_F() const; bool gripKnob_F() const; bool hydraulicOilTemperatureSensor_F() const; bool fuelLevelSensor_F() const; bool boomAngleSensor_F() const; bool bucketLeverTiltSensor_F() const; bool expansionModule_F() const; bool workingDistanceOverrun_F() const; bool lowOilLevel_F() const; bool batteryLowVoltage_F() const; bool batteryHighVoltage_F() const; bool accumulatorPressure_F() const; bool highHydraulicOilTemperature_F() const; bool lowOilPressure_F() const; bool coolantLevelLow_F() const; bool coolantTemperatureHigh_F() const; bool systemOverload_F() const; bool safebypassPressDown_F() const; bool engineSPN_F() const; bool engineWarmUp_F() const; bool engineWarmUpTimeout_F() const; bool emergencyStopPress_F() const; bool leftFrontLegChosed() const; bool rightFrontLegChosed() const; bool leftRearLegChosed() const; bool rightRearLegChosed() const; int alertSound() const; int32_t BrakePressure() const; int32_t OilPos() const; int32_t GearboxOilPressure()const; int32_t GearboxOilTemp()const; int32_t EnginRpm()const; int32_t EngineOilPressure()const; int32_t Speed()const; bool Visible() const; //int32_t Gear() const; int32_t Cold() const; //int32_t ModelX() const; // int32_t ModelY() const; // int32_t ModelZ() const; int32_t leftAngle() const; int32_t rightAngle() const; float Steer() const; int32_t WorkPressure() const; void SetBrakePressure(const int32_t value); void SetOilPos(const int32_t value); void SetGearBoxOilPressure(const int32_t value); void SetGearBoxOilTemp(const int32_t value); void SetEngingRpm(const int32_t value); void SetEngineOilPressure(const int32_t value); void SetSpeed(const int32_t value); void SetVisible(const bool value); //void SetGear(const int32_t value); void SetCold(const int32_t value); void setReady(const bool value); void setForward(const int32_t& value); void setBackward(const int32_t& value); void setGear_D(const int32_t& value); void setDirectionLight(const int32_t& value); void setWiper(const bool& value); void setFrontLight(const bool& value); void setBackLight(const bool& value); void setBuzzer(const bool& value); void setRadar1(const int32_t &value); void setRadar2(const int32_t &value); void setRadar3(const int32_t &value); void setRadar4(const int32_t &value); void setRadar5(const int32_t &value); void setRadar6(const int32_t& value); void setRadar7(const int32_t& value); void setRadar8(const int32_t& value); void setAccount(const QString& value); void setPassword(const QString& password); void setCarName(const QString& carname); void setDriveName(const QString& drivename); void setWorkPressure(const int32_t value); //void setModelX(const int32_t value); //void setModelY(const int32_t value); //void setModelZ(const int32_t value); void setLeftAngle(const int32_t value); void setRightAngle(const int32_t value); //void setRadar6(const int32_t &value); void setPing(const int32_t &value); void setTemp(const double& value); void setSteerAngle(const float& value); void setImux(const float& value); void setImuy(const float& value); void setCautionLight(const bool& value); void setLightL(const bool& value); void setLightR(const bool& value); void setGearF(const bool& value); void setGearR(const bool& value); void setCarPark(const bool& value); void setBuzzerPlay(const bool& value); void setLightFront(const bool& value); void setLightWork(const bool& value); void setEmergency(const bool& value); void setEngineSpeed(const int32_t& value); void setTravelSpeed(const int32_t& value); void setFuelLevel(const int32_t& value); void setEngineTemperature(const int32_t& value); void setHydraulicOilTemperature(const int32_t& value); void setMainPump1Pressure(const int32_t& value); void setMainPump2Pressure(const int32_t& value); void setHandGear(const int32_t& value); void setActualGear(const int32_t& value); void setGripperHeight(const float& value); void setAmplitude(const float& value); void setBoomAngle(const int32_t& value); void setStickAngle(const int32_t& value); void setIdleProtection(const bool& value); void setFrontToggle(const bool& value); void setBackToggle(const bool& value); void setInterLock(const int32_t& value); void setSafetySwitch(const int32_t& value); void setArmLiftPilot(const int32_t& value); void setArmLoweringPilot(const int32_t& value); void setLeverLiftingLilot(const int32_t& value); void setRodLoweringPilot(const int32_t& value); void setLeftRotaryPilot(const int32_t& value); void setRightRotaryPilot(const int32_t& value); void setGrabOpenPilot(const int32_t& value); void setGrabClosePilot(const int32_t& value); void setSafetyValves(const int32_t& value); void setLiftPilotPressureSensor_F(const bool& value); void setLoweringPilotPressureSensor_F(const bool& value); void setLeverLiftPilotPressureSensor_F(const bool& value); void setRodLoweringPilotPressurePensor_F(const bool& value); void setLeftTurnPilotPressureSensor_F(const bool& value); void setRightTurnPilotPressureSensor_F(const bool& value); void setLegExtensionPilotPressureSensor_F(const bool& value); void setLegRetractPilotPressureSensor_F(const bool& value); void setGrabOpenPilotPressureSensor_F(const bool& value); void setGrabClosurePilotPressureSensor_F(const bool& value); void setMainPump1PressureSensor_F(const bool& value); void setMainPump2PressureSensor_F(const bool& value); void setChamberPressureSensor_F(const bool& value); void setBucketRodPressureSensor_F(const bool& value); void setParkingPressureSensor_F(const bool& value); void setAccumulatorPressureSensor_F(const bool& value); void setGasPedal_F(const bool& value); void setThrottleKnob_F(const bool& value); void setLegHandle_F(const bool& value); void setGripKnob_F(const bool& value); void setHydraulicOilTemperatureSensor_F(const bool& value); void setFuelLevelSensor_F(const bool& value); void setBoomAngleSensor_F(const bool& value); void setBucketLeverTiltSensor_F(const bool& value); void setExpansionModule_F(const bool& value); void setWorkingDistanceOverrun_F(const bool& value); void setLowOilLevel_F(const bool& value); void setBatteryLowVoltage_F(const bool& value); void setBatteryHighVoltage_F(const bool& value); void setAccumulatorPressure_F(const bool& value); void setHighHydraulicOilTemperature_F(const bool& value); void setLowOilPressure_F(const bool& value); void setCoolantLevelLow_F(const bool& value); void setCoolantTemperatureHigh_F(const bool& value); void setSystemOverload_F(const bool& value); void setSafebypassPressDown_F(const bool& value); void setEngineSPN_F(const bool& value); void setEngineWarmUp_F(const bool& value); void setEngineWarmUpTimeout_F(const bool& value); void setEmergencyStopPress_F(const bool& value); void setLeftFrontLegChosed(const bool& value); void setRightFrontLegChosed(const bool& value); void setLeftRearLegChosed(const bool& value); void setRightRearLegChosed(const bool& value); QQmlListProperty car() const; public slots: void onLoginRst(bool rst); //处理车辆信息被追加到应用模型时的操作 void onCarAppend(const UserCamera &info); void onRadarUpadte(int32_t r0, int32_t r1, int32_t r2, int32_t r3, int32_t r4, int32_t r5, int32_t r6, int32_t r7); void onEncodeUpdate(int32_t left, int32_t right); void onFeedData(const FeedData& data); void onNotifyState(int32_t uid, UserState state); void onPing(int32_t value,double temp); //接收CHANNEL_IMU通道数据信号的槽函数 void onImuUpdate(float x, float y); void onMoveEnd(int32_t rid, WorkArea area, int32_t no); void onNotifyDel(int32_t peer); void onKickoff(); void onNotifyLeave(int32_t peer); void onNotifyFail(int32_t peer); void onMoveRet(MoveDesc desc); //关闭程序 void OnClose(); void egoGearChanged(int gear); void egoGear_DChanged(int gear_d); void egoDirectionLightChanged(int light); void egoWiperChanged(bool wiper); void egoFrontLightChanged(bool frontlight); void egoBackLightChanged(bool backlight); void egoBuzzerChanged(bool buzzer); void egoCautionLightChanged(bool cautionLight); void egoLightLChanged(bool lightL); void egoLightRChanged(bool lightR); void egoGearFChanged(bool gearF); void egoGearRChanged(bool gearR); void egoCarParkChanged(bool carPark); void egoBuzzerPlayChanged(bool buzzerPlay); void egoLightFrontChanged(bool lightFront); void egoLightWorkChanged(bool lightWork); void egoEmergencyChanged(bool emergency); //void OnPosition(float x, float y, float z); signals: void readyChanged(); void carChanged(); void radar1Changed(); void radar2Changed(); void radar3Changed(); void radar4Changed(); void radar5Changed(); void radar6Changed(); void radar7Changed(); void radar8Changed(); void accountChanged(); void passwordChanged(); void carNameChanged(); void driveNameChanged(); void sectionTextChanged(); void steerAngleChanged(); void pingChanged(); void tempChanged(); void speedChanged(); void visibleChanged(); void gearChanged(); void coldChanged(); void gearboxOilPressureChanged(); void gearboxOilTempChanged(); void engineRpmChanged(); void engineoilPressureChanged(); void brakePressureChanged(); void playAlertSound(); void carConnected(); void closeWin(); void oilPosChanged(); void workPressureChanged(); void leftAngleChanged(); void rightAngleChanged(); void engineSpeedPlay(int par2); void lightLPlay(bool par3); void lightRPlay(bool par4); void gearRPlay(bool par5); void setRadar1Play(int Radar1Value); void setRadar2Play(int Radar2Value); void setRadar3Play(int Radar3Value); void setRadar4Play(int Radar4Value); void setRadar5Play(int Radar5Value); void setRadar6Play(int Radar6Value); void setRadar7Play(int Radar7Value); void setRadar8Play(int Radar8Value); void buzzerPlayIt(bool par6); void forwardChanged(); void backwardChanged(); void gear_dChanged(); void directionlightChanged(); void wiperChanged(); void frontlightChanged(); void backlightChanged(); void buzzerChanged(); void imuxChanged(); void imuyChanged(); void cautionLightChanged(); void lightLChanged(); void lightRChanged(); void gearFChanged(); void gearRChanged(); void carParkChanged(); void buzzerPlayChanged(); void lightFrontChanged(); void lightWorkChanged(); void emergencyChanged(); void engineSpeedChanged(); void travelSpeedChanged(); void fuelLevelChanged(); void engineTemperatureChanged(); void hydraulicOilTemperatureChanged(); void mainPump1PressureChanged(); void mainPump2PressureChanged(); void handGearChanged(); void actualGearChanged(); void gripperHeightChanged(); void amplitudeChanged(); void boomAngleChanged(); void stickAngleChanged(); void idleProtectionChanged(); void frontToggleChanged(); void backToggleChanged(); void interLockChanged(); void safetySwitchChanged(); void armLiftPilotChanged(); void armLoweringPilotChanged(); void leverLiftingLilotChanged(); void rodLoweringPilotChanged(); void leftRotaryPilotChanged(); void rightRotaryPilotChanged(); void grabOpenPilotChanged(); void grabClosePilotChanged(); void safetyValvesChanged(); void liftPilotPressureSensor_FChanged(); void loweringPilotPressureSensor_FChanged(); void leverLiftPilotPressureSensor_FChanged(); void rodLoweringPilotPressurePensor_FChanged(); void leftTurnPilotPressureSensor_FChanged(); void rightTurnPilotPressureSensor_FChanged(); void legExtensionPilotPressureSensor_FChanged(); void legRetractPilotPressureSensor_FChanged(); void grabOpenPilotPressureSensor_FChanged(); void grabClosurePilotPressureSensor_FChanged(); void mainPump1PressureSensor_FChanged(); void mainPump2PressureSensor_FChanged(); void chamberPressureSensor_FChanged(); void bucketRodPressureSensor_FChanged(); void parkingPressureSensor_FChanged(); void accumulatorPressureSensor_FChanged(); void gasPedal_FChanged(); void throttleKnob_FChanged(); void legHandle_FChanged(); void gripKnob_FChanged(); void hydraulicOilTemperatureSensor_FChanged(); void fuelLevelSensor_FChanged(); void boomAngleSensor_FChanged(); void bucketLeverTiltSensor_FChanged(); void expansionModule_FChanged(); void workingDistanceOverrun_FChanged(); void lowOilLevel_FChanged(); void batteryLowVoltage_FChanged(); void batteryHighVoltage_FChanged(); void accumulatorPressure_FChanged(); void highHydraulicOilTemperature_FChanged(); void lowOilPressure_FChanged(); void coolantLevelLow_FChanged(); void coolantTemperatureHigh_FChanged(); void systemOverload_FChanged(); void safebypassPressDown_FChanged(); void engineSPN_FChanged(); void engineWarmUp_FChanged(); void engineWarmUpTimeout_FChanged(); void emergencyStopPress_FChanged(); void leftFrontLegChosedChanged(); void rightFrontLegChosedChanged(); void leftRearLegChosedChanged(); void rightRearLegChosedChanged(); private: IEgoNotify *_notify; IEgoControl *_control; // std::unique_ptr _window; AppModelPrivate *d; std::vector _users; QString m_account; QString m_password; QString m_carName; QString m_driveName; int32_t m_forward; int32_t m_backward; int32_t m_gear_d; int32_t m_light; bool m_wiper; bool m_frontlight; bool m_backlight; bool m_buzzer; int32_t m_radar1 = 5000; int32_t m_radar2 = 5000; int32_t m_radar3 = 5000; int32_t m_radar4 = 5000; int32_t m_radar5 = 5000; int32_t m_radar6 = 5000; int32_t m_radar7 = 5000; int32_t m_radar8 = 5000; int32_t m_ping =0; float m_imux = 0; float m_imuy = 0; double m_temp = 0.f; int32_t m_alert; int32_t m_peer; int32_t m_work_pressure =0; //工作系统压力 int32_t m_brake_pressure =0;//制动系统压力 int32_t m_gearbox_oil_temp =0;//变速箱油温 int32_t m_gearbox_oil_pressure=0;//变速箱油压 int32_t m_oil_pos = 0; int32_t m_cold_water = 0; int32_t m_engine_rpm =0;//发动机转速 int32_t m_engine_oil_pressure =0;// 发动机油压 int32_t m_speed =0; bool m_visible = true; //int32_t m_gear =0; //WorkArea m_area= WorkArea::Area_A; // int32_t m_no; bool m_ready; QObject* m_qmlObj = nullptr; //int32_t m_modelx = 0; //int32_t m_modely = 0; int32_t m_steerAngle = 0; // int32_t m_modelz = 0; int32_t m_leftAngle = 0; int32_t m_rightAngle = 0; Lock_Status m_leftlock; Lock_Status m_rightlock; bool m_cautionLight = false; bool m_lightL = false; bool m_lightR = false; bool m_gearF = false; bool m_gearR = false; bool m_carPark = false; bool m_buzzerPlay = false; bool m_lightFront = false; bool m_lightWork = false; bool m_emergency = true; int32_t m_engineSpeed = 0; int32_t m_travelSpeed = 0; int32_t m_fuelLevel = 0; int32_t m_engineTemperature = 10000; int32_t m_hydraulicOilTemperature = 0; int32_t m_mainPump1Pressure = 0; int32_t m_mainPump2Pressure = 0; int32_t m_handGear = 0; int32_t m_actualGear = 0; float m_gripperHeight = 0.0; float m_amplitude = 0.0; int64_t m_boomAngle = 10000; int64_t m_stickAngle = 18000; bool m_idleProtection = false;//此处也是报警信息 bool m_frontToggle = true; bool m_backToggle = true; int32_t m_interLock = 0; int32_t m_safetyValves = 0; int32_t m_safetySwitch = 1; int32_t m_armLiftPilot = 1; int32_t m_armLoweringPilot = 1; int32_t m_leverLiftingLilot = 1; int32_t m_rodLoweringPilot = 1; int32_t m_leftRotaryPilot = 1; int32_t m_rightRotaryPilot = 1; int32_t m_grabOpenPilot = 1; int32_t m_grabClosePilot = 1; bool m_liftPilotPressureSensor_F = false; bool m_loweringPilotPressureSensor_F = false; bool m_leverLiftPilotPressureSensor_F = false; bool m_rodLoweringPilotPressurePensor_F = false; bool m_leftTurnPilotPressureSensor_F = false; bool m_rightTurnPilotPressureSensor_F = false; bool m_legExtensionPilotPressureSensor_F = false; bool m_legRetractPilotPressureSensor_F = false; bool m_grabOpenPilotPressureSensor_F = false; bool m_grabClosurePilotPressureSensor_F = false; bool m_mainPump1PressureSensor_F = false; bool m_mainPump2PressureSensor_F = false; bool m_chamberPressureSensor_F = false; bool m_bucketRodPressureSensor_F = false; bool m_parkingPressureSensor_F = false; bool m_accumulatorPressureSensor_F = false; bool m_gasPedal_F = false; bool m_throttleKnob_F = false; bool m_legHandle_F = false; bool m_gripKnob_F = false; bool m_hydraulicOilTemperatureSensor_F = false; bool m_fuelLevelSensor_F = false; bool m_boomAngleSensor_F = false; bool m_bucketLeverTiltSensor_F = false; bool m_expansionModule_F = false; bool m_workingDistanceOverrun_F = false; bool m_lowOilLevel_F = false; bool m_batteryLowVoltage_F = false; bool m_batteryHighVoltage_F = false; bool m_accumulatorPressure_F = false; bool m_highHydraulicOilTemperature_F = false; bool m_lowOilPressure_F = false; bool m_coolantLevelLow_F = false; bool m_coolantTemperatureHigh_F = false; bool m_systemOverload_F = false; bool m_safebypassPressDown_F = false; bool m_engineSPN_F = false; bool m_engineWarmUp_F = false; bool m_engineWarmUpTimeout_F = false; bool m_emergencyStopPress_F = false; bool m_leftFrontLegChosed = false; bool m_rightFrontLegChosed = false; bool m_leftRearLegChosed = false; bool m_rightRearLegChosed = false; }; #endif // APPMODEL_H