Fixed MS/TP state WAIT_FOR_REPLY to allow reception of any frames that are not known to be not reply frames. (#1103)

This fixes segmented Complex-ACK frames which were dropped. This enables all proprietary frames and any new frames to be recieved to the higher layers.
This commit is contained in:
Steve Karg
2025-09-20 10:52:59 -05:00
committed by GitHub
parent af29c75075
commit f877ca0ebb
6 changed files with 89 additions and 65 deletions
+15 -10
View File
@@ -817,21 +817,26 @@ static bool MSTP_Master_Node_FSM(void)
Master_State =
MSTP_MASTER_STATE_DONE_WITH_TOKEN;
break;
case FRAME_TYPE_BACNET_DATA_NOT_EXPECTING_REPLY:
case FRAME_TYPE_TOKEN:
case FRAME_TYPE_POLL_FOR_MASTER:
case FRAME_TYPE_REPLY_TO_POLL_FOR_MASTER:
case FRAME_TYPE_TEST_REQUEST:
/* ReceivedUnexpectedFrame */
/* FrameType has a value other than a FrameType
known to this node that indicates a reply */
Master_State =
MSTP_MASTER_STATE_IDLE;
break;
default:
/* ReceivedReply */
/* or a proprietary type that indicates
a reply */
/* indicate successful reception to
the higher layers */
/* FrameType known to this node that
indicates a reply */
/* indicate successful reception
to the higher layers */
MSTP_Flag.ReceivePacketPending = true;
Master_State =
MSTP_MASTER_STATE_DONE_WITH_TOKEN;
break;
default:
/* if proprietary frame was expected, you might
need to transition to DONE WITH TOKEN */
Master_State = MSTP_MASTER_STATE_IDLE;
break;
}
} else {
/* ReceivedUnexpectedFrame */