[mac] define TxFrame and RxFrame types (#4040)

This commit defines RxFrame for receiving frames and TxFrame for
transmitting frames. The motivation is to prevent invalid uses of
Mac::Frame methods, because some of them are only available for rx
frames and some only for tx frames.
This commit is contained in:
Yakun Xu
2019-08-01 15:28:19 -07:00
committed by Jonathan Hui
parent 8782bf8b3e
commit 6c6aad2a01
33 changed files with 392 additions and 371 deletions
+2 -2
View File
@@ -78,8 +78,8 @@ void TestMacHeader(void)
for (unsigned i = 0; i < OT_ARRAY_LENGTH(tests); i++)
{
uint8_t psdu[Mac::Frame::kMTU];
Mac::Frame frame;
uint8_t psdu[Mac::Frame::kMTU];
Mac::TxFrame frame;
frame.mPsdu = psdu;