Skip to main content
. 2016 May 9;16(5):656. doi: 10.3390/s16050656
Algorithm 1 The CoR-MAC algorithm for the coordinator.
  •  1:

    ui← The node that generates urgent data;

  •  2:

    ci← The node that generates time-critical data;

  •  3:

    M← The maximum allowable number of time slots in CFP;

  •  4:

    Si← The slot that is located at the i’-th position;

  •  5:

    ni← The node whose ID is i;

  •  6:

    loop

  •  7:

    if Current time = start of beacon phase then

  •  8:

      Send beacon with CFP allocation map

  •  9:

    end if

  • 10:

    if ui or ci joins the network then

  • 11:

      if # of time slots in the CFP < M then

  • 12:

       Allocate Si to the ui or ci

  • 13:

       Update CFP allocation map

  • 14:

      else

  • 15:

       Reject the join request

  • 16:

      end if

  • 17:

    end if

  • 18:

    if DATA is received from ni then

  • 19:

      Send ACK to ni after SIFS

  • 20:

    else if RTS is received from ni then

  • 21:

      Send CTS to ni after SIFS

  • 22:

    end if

  • 23:

    end loop