Technical Information

DreamPad was created using Microsoft Visual C++ 1.5 and runs as a 16 bit application. It utilizes the standard Microsoft Foundation Classes (MFC) and the Cwinsock class library for socket-based network communications.

DreamPad is a client-server application with the instructor application acting as the server and the student applications acting as the clients. Each application is a dialog-based application with all dialogs derived from the MFC CDialog base class. The figures below show the major class objects of the 2 applications.

This diagram depicts the basic functions of the Instructor Dialog object. When the mood button is depressed, a Mood Dialog object is created and displayed:

This diagram depicts the basic functions of the Student Dialog object. Appropriate buttons create the basic dialog objects:


Communication's Model

DreamPad uses a simple communications model based upon the UDP datagram service provided by the TCP/IP protocol. The figure below shows the basic model:

The instructor application intializes itself to port 2000, and IPADDR_ANY (which binds to all interfaces for multihomed hosts). The student applications then startup and display a dialog box for entry of the IP address/Port number of the instructor's machine. The instructor application then waits for receipt of a Winsock message telling it a datagram has been received. Upon receipt of the datagram, the instructor application checks the first byte of the message for the message type.

Dream Pad currently has 4 message types:

The student applications simply get user input via the dialog boxes, build a datagram message and send it.


Algorithms

The student applications do no information processing. They simply get dialog information, format a message and send it.

The instructor application has 4 main algorithms:

The Stoplight

The instructor application maintains a count of the total votes for RED, YELLOW and GREEN. The stoplight icon is changed based upon the following rules:

The Mood Meter

The instructor application sets the mood meter value by initializing the mood value to 10 (really excited). As student's send in their mood votes, the application keeps the total mood value and divides it by the total number of votes received. For example if the first student sends in a 1 (really bored), then the application will display a 5 on the meter (10+1)/2.

The Question Handler

The instructor application receives the question, places it into the MFC CStringArray class and then updates the dialog display to show the total questions in the queue. When the question icon is pressed, the MFC AfxMessageBox function is used to display the questions 1 at a time.

The Reset Handler

The instructor application detects pressing the reset button. It saves the information about the current slide to file whose name is qq plus the slide number dot text. For instance, the file for the first slide would be "qq1.txt". Then the question queue is cleared, the stoplight votes are zeroed out and the slide number is incremented. Sample output of the file looks like:

file "qq1.txt"

Question List for Slide 1

What is this?

What about this too?

-Back to Design Document