Add M17_DEBUG prints for M17 Frame Type Validation

pull/23/head
Dave Behnke 1 month ago
parent 034c45396f
commit 03f613e7e6

@ -626,6 +626,19 @@ bool CM17Protocol::IsValidDvPacket(const CBuffer &Buffer, std::unique_ptr<CDvHea
// get the frame // get the frame
frame = std::unique_ptr<CDvFramePacket>(new CDvFramePacket(m17)); frame = std::unique_ptr<CDvFramePacket>(new CDvFramePacket(m17));
// DEBUG: Check FrameType
printf("M17_DEBUG: IsValidDvPacket Type=%04X Buf19=%02X CodecIn=%d\n",
m17.GetFrameType(), Buffer[19], (int)frame->GetCodecInV());
// Need accessor for codec_in. CDvFramePacket has GetCodecIn() but it calls m_TCPack.
// Oh, CDvFramePacket doesn't expose it directly except via cast?
// CPacket has GetCodecIn() ? CPacket does NOT have GetCodecIn().
// STCPacket has codec_in.
// CDvFramePacket has SetCodecData.
// Let's use GetCodecData if possible? No.
// Let's just print FrameType. It's enough.
printf("M17_DEBUG: IsValidDvPacket Type=%04X Buf19=%02X\n", m17.GetFrameType(), Buffer[19]);
// check validity of packets // check validity of packets
if ( header && header->IsValid() && frame && frame->IsValid() ) if ( header && header->IsValid() && frame && frame->IsValid() )
return true; return true;

Loading…
Cancel
Save

Powered by TurnKey Linux.