Added reset of SilenceTimer in the SendFrame part of MS/TP that had been missing. Refactored more master state machine states.

This commit is contained in:
skarg
2006-08-28 21:13:37 +00:00
parent 011536b9c5
commit 23a8636b90
5 changed files with 230 additions and 245 deletions
+8 -2
View File
@@ -109,9 +109,15 @@ int dlmstp_send_pdu(BACNET_ADDRESS * dest, /* destination address */
}
void dlmstp_task(void)
{
{
RS485_Check_UART_Data(&MSTP_Port);
MSTP_Receive_Frame_FSM(&MSTP_Port);
/* only do receive state machine while we don't have a frame */
if ((MSTP_Port.ReceivedValidFrame == false) &&
(MSTP_Port.ReceivedInvalidFrame == false))
{
MSTP_Receive_Frame_FSM(&MSTP_Port);
}
/* only do master state machine while rx is idle */
if (MSTP_Port.receive_state == MSTP_RECEIVE_STATE_IDLE)
MSTP_Master_Node_FSM(&MSTP_Port);
}