Fixed MS/TP Slave Node FSM to enable receiving DNER frames (#832)

This commit is contained in:
Steve Karg
2024-10-29 03:53:01 -05:00
committed by GitHub
parent 3329dff337
commit 05c6d06265
3 changed files with 40 additions and 4 deletions
+16 -2
View File
@@ -1254,6 +1254,22 @@ void MSTP_Slave_Node_FSM(struct mstp_port_struct_t *mstp_port)
(void)MSTP_Put_Receive(mstp_port);
}
break;
case FRAME_TYPE_BACNET_DATA_NOT_EXPECTING_REPLY:
case FRAME_TYPE_BACNET_EXTENDED_DATA_NOT_EXPECTING_REPLY:
if ((mstp_port->DestinationAddress == MSTP_BROADCAST_ADDRESS) &&
(npdu_confirmed_service(
mstp_port->InputBuffer, mstp_port->DataLength))) {
/* quietly discard any Confirmed-Request-PDU,
whose destination address is a multicast or
broadcast address, received from the
network layer. */
} else {
/* ForUs */
/* indicate successful reception
to the higher layers */
(void)MSTP_Put_Receive(mstp_port);
}
break;
case FRAME_TYPE_TEST_REQUEST:
MSTP_Create_And_Send_Frame(
mstp_port, FRAME_TYPE_TEST_RESPONSE,
@@ -1263,8 +1279,6 @@ void MSTP_Slave_Node_FSM(struct mstp_port_struct_t *mstp_port)
case FRAME_TYPE_TOKEN:
case FRAME_TYPE_POLL_FOR_MASTER:
case FRAME_TYPE_TEST_RESPONSE:
case FRAME_TYPE_BACNET_DATA_NOT_EXPECTING_REPLY:
case FRAME_TYPE_BACNET_EXTENDED_DATA_NOT_EXPECTING_REPLY:
default:
break;
}