123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627 |
- #ifndef APPMODEL_H
- #define APPMODEL_H
- #include "EgoInterface.h"
- #include "ImageProvider.h"
- #include <QObject>
- #include <QtCore/QObject>
- #include <QtCore/QString>
- #include <QtGui>
- #include <QtQml/qqml.h>
- /*
- 车辆数据类
- */
- class CarData : public QObject {
- Q_OBJECT
- Q_PROPERTY(int32_t uid READ uid WRITE setUid NOTIFY dataChanged) //读取器函数uid,写入器函数setuid
- 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; //车辆唯一标识id,整数类型
- 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<CarData> 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(int32_t radar9 READ radar9 WRITE setRadar9 NOTIFY radar9Changed)
- Q_PROPERTY(int32_t ping READ ping WRITE setPing NOTIFY pingChanged)//ping值
- Q_PROPERTY(int32_t temp READ temp WRITE setTemp NOTIFY tempChanged)//ping时间戳
- Q_PROPERTY(int32_t alertSound READ alertSound NOTIFY playAlertSound)//播放声音
- 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)//制动气压 附件2
- Q_PROPERTY(int32_t GearboxOilPressure READ GearboxOilPressure WRITE SetGearBoxOilPressure NOTIFY gearboxOilPressureChanged)//变速箱油压 canJ1939
- Q_PROPERTY(int32_t GearboxOilTemp READ GearboxOilTemp WRITE SetGearBoxOilTemp NOTIFY gearboxOilTempChanged)//变速箱油温 canJ1939
- Q_PROPERTY(int32_t EnginRpm READ EnginRpm WRITE SetEngingRpm NOTIFY engineRpmChanged)//发动机转速 canJ1939
- Q_PROPERTY(int32_t EngineOilPressure READ EngineOilPressure WRITE SetEngineOilPressure NOTIFY engineoilPressureChanged)//发动机压力 canJ1939
- Q_PROPERTY(int32_t OilPos READ OilPos WRITE SetOilPos NOTIFY oilPosChanged)//油位---没有地方赋值
- Q_PROPERTY(int32_t WorkPressure READ WorkPressure WRITE setWorkPressure NOTIFY workPressureChanged)//工作压力--没有展示到qt
- Q_PROPERTY(int32_t Cold READ Cold WRITE SetCold NOTIFY coldChanged)//发动机水温 canJ1939
- Q_PROPERTY(int32_t leftAngle READ leftAngle WRITE setLeftAngle NOTIFY leftAngleChanged)//左支腿高度 金川使用角度传感器提供的支腿高度
- Q_PROPERTY(int32_t rightAngle READ rightAngle WRITE setRightAngle NOTIFY rightAngleChanged)//右支腿高度 金川使用角度传感器提供的支腿高度
- // 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)
- //外加传感器
- Q_PROPERTY(float Steer READ Steer WRITE setSteerAngle NOTIFY steerAngleChanged)//转向角度 车辆姿态 外加传感器 铰接转向姿态编码器
- Q_PROPERTY(int32_t Speed READ Speed WRITE SetSpeed NOTIFY speedChanged)//行驶速度 驱动轮角度编码器
- //大冶新增
- Q_PROPERTY(int32_t engineTime READ engineTime WRITE setEngineTime NOTIFY engineTimeChanged)//发动机工作小时 canJ1939
- Q_PROPERTY(int32_t wireSensorL READ wireSensorL WRITE setWireSensorL NOTIFY wireSensorLChanged)//左支腿高度 外加传感器 大冶使用拉线传感器提供的支腿高度
- Q_PROPERTY(int32_t wireSensorR READ wireSensorR WRITE setWireSensorR NOTIFY wireSensorRChanged)//右支腿高度 外加传感器 大冶使用拉线传感器提供的支腿高度
- Q_PROPERTY(int32_t fuelLevel READ fuelLevel WRITE setFuelLevel NOTIFY fuelLevelChanged)//燃油油位油量 附件2
- Q_PROPERTY(int32_t lockSwitchL READ lockSwitchL WRITE setLockSwitchL NOTIFY lockSwitchLChanged)//锁钩到位开关L 附件2
- Q_PROPERTY(int32_t lockSwitchR READ lockSwitchR WRITE setLockSwitchR NOTIFY lockSwitchRChanged)//锁钩到位开关R 附件2
- Q_PROPERTY(int32_t tipLimit READ tipLimit WRITE setTipLimit NOTIFY tipLimitChanged)//倾翻限位 附件2
- Q_PROPERTY(int32_t turnLeft READ turnLeft WRITE setTurnLeft NOTIFY turnLeftChanged)//左转 附件2
- Q_PROPERTY(int32_t turnRight READ turnRight WRITE setTurnRight NOTIFY turnRightChanged)//右转 附件2
- Q_PROPERTY(int32_t hightBeam READ hightBeam WRITE setHightBeam NOTIFY hightBeamChanged)//远光灯 附件2
- Q_PROPERTY(int32_t lowBeam READ lowBeam WRITE setLowBeam NOTIFY lowBeamChanged)//近光灯 附件2
- Q_PROPERTY(int32_t parking READ parking WRITE setParking NOTIFY parkingChanged)//驻车 附件2
- Q_PROPERTY(int32_t brake READ brake WRITE setBrake NOTIFY brakeChanged)//刹车 附件2
- Q_PROPERTY(int32_t backCar READ backCar WRITE setBackCar NOTIFY backCarChanged)//倒车 附件2
- Q_PROPERTY(int32_t frontWorkLamp READ frontWorkLamp WRITE setFrontWorkLamp NOTIFY frontWorkLampChanged)//前工作灯 附件2
- Q_PROPERTY(int32_t rearWorkLamp READ rearWorkLamp WRITE setRearWorkLamp NOTIFY rearWorkLampChanged)//后工作灯 附件2
- Q_PROPERTY(int32_t cargoWeight READ cargoWeight WRITE setCargoWeight NOTIFY cargoWeightChanged)//渣包重量 附件2
- Q_PROPERTY(int32_t systemVol READ systemVol WRITE setSystemVol NOTIFY systemVolChanged)//系统电压 附件2
- Q_PROPERTY(int32_t fGear READ fGear WRITE setFGear NOTIFY fGearChanged)//档位信息1F 2R 3N
- Q_PROPERTY(int32_t gear1 READ gear1 WRITE setGear1 NOTIFY gear1Changed)//档位1234
- //下面都是报警信息解析
- Q_PROPERTY(int32_t lowOilPressureAlarm READ lowOilPressureAlarm WRITE setLowOilPressureAlarm NOTIFY lowOilPressureAlarmChanged)
- Q_PROPERTY(int32_t engineWaterTemperatureAlarm READ engineWaterTemperatureAlarm WRITE setEngineWaterTemperatureAlarm NOTIFY engineWaterTemperatureAlarmChanged)
- Q_PROPERTY(int32_t highEngineOilTemperatureAlarm READ highEngineOilTemperatureAlarm WRITE setHighEngineOilTemperatureAlarm NOTIFY highEngineOilTemperatureAlarmChanged)
- Q_PROPERTY(int32_t engineWaterLevelLowAlarm READ engineWaterLevelLowAlarm WRITE setEngineWaterLevelLowAlarm NOTIFY engineWaterLevelLowAlarmChanged)
- Q_PROPERTY(int32_t lowFuelOilAlarm READ lowFuelOilAlarm WRITE setLowFuelOilAlarm NOTIFY lowFuelOilAlarmChanged)
- Q_PROPERTY(int32_t returnOilFilterBlockedAlarm READ returnOilFilterBlockedAlarm WRITE setReturnOilFilterBlockedAlarm NOTIFY returnOilFilterBlockedAlarmChanged)
- Q_PROPERTY(int32_t oilFilterBlockedAlarm READ oilFilterBlockedAlarm WRITE setOilFilterBlockedAlarm NOTIFY oilFilterBlockedAlarmChanged)
- Q_PROPERTY(int32_t controlScreenBlockageAlarm READ controlScreenBlockageAlarm WRITE setControlScreenBlockageAlarm NOTIFY controlScreenBlockageAlarmChanged)
- Q_PROPERTY(int32_t emergencyFilterBlockingAlarm READ emergencyFilterBlockingAlarm WRITE setEmergencyFilterBlockingAlarm NOTIFY emergencyFilterBlockingAlarmChanged)
- Q_PROPERTY(int32_t coolingFilterBlockedAlarm READ coolingFilterBlockedAlarm WRITE setCoolingFilterBlockedAlarm NOTIFY coolingFilterBlockedAlarmChanged)
- Q_PROPERTY(int32_t electricPumpScreenBlockedAlarm READ electricPumpScreenBlockedAlarm WRITE setElectricPumpScreenBlockedAlarm NOTIFY electricPumpScreenBlockedAlarmChanged)
- Q_PROPERTY(int32_t brakeFilterBlockedAlarm READ brakeFilterBlockedAlarm WRITE setBrakeFilterBlockedAlarm NOTIFY brakeFilterBlockedAlarmChanged)
- Q_PROPERTY(int32_t variableSpeedFilterBlockedAlarm READ variableSpeedFilterBlockedAlarm WRITE setVariableSpeedFilterBlockedAlarm NOTIFY variableSpeedFilterBlockedAlarmChanged)
- Q_PROPERTY(int32_t lowVoltageAlarm READ lowVoltageAlarm WRITE setLowVoltageAlarm NOTIFY lowVoltageAlarmChanged)
- Q_PROPERTY(int32_t highTransmissionOilTemperature READ highTransmissionOilTemperature WRITE setHighTransmissionOilTemperature NOTIFY highTransmissionOilTemperatureChanged)
- Q_PROPERTY(int32_t transmissionOilPressureIsLow READ transmissionOilPressureIsLow WRITE setTransmissionOilPressureIsLow NOTIFY transmissionOilPressureIsLowChanged)
- Q_PROPERTY(int32_t oilTemperatureSensor1IsFaulty READ oilTemperatureSensor1IsFaulty WRITE setOilTemperatureSensor1IsFaulty NOTIFY oilTemperatureSensor1IsFaultyChanged)
- Q_PROPERTY(int32_t oilTemperatureSensor2IsFaulty READ oilTemperatureSensor2IsFaulty WRITE setOilTemperatureSensor2IsFaulty NOTIFY oilTemperatureSensor2IsFaultyChanged)
- Q_PROPERTY(int32_t oilLevelSensorIsFaulty READ oilLevelSensorIsFaulty WRITE setOilLevelSensorIsFaulty NOTIFY oilLevelSensorIsFaultyChanged)
- Q_PROPERTY(int32_t frontThrottleFault READ frontThrottleFault WRITE setFrontThrottleFault NOTIFY frontThrottleFaultChanged)
- Q_PROPERTY(int32_t rearThrottleFault READ rearThrottleFault WRITE setRearThrottleFault NOTIFY rearThrottleFaultChanged)
- Q_PROPERTY(int32_t handleOfTheUpperArmIsFaulty READ handleOfTheUpperArmIsFaulty WRITE setHandleOfTheUpperArmIsFaulty NOTIFY handleOfTheUpperArmIsFaultyChanged)
- Q_PROPERTY(int32_t leftLegHandleIsFaulty READ leftLegHandleIsFaulty WRITE setLeftLegHandleIsFaulty NOTIFY leftLegHandleIsFaultyChanged)
- Q_PROPERTY(int32_t rightLegHandleIsFaulty READ rightLegHandleIsFaulty WRITE setRightLegHandleIsFaulty NOTIFY rightLegHandleIsFaultyChanged)
- Q_PROPERTY(int32_t engineBusFault READ engineBusFault WRITE setEngineBusFault NOTIFY engineBusFaultChanged)
- Q_PROPERTY(int32_t transmissionBusFault READ transmissionBusFault WRITE setTransmissionBusFault NOTIFY transmissionBusFaultChanged)
- Q_PROPERTY(int32_t remoteControlBusFault READ remoteControlBusFault WRITE setRemoteControlBusFault NOTIFY remoteControlBusFaultChanged)
- Q_PROPERTY(int32_t rodChamberPressureSensorIsFaulty READ rodChamberPressureSensorIsFaulty WRITE setRodChamberPressureSensorIsFaulty NOTIFY rodChamberPressureSensorIsFaultyChanged)
- Q_PROPERTY(int32_t noRodChamberPressureSensorIsFaulty READ noRodChamberPressureSensorIsFaulty WRITE setNoRodChamberPressureSensorIsFaulty NOTIFY noRodChamberPressureSensorIsFaultyChanged)
- Q_PROPERTY(int32_t brakePressureSensorIsFaulty READ brakePressureSensorIsFaulty WRITE setBrakePressureSensorIsFaulty NOTIFY brakePressureSensorIsFaultyChanged)
- Q_PROPERTY(int32_t systemPressureSensorIsFaulty READ systemPressureSensorIsFaulty WRITE setSystemPressureSensorIsFaulty NOTIFY systemPressureSensorIsFaultyChanged)
- Q_PROPERTY(int32_t controlPressureSensorIsFaulty READ controlPressureSensorIsFaulty WRITE setControlPressureSensorIsFaulty NOTIFY controlPressureSensorIsFaultyChanged)
- Q_PROPERTY(int32_t steeringPressureSensorIsFaulty READ steeringPressureSensorIsFaulty WRITE setSteeringPressureSensorIsFaulty NOTIFY steeringPressureSensorIsFaultyChanged)
- Q_PROPERTY(int32_t pressureSensorOfTheLowerArmIsFaulty READ pressureSensorOfTheLowerArmIsFaulty WRITE setPressureSensorOfTheLowerArmIsFaulty NOTIFY pressureSensorOfTheLowerArmIsFaultyChanged)
- Q_PROPERTY(int32_t lockingPinDisplacementSensorLIsFaulty READ lockingPinDisplacementSensorLIsFaulty WRITE setLockingPinDisplacementSensorLIsFaulty NOTIFY lockingPinDisplacementSensorLIsFaultyChanged)
- Q_PROPERTY(int32_t lockingPinDisplacementSensorRIsFaulty READ lockingPinDisplacementSensorRIsFaulty WRITE setLockingPinDisplacementSensorRIsFaulty NOTIFY lockingPinDisplacementSensorRIsFaultyChanged)
- Q_PROPERTY(int32_t legDisplacementSensorLIsFaulty READ legDisplacementSensorLIsFaulty WRITE setLegDisplacementSensorLIsFaulty NOTIFY legDisplacementSensorLIsFaultyChanged)
- Q_PROPERTY(int32_t legDisplacementSensorRIsFaulty READ legDisplacementSensorRIsFaulty WRITE setLegDisplacementSensorRIsFaulty NOTIFY legDisplacementSensorRIsFaultyChanged)
- Q_PROPERTY(int32_t steeringEncoderFailure READ steeringEncoderFailure WRITE setSteeringEncoderFailure NOTIFY steeringEncoderFailureChanged)
- 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;
- int radar9() const;
- QString Account() const;
- QString Password() const;
- QString CarName() const;
- QString DriveName() const;
-
- /*int radar6() const;*/
- int ping() const;
- double temp() 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;
- float Steer()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;
- int32_t WorkPressure() const;
- //大冶新增
- int32_t engineTime() const;
- int32_t wireSensorL() const;
- int32_t wireSensorR() const;
- int32_t fuelLevel() const;
- int32_t lockSwitchL() const;
- int32_t lockSwitchR() const;
- int32_t tipLimit() const;
- int32_t turnLeft() const;
- int32_t turnRight() const;
- int32_t hightBeam() const;
- int32_t lowBeam() const;
- int32_t parking() const;
- int32_t brake() const;
- int32_t backCar() const;
- int32_t frontWorkLamp() const;
- int32_t rearWorkLamp() const;
- int32_t cargoWeight() const;
- int32_t systemVol() const;
- int32_t fGear() const;
- int32_t gear1() const;
- int32_t lowOilPressureAlarm() const;
- int32_t engineWaterTemperatureAlarm() const;
- int32_t highEngineOilTemperatureAlarm() const;
- int32_t engineWaterLevelLowAlarm() const;
- int32_t lowFuelOilAlarm() const;
- int32_t returnOilFilterBlockedAlarm() const;
- int32_t oilFilterBlockedAlarm() const;
- int32_t controlScreenBlockageAlarm() const;
- int32_t emergencyFilterBlockingAlarm() const;
- int32_t coolingFilterBlockedAlarm() const;
- int32_t electricPumpScreenBlockedAlarm() const;
- int32_t brakeFilterBlockedAlarm() const;
- int32_t variableSpeedFilterBlockedAlarm() const;
- int32_t lowVoltageAlarm() const;
- int32_t highTransmissionOilTemperature() const;
- int32_t transmissionOilPressureIsLow() const;
- int32_t oilTemperatureSensor1IsFaulty() const;
- int32_t oilTemperatureSensor2IsFaulty() const;
- int32_t oilLevelSensorIsFaulty() const;
- int32_t frontThrottleFault() const;
- int32_t rearThrottleFault() const;
- int32_t handleOfTheUpperArmIsFaulty() const;
- int32_t leftLegHandleIsFaulty() const;
- int32_t rightLegHandleIsFaulty() const;
- int32_t engineBusFault() const;
- int32_t transmissionBusFault() const;
- int32_t remoteControlBusFault() const;
- int32_t rodChamberPressureSensorIsFaulty() const;
- int32_t noRodChamberPressureSensorIsFaulty() const;
- int32_t brakePressureSensorIsFaulty() const;
- int32_t systemPressureSensorIsFaulty() const;
- int32_t controlPressureSensorIsFaulty() const;
- int32_t steeringPressureSensorIsFaulty() const;
- int32_t pressureSensorOfTheLowerArmIsFaulty() const;
- int32_t lockingPinDisplacementSensorLIsFaulty() const;
- int32_t lockingPinDisplacementSensorRIsFaulty() const;
- int32_t legDisplacementSensorLIsFaulty() const;
- int32_t legDisplacementSensorRIsFaulty() const;
- int32_t steeringEncoderFailure() 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 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 setRadar9(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 setEngineTime(const int32_t value);
- void setWireSensorL(const int32_t value);
- void setWireSensorR(const int32_t value);
- void setFuelLevel(const int32_t value);
- void setLockSwitchL(const int32_t value);
- void setLockSwitchR(const int32_t value);
- void setTipLimit(const int32_t value);
- void setTurnLeft(const int32_t value);
- void setTurnRight(const int32_t value);
- void setHightBeam(const int32_t value);
- void setLowBeam(const int32_t value);
- void setParking(const int32_t value);
- void setBrake(const int32_t value);
- void setBackCar(const int32_t value);
- void setFrontWorkLamp(const int32_t value);
- void setRearWorkLamp(const int32_t value);
- void setCargoWeight(const int32_t value);
- void setSystemVol(const int32_t value);
- void setFGear(const int32_t value);
- void setGear1(const int32_t value);
- void setLowOilPressureAlarm(const int32_t value);
- void setEngineWaterTemperatureAlarm(const int32_t value);
- void setHighEngineOilTemperatureAlarm(const int32_t value);
- void setEngineWaterLevelLowAlarm(const int32_t value);
- void setLowFuelOilAlarm(const int32_t value);
- void setReturnOilFilterBlockedAlarm(const int32_t value);
- void setOilFilterBlockedAlarm(const int32_t value);
- void setControlScreenBlockageAlarm(const int32_t value);
- void setEmergencyFilterBlockingAlarm(const int32_t value);
- void setCoolingFilterBlockedAlarm(const int32_t value);
- void setElectricPumpScreenBlockedAlarm(const int32_t value);
- void setBrakeFilterBlockedAlarm(const int32_t value);
- void setVariableSpeedFilterBlockedAlarm(const int32_t value);
- void setLowVoltageAlarm(const int32_t value);
- void setHighTransmissionOilTemperature(const int32_t value);
- void setTransmissionOilPressureIsLow(const int32_t value);
- void setOilTemperatureSensor1IsFaulty(const int32_t value);
- void setOilTemperatureSensor2IsFaulty(const int32_t value);
- void setOilLevelSensorIsFaulty(const int32_t value);
- void setFrontThrottleFault(const int32_t value);
- void setRearThrottleFault(const int32_t value);
- void setHandleOfTheUpperArmIsFaulty(const int32_t value);
- void setLeftLegHandleIsFaulty(const int32_t value);
- void setRightLegHandleIsFaulty(const int32_t value);
- void setEngineBusFault(const int32_t value);
- void setTransmissionBusFault(const int32_t value);
- void setRemoteControlBusFault(const int32_t value);
- void setRodChamberPressureSensorIsFaulty(const int32_t value);
- void setNoRodChamberPressureSensorIsFaulty(const int32_t value);
- void setBrakePressureSensorIsFaulty(const int32_t value);
- void setSystemPressureSensorIsFaulty(const int32_t value);
- void setControlPressureSensorIsFaulty(const int32_t value);
- void setSteeringPressureSensorIsFaulty(const int32_t value);
- void setPressureSensorOfTheLowerArmIsFaulty(const int32_t value);
- void setLockingPinDisplacementSensorLIsFaulty(const int32_t value);
- void setLockingPinDisplacementSensorRIsFaulty(const int32_t value);
- void setLegDisplacementSensorLIsFaulty(const int32_t value);
- void setLegDisplacementSensorRIsFaulty(const int32_t value);
- void setSteeringEncoderFailure(const int32_t value);
- QQmlListProperty<CarData> 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,int32_t r8);
- 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);
- 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 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 radar9Changed();
- 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 engineTimeChanged();
- void wireSensorLChanged();
- void wireSensorRChanged();
- void fuelLevelChanged();
- void lockSwitchLChanged();
- void lockSwitchRChanged();
- void tipLimitChanged();
- void turnLeftChanged();
- void turnRightChanged();
- void hightBeamChanged();
- void lowBeamChanged();
- void parkingChanged();
- void brakeChanged();
- void backCarChanged();
- void frontWorkLampChanged();
- void rearWorkLampChanged();
- void cargoWeightChanged();
- void systemVolChanged();
- void fGearChanged();
- void gear1Changed();
- void lowOilPressureAlarmChanged();
- void engineWaterTemperatureAlarmChanged();
- void highEngineOilTemperatureAlarmChanged();
- void engineWaterLevelLowAlarmChanged();
- void lowFuelOilAlarmChanged();
- void returnOilFilterBlockedAlarmChanged();
- void oilFilterBlockedAlarmChanged();
- void controlScreenBlockageAlarmChanged();
- void emergencyFilterBlockingAlarmChanged();
- void coolingFilterBlockedAlarmChanged();
- void electricPumpScreenBlockedAlarmChanged();
- void brakeFilterBlockedAlarmChanged();
- void variableSpeedFilterBlockedAlarmChanged();
- void lowVoltageAlarmChanged();
- void highTransmissionOilTemperatureChanged();
- void transmissionOilPressureIsLowChanged();
- void oilTemperatureSensor1IsFaultyChanged();
- void oilTemperatureSensor2IsFaultyChanged();
- void oilLevelSensorIsFaultyChanged();
- void frontThrottleFaultChanged();
- void rearThrottleFaultChanged();
- void handleOfTheUpperArmIsFaultyChanged();
- void leftLegHandleIsFaultyChanged();
- void rightLegHandleIsFaultyChanged();
- void engineBusFaultChanged();
- void transmissionBusFaultChanged();
- void remoteControlBusFaultChanged();
- void rodChamberPressureSensorIsFaultyChanged();
- void noRodChamberPressureSensorIsFaultyChanged();
- void brakePressureSensorIsFaultyChanged();
- void systemPressureSensorIsFaultyChanged();
- void controlPressureSensorIsFaultyChanged();
- void steeringPressureSensorIsFaultyChanged();
- void pressureSensorOfTheLowerArmIsFaultyChanged();
- void lockingPinDisplacementSensorLIsFaultyChanged();
- void lockingPinDisplacementSensorRIsFaultyChanged();
- void legDisplacementSensorLIsFaultyChanged();
- void legDisplacementSensorRIsFaultyChanged();
- void steeringEncoderFailureChanged();
- private:
- IEgoNotify *_notify;
- IEgoControl *_control;
- // std::unique_ptr<CFishEyeWindow> _window;
- AppModelPrivate *d;
- std::vector<UserCamera> _users;
- QString m_account;
- QString m_password;
- QString m_carName;
- QString m_driveName;
-
- 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_radar9 = 5000;
-
- int32_t m_ping =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;// 发动机油压
-
- float m_steer = 1.3;
- 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;
- //大冶新增
- int32_t m_engineTime = 0;
- int32_t m_wireSensorL;
- int32_t m_wireSensorR;
- int32_t m_fuelLevel = 0;
- int32_t m_lockSwitchL;
- int32_t m_lockSwitchR;
- int32_t m_tipLimit = 0;
- int32_t m_turnLeft;
- int32_t m_turnRight;
- int32_t m_hightBeam;
- int32_t m_lowBeam;
- int32_t m_parking;
- int32_t m_brake;
- int32_t m_backCar;
- int32_t m_frontWorkLamp;
- int32_t m_rearWorkLamp;
- int32_t m_cargoWeight = 0;
- int32_t m_systemVol = 0;
- int32_t m_fGear;
- int32_t m_gear1;
- int32_t m_lowOilPressureAlarm;
- int32_t m_engineWaterTemperatureAlarm;
- int32_t m_highEngineOilTemperatureAlarm;
- int32_t m_engineWaterLevelLowAlarm;
- int32_t m_lowFuelOilAlarm;
- int32_t m_returnOilFilterBlockedAlarm;
- int32_t m_oilFilterBlockedAlarm;
- int32_t m_controlScreenBlockageAlarm;
- int32_t m_emergencyFilterBlockingAlarm;
- int32_t m_coolingFilterBlockedAlarm;
- int32_t m_electricPumpScreenBlockedAlarm;
- int32_t m_brakeFilterBlockedAlarm;
- int32_t m_variableSpeedFilterBlockedAlarm;
- int32_t m_lowVoltageAlarm;
- int32_t m_highTransmissionOilTemperature;
- int32_t m_transmissionOilPressureIsLow;
- int32_t m_oilTemperatureSensor1IsFaulty;
- int32_t m_oilTemperatureSensor2IsFaulty;
- int32_t m_oilLevelSensorIsFaulty;
- int32_t m_frontThrottleFault;
- int32_t m_rearThrottleFault;
- int32_t m_handleOfTheUpperArmIsFaulty;
- int32_t m_leftLegHandleIsFaulty;
- int32_t m_rightLegHandleIsFaulty;
- int32_t m_engineBusFault;
- int32_t m_transmissionBusFault;
- int32_t m_remoteControlBusFault;
- int32_t m_rodChamberPressureSensorIsFaulty;
- int32_t m_noRodChamberPressureSensorIsFaulty;
- int32_t m_brakePressureSensorIsFaulty;
- int32_t m_systemPressureSensorIsFaulty;
- int32_t m_controlPressureSensorIsFaulty;
- int32_t m_steeringPressureSensorIsFaulty;
- int32_t m_pressureSensorOfTheLowerArmIsFaulty;
- int32_t m_lockingPinDisplacementSensorLIsFaulty;
- int32_t m_lockingPinDisplacementSensorRIsFaulty;
- int32_t m_legDisplacementSensorLIsFaulty;
- int32_t m_legDisplacementSensorRIsFaulty;
- int32_t m_steeringEncoderFailure;
- };
- #endif // APPMODEL_H
|