Solar Car Power Management

Object Specification

© 1996
Paul Vincent Craven
All Rights Reserved

ObjectDescription of code Location
TPMS_AppThis is the main application object. It handles the creation of the menu bars, tool bars, and status bar. It handles the menu events for when the user selects commands from the menu or toolbar. Timer events for updating the child windows are handled in this object. The creation of the thread that takes in data from the comm port also happens here. main.cpp
TMapInfoThis object handles all of the map data. The program adds, retrieves, etc. map data from this object. mapinfo.cpp
TVpathWindowThis object is a window that displays the path of the saved GPSGPS data, in a distance vs. elevation format. It also provides for live update of the current position through the GPS data. This is an excellent way to see upcoming hills. vpath.cpp
CommThreadThis function is executed in a seperate thread and gets the new data off of the comm port. It will exit with an error code if there is a communications error. thread.cpp
GPSGPSThreadThis function handles the input of data from the Global Positioning System pipe. gps.cpp
SensorThreadThis function handles the input of data from the on-board computer, through the sensor pipe. sensor.cpp
power_calcFunction to calculate total power used. pwr_dlg.cpp
TPower_DlgThis object creates an maintains the dialog that is opened when the user wishes to calculate the total amount of power that will be used during the race. pwr_dlg.cpp
TmyMDIClientThis is the Multiple Document Interface Client which handles the creation/deletion of windows. It keeps a linked list of graph and table objects that are open. client.cpp
TOptionsDlgHandles the dialog box where the user can set various preferences. The results are stored in the registry database. options.cpp
TRegistryHandles adding/removing registry values. The registry is a database that holds program settings under windows. registry.cpp
TDataWindowThis provides a common base class, so that all data windows can be handled in the same way by the client. After so many milliseconds, a timer event will trigger the Update function. d_window.cpp
TTableWindowThis object displays, in table format, the information off the last packet read in. This object is derived from TDataWindow. table.cpp
TGraphWindowThis object handles everything that the child graph window should do. It creates and calls a TGraphFunct object to retrieve the graph data from. This keeps the graph seperated from the data rather nicely. This object is derived from TDataWindow graph.cpp
TAlertWindowThis window displays all of the alerts that are triggered by various data conditions. These are set up under the options menu and stored in the registry. This class is derived from TDataWindow alert.cpp
TScaleDialogHandles a dialog box that edits the attributes of a graph window. It is brought up by a left mouse click on the graph window g_scale.cpp
THandleCarDataThis object handles appending and retrieving car data packets. The rather important car_data_packet structure is defined in the header file for this object. data.cpp
TGraphFunctBy using an object we can abstract the graph from the data that it displays. The graph creates an TGraphFunct object using the type of graph as a parameter. Any time the graph needs the data, it just calls this object. This object can perform calculations on the packet data before passing it to the graph object. function.cpp