diff --git a/WHATSNEW b/WHATSNEW index 89474013d8e..31e8e7a0b71 100644 --- a/WHATSNEW +++ b/WHATSNEW @@ -309,6 +309,22 @@ Notable backward incompatible changes are the following: Ieee80211ModeBase supplies default unknown values for custom subclasses. The migration guide explains the return values and required overrides. +18. IEEE 802.11 radio commands wait for an accepted frame + + Tx is the component that transmits frames for medium access control (MAC). + Radio reconfiguration now waits until Tx completes an accepted transmission. + This includes the short interframe space (SIFS) before a response. + The MAC previously used only the medium state, which cannot identify that wait. + + For example, a radio command arrives while Tx waits to transmit an + acknowledgment (ACK) frame. The MAC keeps the command until the ACK completes. + This prevents radio reconfiguration before the accepted response completes. + The change affects event order and the event fingerprints of IEEE 802.11 simulations. + + Custom implementations of ITx must implement hasTransmission() before they compile again. + The method identifies both the wait before transmission and the transmission itself. + The migration guide explains the return values and the order of the completion callback. + Notable backward compatible changes are the following: 1. IEEE 802.11 per-station rate statistics diff --git a/doc/src/migration-guide/index.rst b/doc/src/migration-guide/index.rst index a690073a34c..474191098ab 100644 --- a/doc/src/migration-guide/index.rst +++ b/doc/src/migration-guide/index.rst @@ -4,6 +4,34 @@ Migrating Code from INET 3.x ============================ Release: |release| +IEEE 802.11 Radio Command Deferral +--------------------------------- + +Tx is the component that transmits frames for medium access control (MAC). +The MAC keeps a radio command while Tx retains an accepted transmission. +This includes the short interframe space (SIFS) before a response. +The hybrid coordination function (HCF) and distributed coordination function (DCF) +release the pending command after the response completes. +This prevents radio reconfiguration before the accepted response completes. + +Custom implementations of ``ITx`` need the new method to compile. +Implement the query with this signature: + +.. code-block:: c++ + + [[nodiscard]] bool hasTransmission() const override; + +1. Return true after Tx accepts a frame, including any wait before transmission starts. +2. Keep the return value true while Tx transmits the frame. +3. Clear the accepted transmission state before Tx calls ``ICallback::transmissionComplete()``. +4. Return false when Tx holds no accepted transmission. + +The completion callback can release a pending command, so it must observe the cleared state. +For example, Tx accepts an acknowledgment (ACK) frame with a SIFS delay. +A radio command arrives during that delay, when ``hasTransmission()`` returns true. +The MAC keeps the command until the ACK completes. +Tx clears its state before the callback, so the coordination function can release the command. + IEEE 802.11 PHY Mode Properties ------------------------------- diff --git a/src/inet/linklayer/ieee80211/mac/Ieee80211Mac.cc b/src/inet/linklayer/ieee80211/mac/Ieee80211Mac.cc index d87f581231f..b864c39f435 100644 --- a/src/inet/linklayer/ieee80211/mac/Ieee80211Mac.cc +++ b/src/inet/linklayer/ieee80211/mac/Ieee80211Mac.cc @@ -230,7 +230,7 @@ void Ieee80211Mac::handleUpperCommand(cMessage *msg) pendingRadioConfigMsg = nullptr; } - if (rx->isMediumFree()) { // TODO this should be just the physical channel sense!!!! + if (rx->isMediumFree() && !tx->hasTransmission()) { // TODO this should be just the physical channel sense!!!! EV_DEBUG << "Sending it down immediately\n"; // PhyControlInfo *phyControlInfo = dynamic_cast(msg->getControlInfo()); // if (phyControlInfo) @@ -387,9 +387,10 @@ void Ieee80211Mac::sendDownFrame(Packet *frame) void Ieee80211Mac::sendDownPendingRadioConfigMsg() { - if (pendingRadioConfigMsg != nullptr) { - sendDown(pendingRadioConfigMsg); + if (pendingRadioConfigMsg != nullptr && !tx->hasTransmission()) { + auto message = pendingRadioConfigMsg; pendingRadioConfigMsg = nullptr; + sendDown(message); } } diff --git a/src/inet/linklayer/ieee80211/mac/Tx.h b/src/inet/linklayer/ieee80211/mac/Tx.h index 59437ac4389..64751788055 100644 --- a/src/inet/linklayer/ieee80211/mac/Tx.h +++ b/src/inet/linklayer/ieee80211/mac/Tx.h @@ -41,6 +41,7 @@ class INET_API Tx : public SimpleModule, public ITx virtual void transmitFrame(Packet *packet, const Ptr& header, ITx::ICallback *txCallback) override; virtual void transmitFrame(Packet *packet, const Ptr& header, simtime_t ifs, ITx::ICallback *txCallback) override; + [[nodiscard]] bool hasTransmission() const override { return txCallback != nullptr; } virtual void radioTransmissionFinished() override; }; diff --git a/src/inet/linklayer/ieee80211/mac/contract/ITx.h b/src/inet/linklayer/ieee80211/mac/contract/ITx.h index 7ca8e059784..a3ce885976b 100644 --- a/src/inet/linklayer/ieee80211/mac/contract/ITx.h +++ b/src/inet/linklayer/ieee80211/mac/contract/ITx.h @@ -33,6 +33,15 @@ class INET_API ITx virtual void transmitFrame(Packet *packet, const Ptr& header, ICallback *callback) = 0; virtual void transmitFrame(Packet *packet, const Ptr& header, simtime_t ifs, ICallback *callback) = 0; + /** + * The query returns true while Tx retains an accepted frame, + * including any wait before transmission and the transmission itself. + * Tx clears this state before it calls ICallback::transmissionComplete(), + * so the callback can release pending radio commands. + * The query returns false when Tx holds no accepted transmission. + * For example, an accepted ACK with a SIFS delay keeps this query true until transmission ends. + */ + [[nodiscard]] virtual bool hasTransmission() const = 0; virtual void radioTransmissionFinished() = 0; }; diff --git a/src/inet/linklayer/ieee80211/mac/coordinationfunction/Dcf.cc b/src/inet/linklayer/ieee80211/mac/coordinationfunction/Dcf.cc index 105fea0bc80..c7102d7e946 100644 --- a/src/inet/linklayer/ieee80211/mac/coordinationfunction/Dcf.cc +++ b/src/inet/linklayer/ieee80211/mac/coordinationfunction/Dcf.cc @@ -264,8 +264,10 @@ void Dcf::transmissionComplete(Packet *packet, const PtrisSequenceRunning()) { frameSequenceHandler->transmissionComplete(); } - else + else { recipientProcessTransmittedControlResponseFrame(packet, header); + mac->sendDownPendingRadioConfigMsg(); + } } bool Dcf::hasFrameToTransmit() diff --git a/src/inet/linklayer/ieee80211/mac/coordinationfunction/Hcf.cc b/src/inet/linklayer/ieee80211/mac/coordinationfunction/Hcf.cc index 9f4bcaf2e96..ed2cae18075 100644 --- a/src/inet/linklayer/ieee80211/mac/coordinationfunction/Hcf.cc +++ b/src/inet/linklayer/ieee80211/mac/coordinationfunction/Hcf.cc @@ -403,8 +403,10 @@ void Hcf::transmissionComplete(Packet *packet, const PtrisOwning()) throw cRuntimeError("Hcca is unimplemented!"); - else + else { recipientProcessTransmittedControlResponseFrame(packet, header); + mac->sendDownPendingRadioConfigMsg(); + } } void Hcf::originatorProcessRtsProtectionFailed(Packet *packet) diff --git a/src/inet/linklayer/ieee80211/mac/coordinationfunction/Hcf.h b/src/inet/linklayer/ieee80211/mac/coordinationfunction/Hcf.h index ae6b385573b..623749b6bb8 100644 --- a/src/inet/linklayer/ieee80211/mac/coordinationfunction/Hcf.h +++ b/src/inet/linklayer/ieee80211/mac/coordinationfunction/Hcf.h @@ -113,7 +113,8 @@ class INET_API Hcf : public ICoordinationFunction, public IFrameSequenceHandler: void startFrameSequence(AccessCategory ac); void handleInternalCollision(std::vector internallyCollidedEdcafs); - void sendUp(const std::vector& completeFrames); + // Tests can consume received frames here without an upper protocol stack. + virtual void sendUp(const std::vector& completeFrames); FrameSequenceContext *buildContext(AccessCategory ac); virtual bool hasFrameToTransmit(); virtual bool hasFrameToTransmit(AccessCategory ac); diff --git a/tests/fingerprint/examples.csv b/tests/fingerprint/examples.csv index 9fc76d91942..1b64c012d66 100644 --- a/tests/fingerprint/examples.csv +++ b/tests/fingerprint/examples.csv @@ -47,8 +47,8 @@ /examples/communicationcache/, -f omnetpp.ini -c VectorCommunicationCache -r 0, 10s, 4c65-91ae/tplx;72b5-8f0b/~tNl;190a-bc02/~tND;40ef-e3e2/tyf, PASS, wireless Ipv4 /examples/dhcp/, -f omnetpp.ini -c WiredDHCP -r 0, 5000s, 218c-c7d8/tplx;2fea-5f49/~tNl;97d9-613e/~tND;8a53-9a15/tyf, PASS, EthernetMac Ipv4 -/examples/dhcp/, -f omnetpp.ini -c WirelessDHCP -r 0, 500s, 0429-2765/tplx;7b02-afe3/~tNl;6ea6-9583/~tND;d3a7-5f49/tyf, PASS, wireless EthernetMac Ipv4 -/examples/dhcp/, -f omnetpp.ini -c Wireless2DHCP -r 0, 500s, e5ee-dbd9/tplx;c750-5ba3/~tNl;e948-81ed/~tND;3497-9980/tyf, PASS, wireless EthernetMac Ipv4 +/examples/dhcp/, -f omnetpp.ini -c WirelessDHCP -r 0, 500s, 761b-5d89/tplx;7b02-afe3/~tNl;6ea6-9583/~tND;d3a7-5f49/tyf, PASS, wireless EthernetMac Ipv4 +/examples/dhcp/, -f omnetpp.ini -c Wireless2DHCP -r 0, 500s, 44fe-ee41/tplx;c750-5ba3/~tNl;e948-81ed/~tND;3497-9980/tyf, PASS, wireless EthernetMac Ipv4 /examples/dhcp/, -f omnetpp.ini -c RebootingDHCP -r 0, 500s, 556b-32fd/tplx;a999-2790/~tNl;770b-f78a/~tND;fbd6-20e8/tyf, PASS, EthernetMac Ipv4 # /examples/diffserv/onedomain/, -f omnetpp.ini -c Apps -r 0, 10s, 0, PASS, # abstract-config @@ -380,10 +380,10 @@ /examples/manetrouting/multiradio/, -f omnetpp.ini -c MultiRadio -r 0, 20s, ec17-5cc2/tplx;55f5-0894/~tNl, PASS, wireless adhoc Ipv4 /examples/manetrouting/multiradio/, -f omnetpp.ini -c SingleRadio -r 0, 20s, 85a0-51b8/tplx;c07a-44e1/~tNl;3aa0-49ed/tyf, PASS, wireless adhoc Ipv4 -/examples/ipv6/mipv6/, -f omnetpp.ini -c Handover -r 0, 70s, dca6-3751/tplx;a44c-17bf/~tNl;96ff-ed7c/~tND;44ef-1a45/tyf, PASS, wireless EthernetMac -/examples/ipv6/mipv6/, -f omnetpp.ini -c RouteOptimizationTwoCNs -r 0, 60s, 1560-028f/tplx;e6db-28c0/~tNl;805b-8a25/~tND;ed3e-17fa/tyf, PASS, wireless EthernetMac -/examples/ipv6/mipv6roaming/, -f omnetpp.ini -c Roaming -r 0, 70s, 342e-5e65/tplx;28ce-974e/~tNl;dcec-ae59/~tND;afae-2b3c/tyf, PASS, wireless EthernetMac -/examples/ipv6/pmipv6/, -f omnetpp.ini -c General -r 0, 60s, 081b-769c/tplx;1064-9bd4/~tNl;bd46-d85c/~tND;0277-d784/tyf, PASS, wireless EthernetMac +/examples/ipv6/mipv6/, -f omnetpp.ini -c Handover -r 0, 70s, 68ea-9693/tplx;a44c-17bf/~tNl;96ff-ed7c/~tND;44ef-1a45/tyf, PASS, wireless EthernetMac +/examples/ipv6/mipv6/, -f omnetpp.ini -c RouteOptimizationTwoCNs -r 0, 60s, bacf-986a/tplx;e6db-28c0/~tNl;805b-8a25/~tND;ed3e-17fa/tyf, PASS, wireless EthernetMac +/examples/ipv6/mipv6roaming/, -f omnetpp.ini -c Roaming -r 0, 70s, b275-b584/tplx;28ce-974e/~tNl;dcec-ae59/~tND;afae-2b3c/tyf, PASS, wireless EthernetMac +/examples/ipv6/pmipv6/, -f omnetpp.ini -c General -r 0, 60s, e801-4d1a/tplx;1064-9bd4/~tNl;bd46-d85c/~tND;0277-d784/tyf, PASS, wireless EthernetMac /examples/mobility/, -f omnetpp.ini -c AnsimMobility -r 0, 10000s, 72f8-5c0b/tplx;0000-0000/~tNl;0000-0000/~tND;7dd1-18eb/tyf, PASS, /examples/mobility, -f omnetpp.ini -c AttachedMobility, 10s, 566c-6355/tplx;0000-0000/~tNl;0000-0000/~tND;fa92-f68c/tyf, PASS, @@ -573,7 +573,7 @@ /examples/wireless/filtering/, -f omnetpp.ini -c ListeningFilter -r 0, 100s, 946b-6f7f/tplx;e5d7-0ef7/~tNl;fc55-a160/~tND;17b4-4f41/tyf, PASS, Ipv4 /examples/wireless/filtering/, -f omnetpp.ini -c MacAddressFilter -r 0, 100s, d2d8-8182/tplx;d14e-6ff1/~tNl;1e5f-e0e5/~tND;1853-1300/tyf, PASS, Ipv4 -/examples/wireless/handover/, -f omnetpp.ini -c General -r 0, 1500s, 1cb1-6c39/tplx;7bfd-9fb3/~tNl;6003-08fb/~tND;c710-ff2e/tyf, PASS, wireless +/examples/wireless/handover/, -f omnetpp.ini -c General -r 0, 1500s, c4ae-e504/tplx;7bfd-9fb3/~tNl;6003-08fb/~tND;c710-ff2e/tyf, PASS, wireless /examples/wireless/hiddennode/, -f omnetpp.ini -c General -r 0, 5s, 8383-735e/tplx;8e4d-20ee/~tNl;d2b6-9157/~tND;af51-7b12/tyf, PASS, wireless @@ -654,11 +654,11 @@ /examples/wireless/power/, -f omnetpp.ini -c General -r 0, 100s, 6fae-d558/tplx;b8ea-b2fc/~tNl;7a95-cf35/~tND, PASS, wireless Ipv4 -/examples/wireless/qos/, -f omnetpp.ini -c MacNonQos -r 0, 10s, c3c0-dc93/tplx;5eb9-6cea/~tNl;87a5-11a1/~tND;6097-a429/tyf, PASS, wireless Ipv4 -/examples/wireless/qos/, -f omnetpp.ini -c MacQos -r 0, 10s, 3a58-19c0/tplx;6188-6ffd/~tNl;377c-d4fc/~tND;9f3c-4512/tyf, PASS, wireless Ipv4 -/examples/wireless/qos/, -f omnetpp.ini -c MacQosWithoutAggregation -r 0, 10s, 33e5-c380/tplx;78d2-bb9a/~tNl;1524-d88f/~tND;a4c3-19bf/tyf, PASS, wireless Ipv4 -/examples/wireless/qos/, -f omnetpp.ini -c MacQosWithRtsCts -r 0, 10s, 7f3b-72ca/tplx;7c57-849b/~tNl;06e3-7901/~tND;b2d6-1329/tyf, PASS, wireless Ipv4 -/examples/wireless/qos/, -f omnetpp.ini -c MacQosWithBlockAck -r 0, 10s, 9d64-cc8f/tplx;6da9-a463/~tNl;d5b1-8768/~tND;08b5-d005/tyf, PASS, wireless Ipv4 +/examples/wireless/qos/, -f omnetpp.ini -c MacNonQos -r 0, 10s, 0be7-a22e/tplx;5eb9-6cea/~tNl;87a5-11a1/~tND;6097-a429/tyf, PASS, wireless Ipv4 +/examples/wireless/qos/, -f omnetpp.ini -c MacQos -r 0, 10s, a686-bbed/tplx;6188-6ffd/~tNl;377c-d4fc/~tND;9f3c-4512/tyf, PASS, wireless Ipv4 +/examples/wireless/qos/, -f omnetpp.ini -c MacQosWithoutAggregation -r 0, 10s, 8ea1-98b9/tplx;78d2-bb9a/~tNl;1524-d88f/~tND;a4c3-19bf/tyf, PASS, wireless Ipv4 +/examples/wireless/qos/, -f omnetpp.ini -c MacQosWithRtsCts -r 0, 10s, 4686-3691/tplx;7c57-849b/~tNl;06e3-7901/~tND;b2d6-1329/tyf, PASS, wireless Ipv4 +/examples/wireless/qos/, -f omnetpp.ini -c MacQosWithBlockAck -r 0, 10s, ee1e-4439/tplx;6da9-a463/~tNl;d5b1-8768/~tND;08b5-d005/tyf, PASS, wireless Ipv4 /examples/wireless/ratecontrol/, -f omnetpp.ini -c Mac -r 0, 100s, bf30-2f13/tplx;7b2f-653d/~tNl;6f09-d8eb/~tND;19fe-8b0e/tyf, PASS, wireless @@ -678,4 +678,4 @@ /examples/wireless/throughput/, -f omnetpp.ini -c Throughput1 -r 0, 20s, a4d8-abf4/tplx;f424-9aaf/~tNl;8105-890f/~tND;bb2f-ec63/tyf, PASS, wireless /examples/wireless/throughput/, -f omnetpp.ini -c Throughput2 -r 0, 10s, 3b2b-5123/tplx;0009-ca8c/~tNl;e1e4-92c8/~tND;032e-0333/tyf, PASS, wireless -/examples/wireless/wiredandwirelesshostswithap/, -f omnetpp.ini -c General -r 0, 100s, a93e-c671/tplx;13cb-5046/~tNl;6a1b-eaf7/~tND;b4df-273e/tyf, PASS, wireless EthernetMac Ipv4 +/examples/wireless/wiredandwirelesshostswithap/, -f omnetpp.ini -c General -r 0, 100s, 757c-bb2d/tplx;13cb-5046/~tNl;6a1b-eaf7/~tND;b4df-273e/tyf, PASS, wireless EthernetMac Ipv4 diff --git a/tests/fingerprint/showcases.csv b/tests/fingerprint/showcases.csv index 330453edd7b..5c8524371a1 100644 --- a/tests/fingerprint/showcases.csv +++ b/tests/fingerprint/showcases.csv @@ -122,10 +122,10 @@ /showcases/visualizer/osg/environment/, -f omnetpp.ini -c DefaultView -r 0, 500s, 0000-0000/tplx;0000-0000/~tNl;0000-0000/~tND;0000-0000/tyf, PASS, # DefaultView extended /showcases/visualizer/osg/environment/, -f omnetpp.ini -c IsometricView -r 0, 500s, 0000-0000/tplx;0000-0000/~tNl;0000-0000/~tND;0000-0000/tyf, PASS, -/showcases/visualizer/canvas/ieee80211/, -f omnetpp.ini -c OneNetwork -r 0, 5s, 46cc-9c41/tplx;c427-dece/~tNl;eae3-92e1/~tND;9c21-dd33/tyf, PASS, wireless -/showcases/visualizer/canvas/ieee80211/, -f omnetpp.ini -c MultipleNetworks -r 0, 5s, 5094-e358/tplx;3c17-6ee0/~tNl;4dff-fa35/~tND;3be5-9494/tyf, PASS, wireless -/showcases/visualizer/canvas/ieee80211/, -f omnetpp.ini -c VisualizingHandover -r 0, 250s, 7fb8-49dc/tplx;2f60-762d/~tNl;0437-f151/~tND;07bb-3973/tyf, PASS, wireless -/showcases/visualizer/canvas/ieee80211/, -f omnetpp.ini -c SignalLevels -r 0, 100s, 51ec-d359/tplx;cec5-d464/~tNl;a0c6-b121/~tND;c099-e5c5/tyf, PASS, Ipv4 +/showcases/visualizer/canvas/ieee80211/, -f omnetpp.ini -c OneNetwork -r 0, 5s, a970-4510/tplx;c427-dece/~tNl;eae3-92e1/~tND;9c21-dd33/tyf, PASS, wireless +/showcases/visualizer/canvas/ieee80211/, -f omnetpp.ini -c MultipleNetworks -r 0, 5s, d736-960b/tplx;3c17-6ee0/~tNl;4dff-fa35/~tND;3be5-9494/tyf, PASS, wireless +/showcases/visualizer/canvas/ieee80211/, -f omnetpp.ini -c VisualizingHandover -r 0, 250s, f802-2d39/tplx;2f60-762d/~tNl;0437-f151/~tND;07bb-3973/tyf, PASS, wireless +/showcases/visualizer/canvas/ieee80211/, -f omnetpp.ini -c SignalLevels -r 0, 100s, 1430-4352/tplx;cec5-d464/~tNl;a0c6-b121/~tND;c099-e5c5/tyf, PASS, Ipv4 /showcases/visualizer/canvas/submoduleinfo/, -f omnetpp.ini -c PacketCounts -r 0, 5s, 271c-6821/tplx;3c0c-db82/~tNl;8315-9723/~tND;b145-6576/tyf, PASS, wireless Ipv4 # VisualizingSubmoduleInformation extended /showcases/visualizer/canvas/submoduleinfo/, -f omnetpp.ini -c MACStates -r 0, 5s, 271c-6821/tplx;3c0c-db82/~tNl;8315-9723/~tND;4677-fc97/tyf, PASS, wireless Ipv4 @@ -133,7 +133,7 @@ /showcases/visualizer/canvas/instrumentfigures/, -f omnetpp.ini -c General -r 0, 3s, 6622-adb9/tplx;28ca-9f8c/~tNl;85f0-a9c3/~tND;4266-0d42/tyf, PASS, wireless Ipv4 /showcases/visualizer/canvas/interfacetable/, -f omnetpp.ini -c EnablingVisualization -r 0, 5s, 0000-0000/tplx;0000-0000/~tNl;0000-0000/~tND;0000-0000/tyf, PASS, -/showcases/visualizer/canvas/interfacetable/, -f omnetpp.ini -c AdvancedFeatures -r 0, 5s, c574-efc0/tplx;518c-d31e/~tNl;03fe-e203/~tND;b2d8-b329/tyf, PASS, wireless EthernetMac Ipv4 +/showcases/visualizer/canvas/interfacetable/, -f omnetpp.ini -c AdvancedFeatures -r 0, 5s, 61ec-13d6/tplx;518c-d31e/~tNl;03fe-e203/~tND;b2d8-b329/tyf, PASS, wireless EthernetMac Ipv4 /showcases/visualizer/canvas/mobility/, -f omnetpp.ini -c VisualizingFeatures -r 0, 500s, 54a1-0f8d/tplx;0000-0000/~tNl;0000-0000/~tND;df51-b287/tyf, PASS, wireless @@ -146,21 +146,21 @@ /showcases/visualizer/canvas/networkpathactivity/, -f omnetpp.ini -c EnablingVisualization -r 0, 500s, 456d-1982/tplx;bd58-e496/~tNl;1b76-9a17/~tND;4b2b-9088/tyf, PASS, EthernetMac Ipv4 /showcases/visualizer/canvas/networkpathactivity/, -f omnetpp.ini -c StaticNetworkPaths -r 0, 500s, 5995-953f/tplx;cfc6-5083/~tNl;aa2b-919c/~tND;a8ff-b27d/tyf, PASS, EthernetMac Ipv4 /showcases/visualizer/canvas/networkpathactivity/, -f omnetpp.ini -c Mobile -r 0, 500s, cbb7-c036/tplx;fdcd-ce11/~tNl;5463-67a1/~tND, PASS, wireless Ipv4 -/showcases/visualizer/canvas/networkpathactivity/, -f omnetpp.ini -c ChangingPaths -r 0, 250s, a7da-151a/tplx;47ff-ba81/~tNl;e588-5d44/~tND;eade-62dc/tyf, PASS, EthernetMac Ipv4 +/showcases/visualizer/canvas/networkpathactivity/, -f omnetpp.ini -c ChangingPaths -r 0, 250s, 5999-2b17/tplx;47ff-ba81/~tNl;e588-5d44/~tND;eade-62dc/tyf, PASS, EthernetMac Ipv4 # /showcases/visualizer/canvas/obstacleloss/, -f omnetpp.ini -c EnablingVisualization -r 0, 250s, 2410-572d/tplx;0000-0000/~tNl;0000-0000/~tND, PASS, wireless # /showcases/visualizer/canvas/obstacleloss/, -f omnetpp.ini -c MultipleObstacles -r 0, 500s, 89ca-0f0a/tplx;0000-0000/~tNl;0000-0000/~tND, PASS, wireless # /showcases/visualizer/osg/osgdemo/, -f omnetpp.ini -c General -r 0, 100s, 0000-0000/tplx;0000-0000/~tNl;0000-0000/~tND, ERROR, -/showcases/visualizer/canvas/packetdrop/, -f omnetpp.ini -c QueueOverflow -r 0, 2002ms, 9a7d-08d1/tplx;0fde-9533/~tNl;fcc2-4b02/~tND;dee8-a7c2/tyf, PASS, wireless EthernetMac Ipv4 +/showcases/visualizer/canvas/packetdrop/, -f omnetpp.ini -c QueueOverflow -r 0, 2002ms, 6fa8-a390/tplx;0fde-9533/~tNl;fcc2-4b02/~tND;dee8-a7c2/tyf, PASS, wireless EthernetMac Ipv4 /showcases/visualizer/canvas/packetdrop/, -f omnetpp.ini -c ArpResolutionFailed -r 0, 500s, 9069-cca6/tplx;0000-0000/~tNl;0000-0000/~tND;db3b-e3e4/tyf, PASS, wireless Ipv4 /showcases/visualizer/canvas/packetdrop/, -f omnetpp.ini -c MACRetryLimitReached -r 0, 500s, 1f7a-e5f3/tplx;14cf-73d2/~tNl;c7ba-ef52/~tND;24ba-9fa9/tyf, PASS, wireless Ipv4 /showcases/visualizer/canvas/packetdrop/, -f omnetpp.ini -c InterfaceNotConnected -r 0, 500s, 280f-b030/tplx;0000-0000/~tNl;0000-0000/~tND;5f21-3687/tyf, PASS, EthernetMac Ipv4 /showcases/visualizer/canvas/packetdrop/, -f omnetpp.ini -c NoRouteToDestination -r 0, 500s, 4c38-3589/tplx;0000-0000/~tNl;0000-0000/~tND;2ad2-161b/tyf, PASS, Ipv4 /showcases/visualizer/canvas/physicallinkactivity/, -f omnetpp.ini -c EnablingVisualization -r 0, 500s, a1da-0032/tplx;bde3-9c6e/~tNl;de93-cd82/~tND;25e0-5171/tyf, PASS, wireless Ipv4 -/showcases/visualizer/canvas/physicallinkactivity/, -f omnetpp.ini -c Filtering -r 0, 250s, 9d23-f793/tplx;3a21-efc6/~tNl;c40d-b38c/~tND;5e9e-c6c7/tyf, PASS, wireless Ipv4 +/showcases/visualizer/canvas/physicallinkactivity/, -f omnetpp.ini -c Filtering -r 0, 250s, 671e-5cad/tplx;3a21-efc6/~tNl;c40d-b38c/~tND;5e9e-c6c7/tyf, PASS, wireless Ipv4 /showcases/visualizer/canvas/physicallinkactivity/, -f omnetpp.ini -c Mobile -r 0, 500s, a437-919f/tplx;03cf-d1b8/~tNl;f5ff-0d7f/~tND;7bf9-d50f/tyf, PASS, wireless Ipv4 /showcases/visualizer/canvas/radiomediumactivity/, -f omnetpp.ini -c DisplayingSignalsTransmissionsReceptions -r 0, 500s, 771b-bffb/tplx;ca1b-c59c/~tNl;4ebb-fab0/~tND, PASS, wireless # unfinished @@ -182,7 +182,7 @@ /showcases/visualizer/canvas/styling/, -f omnetpp.ini -c Line -r 0, 25s, cb1d-a154/tplx;a565-1a98/~tNl;ee1b-5f7a/~tND;7b44-2fb8/tyf, PASS, wireless Ipv4 /showcases/visualizer/canvas/styling/, -f omnetpp.ini -c Font -r 0, 25s, cb1d-a154/tplx;a565-1a98/~tNl;ee1b-5f7a/~tND;5e90-6a92/tyf, PASS, wireless Ipv4 /showcases/visualizer/canvas/styling/, -f omnetpp.ini -c Icon -r 0, 25s, 9218-0d5b/tplx;1a94-46a8/~tNl;530b-257e/~tND;62e8-28b7/tyf, PASS, wireless Ipv4 -/showcases/visualizer/canvas/styling/, -f omnetpp.ini -c Annotation -r 0, 25s, fbbe-030c/tplx;f5c4-c7b9/~tNl;828c-4d28/~tND;342b-0033/tyf, PASS, wireless Ipv4 +/showcases/visualizer/canvas/styling/, -f omnetpp.ini -c Annotation -r 0, 25s, 7994-e8cc/tplx;f5c4-c7b9/~tNl;828c-4d28/~tND;342b-0033/tyf, PASS, wireless Ipv4 /showcases/visualizer/canvas/transportconnection/, -f omnetpp.ini -c EnablingVisualization -r 0, 2s, fc86-91c1/tplx;817d-6638/~tNl;b2d4-0aff/~tND;d5f4-f615/tyf, PASS, EthernetMac Ipv4 /showcases/visualizer/canvas/transportconnection/, -f omnetpp.ini -c MultipleConnections -r 0, 2s, 511a-236b/tplx;0bd4-4f1e/~tNl;050f-8d69/~tND;1584-363d/tyf, PASS, EthernetMac Ipv4 @@ -269,7 +269,7 @@ /showcases/wireless/fragmentation/, -f omnetpp.ini -c HCFfrag -r 0, 1s, f7a5-cf0a/tplx;a24a-a070/~tNl;5dae-0b8e/~tND;335d-6687/tyf, PASS, wireless Ipv4 /showcases/wireless/fragmentation/, -f omnetpp.ini -c HCFfragblockack -r 0, 1s, 5abb-93a6/tplx;2bdd-d1fa/~tNl;31ab-28b7/~tND;6f6e-b101/tyf, PASS, wireless Ipv4 -/showcases/wireless/handover/, -f omnetpp.ini -c General -r 0, 250s, 3623-0ff6/tplx;bcc9-11d2/~tNl;99fd-923d/~tND;02e9-9ad3/tyf, PASS, wireless +/showcases/wireless/handover/, -f omnetpp.ini -c General -r 0, 250s, 6150-7a8b/tplx;bcc9-11d2/~tNl;99fd-923d/~tND;02e9-9ad3/tyf, PASS, wireless /showcases/wireless/hiddennode/, -f omnetpp.ini -c WallOnRtsOff -r 0, 5s, 7912-bed4/tplx;c1e8-3622/~tNl;9b60-a38b/~tND;d824-8757/tyf, PASS, wireless Ipv4 /showcases/wireless/hiddennode/, -f omnetpp.ini -c WallOnRtsOn -r 0, 5s, 321b-f7f2/tplx;75e5-07b7/~tNl;4c45-33b3/~tND;35cb-1d85/tyf, PASS, wireless Ipv4 @@ -307,14 +307,14 @@ # /showcases/wireless/levelofdetail/, -f omnetpp.ini -c General -r '$detail=="bit" && $modulation=="QAM-64" && $fecType=="" && $distance==225', 100s, 7794-9306/tplx;0000-0000/~tNl;0000-0000/~tND;0000-0000/tyf, PASS, wireless # /showcases/wireless/levelofdetail/, -f omnetpp.ini -c General -r '$detail=="symbol" && $modulation=="QAM-64" && $fecType=="" && $distance==125', 100s, 54ce-ce35/tplx;0000-0000/~tNl;0000-0000/~tND;0000-0000/tyf, PASS, wireless -/showcases/wireless/multiradio/, -f omnetpp.ini -c General -r 0, 100s, 346f-d394/tplx;9a9e-aa20/~tNl;275e-da7d/~tND;92c1-ccc2/tyf, PASS, wireless Ipv4 +/showcases/wireless/multiradio/, -f omnetpp.ini -c General -r 0, 100s, 298a-435f/tplx;9a9e-aa20/~tNl;275e-da7d/~tND;92c1-ccc2/tyf, PASS, wireless Ipv4 /showcases/wireless/pathloss/, -f omnetpp.ini -c General -r 0, 100s, 171a-e6eb/tplx;3466-822d/~tNl;5909-6e87/~tND;929d-03d5/tyf, PASS, wireless Ipv4 /showcases/wireless/power/, -f omnetpp.ini -c General -r 0, 100s, 498f-b665/tplx;6f50-5caf/~tNl;1403-6fb2/~tND, PASS, wireless Ipv4 -/showcases/wireless/qos/, -f omnetpp.ini -c NonQos -r 0, 10s, 26be-ff05/tplx;9c39-00a3/~tNl;03a9-2f02/~tND;093e-1ca4/tyf, PASS, wireless Ipv4 -/showcases/wireless/qos/, -f omnetpp.ini -c Qos -r 0, 10s, 8d7c-5091/tplx;84a6-b893/~tNl;cb18-5b4d/~tND;bda9-15d1/tyf, PASS, wireless Ipv4 +/showcases/wireless/qos/, -f omnetpp.ini -c NonQos -r 0, 10s, 5734-43a3/tplx;9c39-00a3/~tNl;03a9-2f02/~tND;093e-1ca4/tyf, PASS, wireless Ipv4 +/showcases/wireless/qos/, -f omnetpp.ini -c Qos -r 0, 10s, b214-9d7e/tplx;84a6-b893/~tNl;cb18-5b4d/~tND;bda9-15d1/tyf, PASS, wireless Ipv4 /showcases/wireless/ratecontrol/, -f omnetpp.ini -c NoRateControl -r 0, 14s, 7ee9-503a/tplx;0816-e58f/~tNl;ec30-e32d/~tND;dad3-7f89/tyf, PASS, wireless Ipv4 /showcases/wireless/ratecontrol/, -f omnetpp.ini -c AarfRateControl -r 0, 12s, a7bc-05bb/tplx;9de0-4dd3/~tNl;de90-6575/~tND;7539-d32d/tyf, PASS, wireless Ipv4 diff --git a/tests/fingerprint/tutorials.csv b/tests/fingerprint/tutorials.csv index 609c4b97949..f03cb9870a0 100644 --- a/tests/fingerprint/tutorials.csv +++ b/tests/fingerprint/tutorials.csv @@ -10,15 +10,15 @@ /tutorials/configurator/, -f omnetpp.ini -c Step7A -r 0, 500s, 0000-0000/tplx;0000-0000/~tNl;0000-0000/~tND;0000-0000/tyf, PASS, /tutorials/configurator/, -f omnetpp.ini -c Step7B -r 0, 500s, 0000-0000/tplx;0000-0000/~tNl;0000-0000/~tND;0000-0000/tyf, PASS, /tutorials/configurator/, -f omnetpp.ini -c Step7C -r 0, 500s, 0000-0000/tplx;0000-0000/~tNl;0000-0000/~tND;0000-0000/tyf, PASS, -/tutorials/configurator/, -f omnetpp.ini -c Step8A -r 0, 100s, 0b7e-7adc/tplx;12a6-f004/~tNl;8b42-bf7b/~tND;d3f3-ed4c/tyf, PASS, wireless EthernetMac Ipv4 # Step8A extended -/tutorials/configurator/, -f omnetpp.ini -c Step8B -r 0, 100s, b1ac-8912/tplx;12a6-f004/~tNl;96e2-030b/~tND;af16-1150/tyf, PASS, wireless EthernetMac Ipv4 -/tutorials/configurator/, -f omnetpp.ini -c Step9 -r 0, 100s, 70cf-424a/tplx;d39c-9f1f/~tNl;c4ee-f7ca/~tND;c38c-98ef/tyf, PASS, wireless EthernetMac Ipv4 +/tutorials/configurator/, -f omnetpp.ini -c Step8A -r 0, 100s, 4767-2b34/tplx;12a6-f004/~tNl;8b42-bf7b/~tND;d3f3-ed4c/tyf, PASS, wireless EthernetMac Ipv4 # Step8A extended +/tutorials/configurator/, -f omnetpp.ini -c Step8B -r 0, 100s, fdb5-d8fa/tplx;12a6-f004/~tNl;96e2-030b/~tND;af16-1150/tyf, PASS, wireless EthernetMac Ipv4 +/tutorials/configurator/, -f omnetpp.ini -c Step9 -r 0, 100s, 576a-358a/tplx;d39c-9f1f/~tNl;c4ee-f7ca/~tND;c38c-98ef/tyf, PASS, wireless EthernetMac Ipv4 /tutorials/configurator/, -f omnetpp.ini -c Step10A -r 0, 100s, 4b6f-7cd9/tplx;0000-0000/~tNl;0000-0000/~tND;095d-75bd/tyf, PASS, wireless # Step10A extended /tutorials/configurator/, -f omnetpp.ini -c Step10B -r 0, 100s, 4b6f-7cd9/tplx;0000-0000/~tNl;0000-0000/~tND;4d60-fcf9/tyf, PASS, wireless # Step10B extended /tutorials/configurator/, -f omnetpp.ini -c Step10C -r 0, 100s, 71f5-b341/tplx;4a61-20ba/~tNl;707b-bb40/~tND;f078-56fe/tyf, PASS, wireless Ipv4 /tutorials/configurator/, -f omnetpp.ini -c Step11A -r 0, 500s, 0000-0000/tplx;0000-0000/~tNl;0000-0000/~tND;0000-0000/tyf, PASS, /tutorials/configurator/, -f omnetpp.ini -c Step11B -r 0, 500s, 49cf-d241/tplx;725c-f075/~tNl;15a3-3f79/~tND;7082-ff49/tyf, PASS, EthernetMac Ipv4 -/tutorials/configurator/, -f omnetpp.ini -c Step12 -r 0, 100s, e75f-2a09/tplx;d302-92c4/~tNl;b67b-3f1f/~tND;4b03-e5a1/tyf, PASS, wireless EthernetMac Ipv4 +/tutorials/configurator/, -f omnetpp.ini -c Step12 -r 0, 100s, 3792-d7b2/tplx;d302-92c4/~tNl;b67b-3f1f/~tND;4b03-e5a1/tyf, PASS, wireless EthernetMac Ipv4 /tutorials/rip/, -f omnetpp.ini -c Step1 -r 0, 100s, 2c94-a8bb/tplx;b4e0-1e61/~tNl;4bd3-4530/~tND;1e4a-2625/tyf, PASS, /tutorials/rip/, -f omnetpp.ini -c Step2 -r 0, 100s, 6019-f318/tplx;9372-788f/~tNl;8293-fb18/~tND;a345-d423/tyf, PASS, # Step2 extended diff --git a/tests/module/Ieee80211PreparedCancellation_1.test b/tests/module/Ieee80211PreparedCancellation_1.test new file mode 100644 index 00000000000..decdefce1a9 --- /dev/null +++ b/tests/module/Ieee80211PreparedCancellation_1.test @@ -0,0 +1,173 @@ +%description: +The hybrid coordination function (HCF) accepts an acknowledgment (ACK) frame +with a short interframe space (SIFS) delay. +The test submits a radio command during that delay. +The test checks that the command remains pending, the ACK completes, +and no command remains pending afterward. +The test exercises HCF; it does not directly exercise the distributed coordination function (DCF). + +%file: Cancellation.cc +#include "inet/common/packet/chunk/ByteCountChunk.h" +#include "inet/linklayer/ieee80211/mac/Ieee80211Mac.h" +#include "inet/linklayer/ieee80211/mac/coordinationfunction/Hcf.h" +#include "inet/physicallayer/wireless/ieee80211/packetlevel/Ieee80211ControlInfo_m.h" + +namespace inet::ieee80211 { +class CancellationMac : public Ieee80211Mac { + public: + void configureDuringResponse() { + Enter_Method("configureDuringResponse"); + auto command = new cMessage("response-config", physicallayer::RADIO_C_CONFIGURE); + auto control = new physicallayer::Ieee80211ConfigureRadioCommand(); + control->setBitrate(bps(24000000)); + command->setControlInfo(control); + handleUpperCommand(command); + ASSERT(pendingRadioConfigMsg == command); + } + bool hasPendingConfiguration() const { return pendingRadioConfigMsg != nullptr; } +}; +Define_Module(CancellationMac); + +class CancellationHcf : public Hcf { + public: + int acknowledgments = 0; + int responses = 0; + bool triggered = false; + int scenario() const { return par("scenario"); } + bool sender() const { return getFullPath().find("sender") != std::string::npos; } + bool hasPendingTransmission() const { return tx->hasTransmission(); } + void inject() { + Enter_Method("inject"); + auto header = makeShared(); + header->setType(ST_DATA_WITH_QOS); + header->addChunkLength(QOSCONTROL_PART_LENGTH); + header->setTid(5); + header->setReceiverAddress(MacAddress("02:00:00:00:00:02")); + header->setTransmitterAddress(mac->getAddress()); + header->setAddress3(mac->getAddress()); + auto packet = new Packet("request-data", header); + packet->insertAtBack(makeShared(B(200))); + packet->insertAtBack(makeShared()); + processUpperFrame(packet, header); + } + protected: + void sendUp(const std::vector& frames) override { + for (auto frame : frames) { take(frame); delete frame; } + } + void transmitControlResponseFrame(Packet *packet, const Ptr& header, + Packet *received, const Ptr& receivedHeader) override { + Hcf::transmitControlResponseFrame(packet, header, received, receivedHeader); + if (scenario() == 5) { + ASSERT(tx->hasTransmission()); + check_and_cast(mac)->configureDuringResponse(); + } + } + void recipientProcessTransmittedControlResponseFrame(Packet *packet, const Ptr& header) override { + responses++; + Hcf::recipientProcessTransmittedControlResponseFrame(packet, header); + } + void originatorProcessReceivedFrame(Packet *packet, Packet *request) override { + if (packet->peekAtFront()->getType() == ST_ACK) acknowledgments++; + Hcf::originatorProcessReceivedFrame(packet, request); + } + +}; +Define_Module(CancellationHcf); + +class CancellationTest : public cSimpleModule { + public: + CancellationTest() : cSimpleModule(65536) {} + protected: + void activity() override { + wait(SimTime(1, SIMTIME_MS)); + auto sender = check_and_cast(getModuleByPath("^.sender.wlan[0].mac.hcf")); + auto receiver = check_and_cast(getModuleByPath("^.receiver.wlan[0].mac.hcf")); + sender->inject(); + wait(SimTime(4, SIMTIME_MS)); + ASSERT(sender->acknowledgments == 1 && receiver->responses == 1); + ASSERT(!sender->hasPendingTransmission() && !receiver->hasPendingTransmission()); + ASSERT(!check_and_cast(getModuleByPath("^.receiver.wlan[0].mac"))->hasPendingConfiguration()); + std::cout << "Radio response and Tx request checks passed.\n"; + } +}; +Define_Module(CancellationTest); +} // namespace inet::ieee80211 + +%file: test.ned +import inet.common.SimpleModule; +import inet.linklayer.ieee80211.mac.Ieee80211Mac; +import inet.linklayer.ieee80211.mac.coordinationfunction.Hcf; +import inet.node.inet.WirelessHost; +import inet.physicallayer.wireless.ieee80211.packetlevel.Ieee80211ScalarRadioMedium; +module CancellationMac extends Ieee80211Mac +{ + parameters: + @class(::inet::ieee80211::CancellationMac); +} +module CancellationHcf extends Hcf +{ + parameters: + int scenario; + @class(::inet::ieee80211::CancellationHcf); +} +simple CancellationTest extends SimpleModule +{ + parameters: + @class(::inet::ieee80211::CancellationTest); +} +network CancellationNetwork +{ + submodules: + radioMedium: Ieee80211ScalarRadioMedium; + sender: WirelessHost; + receiver: WirelessHost; + test: CancellationTest; +} + +%inifile: omnetpp.ini +[General] +network = CancellationNetwork +ned-path = .;../../../../src;../../lib +sim-time-limit = 12ms +seed-set = 0 +cmdenv-express-mode = true +record-vector-results = false +record-scalar-results = false +*.radioMedium.propagation.typename = "ConstantTimePropagation" +*.radioMedium.propagation.propagationTime = 0s +**.wlan[*].agent.typename = "" +**.wlan[*].mgmt.typename = "Ieee80211MgmtAdhoc" +**.wlan[*].opMode = "a" +**.wlan[*].bitrate = 24Mbps +**.wlan[*].mac.typename = "CancellationMac" +**.wlan[*].mac.qosStation = true +**.wlan[*].mac.hcf.typename = "CancellationHcf" +**.wlan[*].mac.hcf.scenario = ${scenario=5} +**.wlan[*].mac.hcf.isBlockAckSupported = false +**.wlan[*].mac.hcf.originatorMacDataService.msduAggregationPolicy.typename = "" +**.wlan[*].mac.hcf.originatorMacDataService.mpduAggregationPolicy.typename = "" +**.wlan[*].mac.hcf.rateSelection.dataFrameBitrate = 24Mbps +**.wlan[*].mac.hcf.rateSelection.controlFrameBitrate = 24Mbps +**.wlan[*].mac.hcf.rateSelection.responseAckFrameBitrate = 24Mbps +**.wlan[*].mac.hcf.rateSelection.responseCtsFrameBitrate = 24Mbps +**.wlan[*].mac.hcf.rtsPolicy.rtsThreshold = ${scenario} == 9 ? 0B : 4096B +**.wlan[*].mac.hcf.edca.edcaf[2].txopProcedure.txopLimit = 2ms +*.sender.wlan[0].address = "02:00:00:00:00:01" +*.receiver.wlan[0].address = "02:00:00:00:00:02" +**.mobility.initFromDisplayString = false +**.mobility.constraintAreaMinX = 0m +**.mobility.constraintAreaMinY = 0m +**.mobility.constraintAreaMinZ = 0m +**.mobility.constraintAreaMaxX = 100m +**.mobility.constraintAreaMaxY = 100m +**.mobility.constraintAreaMaxZ = 0m +*.sender.mobility.initialX = 0m +*.sender.mobility.initialY = 0m +*.receiver.mobility.initialX = 1m +*.receiver.mobility.initialY = 0m +**.wlan[*].radio.transmitter.power = 100mW +**.wlan[*].radio.receiver.sensitivity = -85dBm +**.wlan[*].radio.receiver.snirThreshold = 4dB + +%contains: stdout +Radio response and Tx request checks passed.