| Algorithm 1 Clock synchronization. |
|
Input:N, , and C Output: Synchronized time for all CHs and member nodes Begin: Set N[] as OFF Inter-cluster Clock Synchronization: ⟵ Rand() Set [] as ON broadcasts For i = 1 To sizeof() If [] = OFF Then ⟵ Set [] as ON Else No clock synchronization is required End If End For Intra-cluster Clock Synchronization: For j = 1 To sizeof() multicasts to its member nodes For i = 1 To sizeof(C) sends to If [] = OFF Then ⟵ Set [] as ON Else No clock synchronization is required End If End For End For End |