Ego.h 3.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. #ifndef EGOD_H
  2. #define EGOD_H
  3. #include "EgoInterface.h"
  4. #include <QObject>
  5. #include <QtGui>
  6. Q_DECLARE_METATYPE(UserCamera);
  7. class CEgoNotify : public QObject, public IEgoNotify {
  8. Q_OBJECT
  9. public:
  10. //传递所有车辆信息
  11. void OnRobot(std::unique_ptr<UserCamera> &info) override;
  12. void OnSigin(bool bRet) override;
  13. void OnNotifyDel(int32_t peer) override;
  14. void OnNotifyRadar(int32_t r0, int32_t r1, int32_t r2, int32_t r3, int32_t r4,
  15. int32_t r5,int32_t r6, int32_t r7) override;
  16. void OnNotifyImu(float x, float y) override;
  17. void OnNotifyPing(int32_t value,double temp) override;
  18. void OnNotifyKickOff() override;
  19. virtual void OnNotifyMoveEnd(int32_t rid, WorkArea area, int32_t no) override;
  20. virtual void OnNotifyLeave(int32_t peer);
  21. // void OnEmergency(bool enable, bool motor, bool gear, bool turnl, bool turnR) override;
  22. // void OnAccel(int16_t accel, bool onoff) override;
  23. // void OnSteer(uint64_t steer) override;
  24. // void OnArm(int16_t flip, int16_t armL, int16_t armR, bool onoff) override;
  25. void OnNotifyFeed(const FeedData& data) override;
  26. // void OnLidarData(bool isLeft, bool isDense, int32_t seq, PointXYZI* data, int32_t length) override;
  27. // virtual void OpenFullView(const char*) override;
  28. // virtual void CloseFullView() override;
  29. virtual void OnNotifyVideoFail(int32_t uid) override;
  30. virtual void OnNotifyState(int32_t uid, UserState state) override;
  31. virtual void OnNDTPos(Position* pos) override;
  32. virtual void OnNotifyMoveRet(MoveDesc desc) override;
  33. virtual void OnNotifyEncode(int32_t left, int32_t right) override;
  34. //add-wfg
  35. void OnCautionLight(bool cautionLight) override;
  36. void OnLightL(bool lightL) override;
  37. void OnLightR(bool lightR) override;
  38. void OnGearF(bool gearF) override;
  39. void OnGearR(bool gearR) override;
  40. void OnCarPark(bool carPark) override;
  41. void OnBuzzerPlay(bool buzzerPlay) override;
  42. void OnLightFront(bool lightFront) override;
  43. void OnLightWork(bool lightWork) override;
  44. void OnEmergency(bool emergency) override;
  45. //mqtt
  46. void OnMqttData(cannet_frame* frames) override;
  47. signals:
  48. void egoLoginResult(bool rst);
  49. void egoCarAppend(const UserCamera &info);
  50. void egoRadar(int32_t r0, int32_t r1, int32_t r2, int32_t r3, int32_t r4,
  51. int32_t r5,int32_t r6, int32_t r7);
  52. void egoImu(float x, float y);
  53. void egoEncode(int32_t left, int32_t right);
  54. void egoFeedData(const FeedData& data);
  55. void egoPing(int32_t value, double temp);
  56. void egoNotifyDel(int32_t peer);
  57. void egoKickoff();
  58. void egoMoveEnd(int32_t peer, WorkArea area, int32_t no);
  59. void egoNotifyLeave(int32_t peer);
  60. void egoNotifyFail(int32_t uid);
  61. void egoNotifyState(int32_t uid, UserState);
  62. void egoMoveRet(MoveDesc desc);
  63. void egoPosition(float x, float y, float z);
  64. //add-wfg
  65. void egoFrontLightChanged(bool frontlight);
  66. void egoBackLightChanged(bool backlight);
  67. void egoBuzzerChanged(bool buzzer);
  68. void egoCautionLightChanged(bool cautionLight);
  69. void egoLightLChanged(bool lightL);
  70. void egoLightRChanged(bool lightR);
  71. void egoGearFChanged(bool gearF);
  72. void egoGearRChanged(bool gearR);
  73. void egoCarParkChanged(bool carPark);
  74. void egoBuzzerPlayChanged(bool buzzerPlay);
  75. void egoLightFrontChanged(bool lightFront);
  76. void egoLightWorkChanged(bool lightWork);
  77. void egoEmergencyChanged(bool emergency);
  78. void egoMqttChanged(cannet_frame* frames);
  79. private:
  80. // std::vector<UserCamera> _users;
  81. };
  82. #endif