debug_receiver_proto.h 735 B

123456789101112131415161718192021222324252627
  1. #pragma once
  2. #include <library/cpp/messagebus/ybus.h>
  3. struct TDebugReceiverMessage: public NBus::TBusMessage {
  4. /// constructor to create messages on sending end
  5. TDebugReceiverMessage(ui16 type)
  6. : NBus::TBusMessage(type)
  7. {
  8. }
  9. /// constructor with serialzed data to examine the header
  10. TDebugReceiverMessage(NBus::ECreateUninitialized)
  11. : NBus::TBusMessage(NBus::ECreateUninitialized())
  12. {
  13. }
  14. TBuffer Payload;
  15. };
  16. struct TDebugReceiverProtocol: public NBus::TBusProtocol {
  17. TDebugReceiverProtocol();
  18. void Serialize(const NBus::TBusMessage* mess, TBuffer& data) override;
  19. TAutoPtr<NBus::TBusMessage> Deserialize(ui16 messageType, TArrayRef<const char> payload) override;
  20. };