8. Avoiding and Eliminating Collisions

In this step we combine the 2 possibilities of sending messages in a model.

A station can send messages using the CSMA-CA-algorithm or a guaranteed time slot. The coordinator decides if a station may use a guaranteed time slot or it must use the CSMA-CA-algorithm.

We put the two models together to realize this. The following MoDeST-code shows an overview for the station model and the coordinator model:


01 process coordinator(int BI) {
02 clock timer;
03 do{
04   ::when(timer==BI) send_beacon; receive message;
05   }
06 }


01 process station(int id) {
02 do{ 
03   ::receive beacon;
04     alt{        //decide the method of sending a message 
05                 //(CSMA-CA or guaranteed time slot) 
06        :: when (guaranteed_time_slot_assigned) send_using_GTS
07        :: when (!guaranteed_time_slot_assigned) send_using_csma_ca
08        }
09   }
10 }


back to start

back to 7. Eliminating Collisions

forward to 8a. Data Structure