![]() |
![]() |
The system is physically separated in two parts:
A part that is next to the door:
keypad
LCD
electric lock
That part can be duplicated on several doors in the building so that the same card and associated code grants access to all the doors.
A part that is in a secure room
The hardware has persistant memory such as a hard disk and is backed up.
The userNumber variable is the current number of registered users.
When adding a user, the card identifier and the code are sent as parameters of the addUser message.
It always replies accepted to the sender.
If the user card and code are not found, the refused message is sent back to the local process.
When checking card and code, administrator is first being verified; if not an administrator the system goes through the list of registered card and code.
Not much to do when the system is started since the local process is not supposed to know anything about the registered cards.
When card is entered, the card id is stored and the user is asked to type his code in.
The user has a limited time to type his complete code. Once the code is complete, the information is sent to central for verification.
The response from the central tells wether the user is an administrator or and intruder or a registered use.
The new user card is entered.
The new user code is entered. When complete the information is sent to central to be stored.
Since all scenario end by the system displaying Enter card, all messages are temporary. The messages are displayed, the time tMessage is started, and the finite state machine goes to the wait4tMessage state, just waiting for the timer to go off.