Skip to content

Commit a83f188

Browse files
committed
EthernetPlca: Fixed reacting to beacon signal in DS_HOLD.
Receiving a beacon signal does not set the receiving variable, and the state transition should take this variable into account.
1 parent e7e5824 commit a83f188

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/inet/physicallayer/wired/ethernet/EthernetPlca.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -637,7 +637,7 @@ void EthernetPlca::handleWithDataFSM(int event, cMessage *message)
637637
currentTx = nullptr;
638638
);
639639
FSMA_Event_Transition(RX_START,
640-
event == RECEPTION_START,
640+
event == RECEPTION_START && receiving,
641641
DS_COLLIDE,
642642
delete currentTx;
643643
currentTx = nullptr;
@@ -649,6 +649,7 @@ void EthernetPlca::handleWithDataFSM(int event, cMessage *message)
649649
cancelEvent(hold_timer);
650650
);
651651
FSMA_Ignore_Event(event == CARRIER_SENSE_START || event == CARRIER_SENSE_END);
652+
FSMA_Ignore_Event(event == RECEPTION_START && !receiving); // beacon
652653
FSMA_Ignore_Event(event == RECEPTION_END); // beacon
653654
FSMA_Fail_On_Unhandled_Event();
654655
}

0 commit comments

Comments
 (0)