notifier.h 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. #pragma once
  2. class CIOBuffer;
  3. /*
  4. class SensorSocket;
  5. class ISensorNotify
  6. {
  7. public:
  8. virtual void Notify(int8_t * buffer,int32_t size) =0;
  9. virtual void SetSensorSocket(SensorSocket* can) =0;
  10. #ifndef WIN32
  11. virtual void Start() = 0;
  12. virtual void Stop() = 0;
  13. #endif
  14. virtual ~ISensorNotify()=default;
  15. };
  16. */
  17. struct PointXYZI;
  18. struct Position;
  19. /*
  20. 抽象接口类,类虚函数在其派生类中实现
  21. */
  22. class INativeNotify {
  23. public:
  24. #ifdef WIN32
  25. virtual void OnSigin(int32_t uid,bool bRet) = 0;
  26. virtual void OnRobot(const RemoNet::Robot& robot) = 0;
  27. #else
  28. virtual void OnAdd(int32_t uid,bool bRet) = 0;
  29. #endif
  30. virtual void OnConnected(bool bRet) = 0;
  31. #ifdef WIN32
  32. virtual void OnVideoRep(bool ok, int32_t index, int32_t peer) = 0;
  33. virtual void OnNotifyDel(int32_t peer, EgoType type) = 0;
  34. virtual void OnNotifyKick() = 0;
  35. virtual void OnNotifyState(int32_t rid, UserState state) = 0;
  36. // virtual void OnLidarData(bool isLeft, bool isDense, int32_t seq, PointXYZI* data, int32_t length) = 0;
  37. virtual void OnMoveEnd(int32_t rid, WorkArea area, int32_t no) = 0;
  38. // virtual void OnNDTPos(Position* pos) = 0;
  39. virtual void OnNotifyMoveRet(MoveDesc desc) = 0;
  40. #else
  41. virtual void OnVideoReq(int32_t index, int32_t peer) = 0;
  42. virtual void OnMoveBegin(WorkArea area, int32_t no) = 0;
  43. virtual void OnSwitchDriver() = 0;
  44. #endif
  45. virtual void OnVideoOffer(int32_t index, const char* type, const char* sdp) = 0;
  46. virtual void OnVideoAnswer(int32_t index, const char* type, const char* sdp) = 0;
  47. virtual void OnVideoCandidate(int32_t index, const char* candidate,
  48. int32_t sdp_mline_index,
  49. const char* sdp_mid) = 0;
  50. /*virtual void OnVideoAddTrack(RemoteVideoTrackWrapper* ptr) = 0;*/
  51. // virtual void OnCancelReq(int32_t index) = 0;
  52. virtual void OnVideoLeave(int32_t peer, EgoType type) = 0;
  53. virtual void OnMessageFrameNotify(ChannelType type,int16_t cmd,int16_t length,const void * data) = 0;
  54. };
  55. /*
  56. #ifdef WIN32
  57. class IPeerNotify
  58. {
  59. public:
  60. virtual void Start() = 0;
  61. virtual void Stop() = 0;
  62. virtual void OnPeerMessage(int16_t cmd, int16_t length, const void* data) = 0;
  63. };
  64. #endif
  65. */