debug_receiver_handler.cpp 707 B

1234567891011121314151617181920
  1. #include "debug_receiver_handler.h"
  2. #include "debug_receiver_proto.h"
  3. #include <util/generic/cast.h>
  4. #include <util/string/printf.h>
  5. void TDebugReceiverHandler::OnError(TAutoPtr<NBus::TBusMessage>, NBus::EMessageStatus status) {
  6. Cerr << "error " << status << "\n";
  7. }
  8. void TDebugReceiverHandler::OnMessage(NBus::TOnMessageContext& message) {
  9. TDebugReceiverMessage* typedMessage = VerifyDynamicCast<TDebugReceiverMessage*>(message.GetMessage());
  10. Cerr << "type=" << typedMessage->GetHeader()->Type
  11. << " size=" << typedMessage->GetHeader()->Size
  12. << " flags=" << Sprintf("0x%04x", (int)typedMessage->GetHeader()->FlagsInternal)
  13. << "\n";
  14. message.ForgetRequest();
  15. }