Ego.h 3.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  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. signals:
  46. void egoLoginResult(bool rst);
  47. void egoCarAppend(const UserCamera &info);
  48. void egoRadar(int32_t r0, int32_t r1, int32_t r2, int32_t r3, int32_t r4,
  49. int32_t r5,int32_t r6, int32_t r7);
  50. void egoImu(float x, float y);
  51. void egoEncode(int32_t left, int32_t right);
  52. void egoFeedData(const FeedData& data);
  53. void egoPing(int32_t value, double temp);
  54. void egoNotifyDel(int32_t peer);
  55. void egoKickoff();
  56. void egoMoveEnd(int32_t peer, WorkArea area, int32_t no);
  57. void egoNotifyLeave(int32_t peer);
  58. void egoNotifyFail(int32_t uid);
  59. void egoNotifyState(int32_t uid, UserState);
  60. void egoMoveRet(MoveDesc desc);
  61. void egoPosition(float x, float y, float z);
  62. //add-wfg
  63. void egoFrontLightChanged(bool frontlight);
  64. void egoBackLightChanged(bool backlight);
  65. void egoBuzzerChanged(bool buzzer);
  66. void egoCautionLightChanged(bool cautionLight);
  67. void egoLightLChanged(bool lightL);
  68. void egoLightRChanged(bool lightR);
  69. void egoGearFChanged(bool gearF);
  70. void egoGearRChanged(bool gearR);
  71. void egoCarParkChanged(bool carPark);
  72. void egoBuzzerPlayChanged(bool buzzerPlay);
  73. void egoLightFrontChanged(bool lightFront);
  74. void egoLightWorkChanged(bool lightWork);
  75. void egoEmergencyChanged(bool emergency);
  76. private:
  77. // std::vector<UserCamera> _users;
  78. };
  79. #endif