Lines Matching refs:frame
293 Mac::TxFrame frame; in TestMacHeader() local
298 frame.mPsdu = psdu; in TestMacHeader()
299 frame.mLength = 0; in TestMacHeader()
300 frame.mRadioType = 0; in TestMacHeader()
363 frameInfo.PrepareHeadersIn(frame); in TestMacHeader()
365 VerifyOrQuit(frame.GetHeaderLength() == testCase.mHeaderLength); in TestMacHeader()
366 VerifyOrQuit(frame.GetFooterLength() == testCase.mFooterLength); in TestMacHeader()
367 VerifyOrQuit(frame.GetLength() == testCase.mHeaderLength + testCase.mFooterLength); in TestMacHeader()
369 VerifyOrQuit(frame.GetType() == Mac::Frame::kTypeData); in TestMacHeader()
370 VerifyOrQuit(!frame.IsAck()); in TestMacHeader()
371 VerifyOrQuit(frame.GetVersion() == testCase.mVersion); in TestMacHeader()
372 VerifyOrQuit(frame.GetSecurityEnabled() == (testCase.mSecurity != kNoSec)); in TestMacHeader()
373 VerifyOrQuit(!frame.GetFramePending()); in TestMacHeader()
374 VerifyOrQuit(!frame.IsIePresent()); in TestMacHeader()
375 VerifyOrQuit(frame.GetAckRequest() == (testCase.mDstAddrType != kNoneAddr)); in TestMacHeader()
377 VerifyOrQuit(frame.IsSrcAddrPresent() == (testCase.mSrcAddrType != kNoneAddr)); in TestMacHeader()
378 SuccessOrQuit(frame.GetSrcAddr(address)); in TestMacHeader()
380 VerifyOrQuit(frame.IsDstAddrPresent() == (testCase.mDstAddrType != kNoneAddr)); in TestMacHeader()
381 SuccessOrQuit(frame.GetDstAddr(address)); in TestMacHeader()
384 VerifyOrQuit(frame.IsDstPanIdPresent() == (testCase.mDstPanIdMode != kNoPanId)); in TestMacHeader()
386 if (frame.IsDstPanIdPresent()) in TestMacHeader()
388 SuccessOrQuit(frame.GetDstPanId(panId)); in TestMacHeader()
393 if (frame.IsSrcPanIdPresent()) in TestMacHeader()
395 SuccessOrQuit(frame.GetSrcPanId(panId)); in TestMacHeader()
400 if (frame.GetSecurityEnabled()) in TestMacHeader()
405 SuccessOrQuit(frame.GetSecurityLevel(security)); in TestMacHeader()
408 SuccessOrQuit(frame.GetKeyIdMode(keyIdMode)); in TestMacHeader()
419 VerifyOrQuit(frame.IsSequencePresent()); in TestMacHeader()
420 … offset += snprintf(string + offset, sizeof(string) - offset, ", seq:%u", frame.GetSequence()); in TestMacHeader()
424 VerifyOrQuit(!frame.IsSequencePresent()); in TestMacHeader()
426 DumpBuffer(string, frame.GetPsdu(), frame.GetLength()); in TestMacHeader()
574 Mac::Frame frame; in TestMacFrameApi() local
599 frame.mPsdu = ack_psdu1; in TestMacFrameApi()
600 frame.mLength = sizeof(ack_psdu1); in TestMacFrameApi()
601 VerifyOrQuit(frame.GetType() == Mac::Frame::kTypeAck); in TestMacFrameApi()
602 VerifyOrQuit(!frame.GetSecurityEnabled()); in TestMacFrameApi()
603 VerifyOrQuit(!frame.GetFramePending()); in TestMacFrameApi()
604 VerifyOrQuit(!frame.GetAckRequest()); in TestMacFrameApi()
605 VerifyOrQuit(!frame.IsIePresent()); in TestMacFrameApi()
606 VerifyOrQuit(!frame.IsDstPanIdPresent()); in TestMacFrameApi()
607 VerifyOrQuit(!frame.IsDstAddrPresent()); in TestMacFrameApi()
608 VerifyOrQuit(frame.GetVersion() == Mac::Frame::kVersion2006); in TestMacFrameApi()
609 VerifyOrQuit(!frame.IsSrcAddrPresent()); in TestMacFrameApi()
610 VerifyOrQuit(frame.IsSequencePresent()); in TestMacFrameApi()
611 VerifyOrQuit(frame.GetSequence() == 94); in TestMacFrameApi()
621 frame.mPsdu = data_psdu1; in TestMacFrameApi()
622 frame.mLength = sizeof(data_psdu1); in TestMacFrameApi()
623 VerifyOrQuit(frame.IsVersion2015()); in TestMacFrameApi()
624 VerifyOrQuit(frame.IsDstPanIdPresent()); in TestMacFrameApi()
625 VerifyOrQuit(frame.IsDstAddrPresent()); in TestMacFrameApi()
626 VerifyOrQuit(frame.IsSrcAddrPresent()); in TestMacFrameApi()
627 SuccessOrQuit(frame.GetSecurityControlField(scf)); in TestMacFrameApi()
635 frame.mPsdu = mac_cmd_psdu1; in TestMacFrameApi()
636 frame.mLength = sizeof(mac_cmd_psdu1); in TestMacFrameApi()
637 VerifyOrQuit(frame.IsSequencePresent()); in TestMacFrameApi()
638 VerifyOrQuit(frame.GetSequence() == 133); in TestMacFrameApi()
639 VerifyOrQuit(frame.GetVersion() == Mac::Frame::kVersion2006); in TestMacFrameApi()
640 VerifyOrQuit(frame.GetType() == Mac::Frame::kTypeMacCmd); in TestMacFrameApi()
641 SuccessOrQuit(frame.GetCommandId(commandId)); in TestMacFrameApi()
651 frame.mPsdu = mac_cmd_psdu2; in TestMacFrameApi()
652 frame.mLength = sizeof(mac_cmd_psdu2); in TestMacFrameApi()
653 VerifyOrQuit(frame.IsSequencePresent()); in TestMacFrameApi()
654 VerifyOrQuit(frame.GetSequence() == 141); in TestMacFrameApi()
655 VerifyOrQuit(frame.IsVersion2015()); in TestMacFrameApi()
656 VerifyOrQuit(frame.GetType() == Mac::Frame::kTypeMacCmd); in TestMacFrameApi()
657 SuccessOrQuit(frame.GetCommandId(commandId)); in TestMacFrameApi()