A Client-Server application to
simulate Windows NT security system, implemented with VC++/MFC and Windows API
The Security System
consists of three main components: Host Application, Server Simulator (NT4.0
service) and Client Simulation application. The Sever Simulator monitors input
from Client Simulator. The Client Simulator is console application which takes
place of real sensors by mimicking their behavior. When sensor changes state,
Client Simulator sends id and it's new state to the Server Simulator which it
turn relays the information to the Host Application. The Host Application is
window based application which graphically presents the layout the secured area
with security points.
Client Simulator. It is a console application
(command prompt) and supports the following commands:
If invalid command is
supplied the application will show a help message with supported commands. The
Client Simulator is divided into two sub-components:
Server Simulator. It behaves as interface between
the client simulator and host application. Besides, it also store the configured
security objects and verifies requests. It consists of three parts:
Once the server is loaded
the "Command Interpreter" and "Inter-process Channel" run
in a separate thread. The thread is actually suspended until the Client
Simulator sends a message which wakes this thread and the data get processed.
Host application. This application is created with
MFC framework basedon the Document/View paradigm, with visual presentation of
event object states (doors, windows, lights, smoke detectors in state of
ON/OFF). Code directly generated by the MFC wizard had to be modified in the
following classes:
The heart and soul of this
application is "threadWaitEvent()" function which runs in its own
thread. It waits in suspended state until Server signals through an event
object that there is data available. Once the eventis signaled it will dispatch
a message to the main window which in turn opens a named pipe and read data
from the Server.
View Code
Client Application: Block Box (modified to run independently)