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:
+15
-10
@@ -795,21 +795,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 */
|
||||
|
||||
Reference in New Issue
Block a user