[mac] remove mDidTx from otRadioFrame (#3520)

mDidTx indicates whether a frame is received or transmitted, which is
only useful for capturing packets. This commit removes this field, and makes
this flag an argument to the pcap callback.
This commit is contained in:
Yakun Xu
2019-01-29 04:31:15 +08:00
committed by Jonathan Hui
parent 7789b90f23
commit 504331eadd
9 changed files with 21 additions and 34 deletions
+5 -3
View File
@@ -2050,13 +2050,15 @@ exit:
AppendResult(error);
}
void Interpreter::s_HandleLinkPcapReceive(const otRadioFrame *aFrame, void *aContext)
void Interpreter::s_HandleLinkPcapReceive(const otRadioFrame *aFrame, bool aIsTx, void *aContext)
{
static_cast<Interpreter *>(aContext)->HandleLinkPcapReceive(aFrame);
static_cast<Interpreter *>(aContext)->HandleLinkPcapReceive(aFrame, aIsTx);
}
void Interpreter::HandleLinkPcapReceive(const otRadioFrame *aFrame)
void Interpreter::HandleLinkPcapReceive(const otRadioFrame *aFrame, bool aIsTx)
{
OT_UNUSED_VARIABLE(aIsTx);
mServer->OutputFormat("\r\n");
for (size_t i = 0; i < 44; i++)