Added extra sub-state for MS/TP from Addendum 135-2008v. Tested with ports/bdk-atxx4-mstp/ code on the BACnet Development Kit. Clean compile on src/mstp.c, ports/at91sam7s and ports/atmega168, but untested. All other changes were not compiled or tested.

This commit is contained in:
skarg
2010-10-07 15:52:45 +00:00
parent 23eecbc100
commit b54218939e
7 changed files with 99 additions and 23 deletions
+11
View File
@@ -783,6 +783,17 @@ static bool MSTP_Master_Node_FSM(
/* before passing the token. */
Master_State = MSTP_MASTER_STATE_USE_TOKEN;
transition_now = true;
} else if ((MSTP_Flag.SoleMaster == false) &&
(Next_Station == This_Station)) {
/* NextStationUnknown - added in Addendum 135-2008v-1 */
/* then the next station to which the token
should be sent is unknown - so PollForMaster */
Poll_Station = next_this_station;
MSTP_Send_Frame(
FRAME_TYPE_POLL_FOR_MASTER, Poll_Station,
This_Station, NULL, 0);
RetryCount = 0;
Master_State = MSTP_MASTER_STATE_POLL_FOR_MASTER;
}
/* Npoll changed in Errata SSPC-135-2004 */
else if (TokenCount < (Npoll - 1)) {