# taxi.txt # Huan Chen, 2/16/2017 # taxi project hints Taxi project module decomposition: GUI: GTK library must be used (no SDL), check out the example available at our server: $ cp ~eecs22/GTK_Example.tar.gz ~/. data structures: taxi, map, location, request, etc. Client - Server communication Scheduling/routing Test module ---------------------------------------- client: - connect to the server (with port #) - drawMap - sendRequest - getResponse - refreshDisplay - etc. server: - load configuration file if any - draw map - recvRequest (receive) - schedule taxis - routing taxis - sendResponse - refreshDisplay - etc. CVS must be used to control version. // some APIs drawMap(int numOfRows, int numOfCols, char *rowNames[], char *colNames[], Objects *objects); // Obstacle objects on the map, assume they are all rectangles typedef struct Object_t { Positon topLeft; int width; int height; char name[80]; // "airport" } Object; # configuration file example numOfTaxis=12 pricePerMile=2 maxSpeed=45 # end of configuration file // load pricing information from file to the server application loadConfiguration(char *filename) { // open file... while(!endOfFile) { if (strcmp(line) == "maxSpeed") { //set max speed to 45 mph } // check other configurations ... } // close file }