Research Article
Automated Real-Time Intelligent Traffic Control System for Smart Cities Using Wireless Sensor Networks
Pseudocode 2
The management of parking spaces in each road crossing.
1: Foreach (data packet received) | 2: Read Crossroad ID, Lane ID, Lane direction, Node ID | 3: Locate the parking space | 4: If (State==1) then | 5: Update the information received in the database | 6: Increment the number of occupied places | 7: Decrease the number of available places | 8: Start counting the parking time | 9: If (The RFID tag is detected) then | 10: Update occupied place with RFID data received in the database | 11: Else | 12: Send a message to the parking agents with the identifier of the crossroad and the parking space that has just been occupied | 13: The agent introduces the registration number of the car parked in the database | 14: End if | 15: Else | 16 Decrease the number of occupied places | 17: Increment the number of available places | 18: Stop parking time | 19: Calculation the parking fees | 20: End if | 21: Go to 1 |
|