mirror of
https://github.com/espressif/openthread.git
synced 2026-09-05 16:50:05 +00:00
[mac-frame] add mCommandId to TxFrame::Info (#10697)
This commit updates `TxFrame::Info` to include `mCommandId`, used when the frame type is `kTypeMacCmd`. This allows callers to specify the Command ID when preparing a MAC Command `TxFrame`. With this change `Frame::SetCommandId()` is no longer used or needed so it is removed.
This commit is contained in:
@@ -640,9 +640,6 @@ void TestMacFrameApi(void)
|
||||
VerifyOrQuit(frame.GetType() == Mac::Frame::kTypeMacCmd);
|
||||
SuccessOrQuit(frame.GetCommandId(commandId));
|
||||
VerifyOrQuit(commandId == Mac::Frame::kMacCmdDataRequest);
|
||||
SuccessOrQuit(frame.SetCommandId(Mac::Frame::kMacCmdBeaconRequest));
|
||||
SuccessOrQuit(frame.GetCommandId(commandId));
|
||||
VerifyOrQuit(commandId == Mac::Frame::kMacCmdBeaconRequest);
|
||||
|
||||
#if (OPENTHREAD_CONFIG_THREAD_VERSION >= OT_THREAD_VERSION_1_2)
|
||||
// IEEE 802.15.4-2015 Mac Command
|
||||
@@ -660,9 +657,6 @@ void TestMacFrameApi(void)
|
||||
SuccessOrQuit(frame.GetCommandId(commandId));
|
||||
VerifyOrQuit(commandId == Mac::Frame::kMacCmdDataRequest);
|
||||
printf("commandId:%d\n", commandId);
|
||||
SuccessOrQuit(frame.SetCommandId(Mac::Frame::kMacCmdOrphanNotification));
|
||||
SuccessOrQuit(frame.GetCommandId(commandId));
|
||||
VerifyOrQuit(commandId == Mac::Frame::kMacCmdOrphanNotification);
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user