Forráskód Böngészése

trying to standardize location of relevant files

clementinecomputing 6 éve
szülő
commit
1708323bd1
2 módosított fájl, 155 hozzáadás és 152 törlés
  1. 1 1
      busunit/client_modules.list
  2. 154 151
      busunit/common/common_config.h

+ 1 - 1
busunit/client_modules.list

@@ -3,6 +3,6 @@ billdb
 passdb
 avls
 PIU
-DIU
+DIUv2
 paddlemgr
 client_supervisor

+ 154 - 151
busunit/common/common_config.h

@@ -18,34 +18,34 @@
  *
  */
 
-#ifndef	_COMMON_CFG
+#ifndef  _COMMON_CFG
 #define _COMMON_CFG
 
 //-----------------------------------------------------------------
 //------------------------ OPERATIONAL THRESHOLDS AND MAGIC STRINGS
 //-----------------------------------------------------------------
 
-#define MOTION_THRESHOLD	(0.5f)		//we're moving if our velocity exceeds 0.5 m/sec
+#define MOTION_THRESHOLD  (0.5f)    //we're moving if our velocity exceeds 0.5 m/sec
 
-#define ROLLOVER_TIME_WINDOW	(10 * 60)	//We count a stop as an option to roll over to if we're within +/- ROLLOVER_TIME_WINDOW seconds
+#define ROLLOVER_TIME_WINDOW  (10 * 60)  //We count a stop as an option to roll over to if we're within +/- ROLLOVER_TIME_WINDOW seconds
 
-#define ROLLOVER_DISTANCE	(60.0f)		//We count a stop as an option to roll over to if we are also within ROLLOVER_DISTANCE meters of its GPS location
+#define ROLLOVER_DISTANCE  (60.0f)    //We count a stop as an option to roll over to if we are also within ROLLOVER_DISTANCE meters of its GPS location
 
-#define MIN_SATS_FOR_TIME	(3)		//We are willing to set the system clock if we have at least this many GPS satellites in view
+#define MIN_SATS_FOR_TIME  (3)    //We are willing to set the system clock if we have at least this many GPS satellites in view
 
-#define MAX_GPS_CLOCK_DRIFT	(10)		//  We insist in setting the system clock if it has drifted from GPS time by more than 
+#define MAX_GPS_CLOCK_DRIFT  (10)    //  We insist in setting the system clock if it has drifted from GPS time by more than 
                                                 //MAX_GPS_CLOCK_DRIFT seconds (provided we have at least MIN_SATS_FOR_TIME satellites in view).
 
-#define GPS_DATE_CENTURY	(2000)		//  For fuck's sake, NMEA GPS dates are not Y2K compliant and use only two digits.  We 
+#define GPS_DATE_CENTURY  (2000)    //  For fuck's sake, NMEA GPS dates are not Y2K compliant and use only two digits.  We 
                                                 //must assume a century, we'll assume it is the 21st century.
 
-#define GPS_STALE_THRESHOLD	(5)		//If we go five seconds without a GPS update we consider our GPS signal kaput.
+#define GPS_STALE_THRESHOLD  (5)    //If we go five seconds without a GPS update we consider our GPS signal kaput.
 
-#define CLEAR_GPS_ON_STALE			//Define this if we want to clear all GPS values when we make a valid --> stale transition.
+#define CLEAR_GPS_ON_STALE      //Define this if we want to clear all GPS values when we make a valid --> stale transition.
 
-#define ROLLOVER_FORWARD_ONLY			//Define this if you want to prevent rollover to a lesser or equal paddle stop
+#define ROLLOVER_FORWARD_ONLY      //Define this if you want to prevent rollover to a lesser or equal paddle stop
 
-#define ROLLOVER_TO_FURTHEST_STOP		//  Define this if you want the rollover keep hunting after the first match to
+#define ROLLOVER_TO_FURTHEST_STOP    //  Define this if you want the rollover keep hunting after the first match to
                                                 //find the LAST stop in the paddle which meets the time and location criteria.
                                                 //this is desirable if you have a route change where a bus arrives at a stop as
                                                 //one route and turns into another at that stop and you want this corner case to
@@ -58,7 +58,7 @@
 //    This makes the passdb module reject a card offhand (but not put it in the billing log)
 //if there is no driver logged in.  This will also cause the driver's console to beep a reject beep
 //which will serve as a reminder to log in...
-//#define REJECT_IF_NO_DRIVER			
+//#define REJECT_IF_NO_DRIVER      
                                                     
 //    This define makes the passdb module's rule engine enter a debugging mode for the NEXT call of a rule which
 //asserted scheme_error during its last execution.  This debugging mode generates quite verbose debug information (pages)
@@ -73,81 +73,81 @@
 #define TRACE_RULE_CALL_TO_FILE
 
 
-#define MAGIC_DRIVER_NAME	"AdminMode"	//A magic string that appears as the driver name for the driver login that goes to admin mode
-#define MACIC_DRIVER_MENU	"admin"		//The name of the menu to go to when this driver logs in
+#define MAGIC_DRIVER_NAME  "AdminMode"  //A magic string that appears as the driver name for the driver login that goes to admin mode
+#define MACIC_DRIVER_MENU  "admin"    //The name of the menu to go to when this driver logs in
 
-#define PASSENGER_MESSAGE_DURATION	(5)	//How long to leave passenger messages up on the PIU display line 2
+#define PASSENGER_MESSAGE_DURATION  (5)  //How long to leave passenger messages up on the PIU display line 2
 
-#define PIU_DEVICE_ID	"rider_ui"	//Device ID returned in the "/?:" line from the PIU
-#define DIU_DEVICE_ID	"driver_ui"	//Device ID returned in the "/?:" line from the DIU
+#define PIU_DEVICE_ID  "rider_ui"  //Device ID returned in the "/?:" line from the PIU
+#define DIU_DEVICE_ID  "driver_ui"  //Device ID returned in the "/?:" line from the DIU
 
-#define ACCUM_SECONDS	(1)		//Number of seconds to wait for an EOL from a serial port
+#define ACCUM_SECONDS  (1)    //Number of seconds to wait for an EOL from a serial port
                                         //before declaring the line ended (see notes on open_rs232_device()
                                         //in common_defs.h for more details).
 
-#define DEVICE_TEST_TRIES	(3)	//How many times to try asking what a connected device is...
-#define DEVICE_TEST_TIMEOUT	(5000)	//How long to wait for a device ID line (in milliseconds) after sending a "\r" for each try
+#define DEVICE_TEST_TRIES  (3)  //How many times to try asking what a connected device is...
+#define DEVICE_TEST_TIMEOUT  (5000)  //How long to wait for a device ID line (in milliseconds) after sending a "\r" for each try
 
-#define MAX_EQUIPNUM		(9999)	//What is the largest allowable equipment number...
+#define MAX_EQUIPNUM    (9999)  //What is the largest allowable equipment number...
 
 //#define BEEP_WITH_MAGSTRIPE_READER
 
 #ifdef BEEP_WITH_MAGSTRIPE_READER
-	//These are used for the beeping that the driver user interface performs:
-	#define PIU_ACK_BEEP(fd)	if((fd)>=0){write(fd, "/m:7A\r", 6);}
-	#define PIU_ERROR_BEEP(fd)	if((fd)>=0){write(fd, "/m:5A\r", 6); usleep(500000); write(fd, "/m:5A\r", 6);}
-	#define PIU_CRITICAL_BEEP(fd)	if((fd)>=0){write(fd, "/m:5A\r", 6); usleep(500000); write(fd, "/m:5A\r", 6);write(fd, "/m:5A\r", 6); usleep(500000); write(fd, "/m:5A\r", 6);write(fd, "/m:5A\r", 6); usleep(500000); write(fd, "/m:5A\r", 6);write(fd, "/m:5A\r", 6); usleep(500000); write(fd, "/m:5A\r", 6);write(fd, "/m:5A\r", 6); usleep(500000); write(fd, "/m:5A\r", 6);}
+  //These are used for the beeping that the driver user interface performs:
+  #define PIU_ACK_BEEP(fd)  if((fd)>=0){write(fd, "/m:7A\r", 6);}
+  #define PIU_ERROR_BEEP(fd)  if((fd)>=0){write(fd, "/m:5A\r", 6); usleep(500000); write(fd, "/m:5A\r", 6);}
+  #define PIU_CRITICAL_BEEP(fd)  if((fd)>=0){write(fd, "/m:5A\r", 6); usleep(500000); write(fd, "/m:5A\r", 6);write(fd, "/m:5A\r", 6); usleep(500000); write(fd, "/m:5A\r", 6);write(fd, "/m:5A\r", 6); usleep(500000); write(fd, "/m:5A\r", 6);write(fd, "/m:5A\r", 6); usleep(500000); write(fd, "/m:5A\r", 6);write(fd, "/m:5A\r", 6); usleep(500000); write(fd, "/m:5A\r", 6);}
 
-	//These are used for the beeping that the driver user interface performs:
-	#define DIU_BUTTON_BEEP(fd)	if((fd)>=0){beep((fd), 440, 25);}
-	#define DIU_ACK_BEEP(fd)	if((fd)>=0){}
-	#define DIU_ERROR_BEEP(fd)	if((fd)>=0){}
-	#define DIU_CRITICAL_BEEP(fd)	if((fd)>=0){}
+  //These are used for the beeping that the driver user interface performs:
+  #define DIU_BUTTON_BEEP(fd)  if((fd)>=0){beep((fd), 440, 25);}
+  #define DIU_ACK_BEEP(fd)  if((fd)>=0){}
+  #define DIU_ERROR_BEEP(fd)  if((fd)>=0){}
+  #define DIU_CRITICAL_BEEP(fd)  if((fd)>=0){}
 
 #else
-	//These are used for the beeping that the driver user interface performs:
-	#define DIU_BUTTON_BEEP(fd)	if((fd)>=0){beep((fd), 0xA50, 25);}
-	#define DIU_ACK_BEEP(fd)	if((fd)>=0){beep((fd), 0xA50, 75);}
-	#define DIU_ERROR_BEEP(fd)	if((fd)>=0){beep((fd), 0xDC0, 250); beep((fd), 0, 50); beep((fd), 0xDC0, 250);}
-	#define DIU_CRITICAL_BEEP(fd)	if((fd)>=0){beep((fd), 0xDC0, 1000); beep((fd), 0, 50); beep((fd), 0xDC0, 1000);}
+  //These are used for the beeping that the driver user interface performs:
+  #define DIU_BUTTON_BEEP(fd)  if((fd)>=0){beep((fd), 0xA50, 25);}
+  #define DIU_ACK_BEEP(fd)  if((fd)>=0){beep((fd), 0xA50, 75);}
+  #define DIU_ERROR_BEEP(fd)  if((fd)>=0){beep((fd), 0xDC0, 250); beep((fd), 0, 50); beep((fd), 0xDC0, 250);}
+  #define DIU_CRITICAL_BEEP(fd)  if((fd)>=0){beep((fd), 0xDC0, 1000); beep((fd), 0, 50); beep((fd), 0xDC0, 1000);}
 #endif
 
 //This is the threshold of time between duplicate driver notifies before which the beep will be supressed
 //(so that bulk-accepting 15 interline fares won't result in an enormous string of accept beeps for instance)
-#define DUP_USEC_BEEP_THRESHOLD		(500000)	// 5/10th of a second
+#define DUP_USEC_BEEP_THRESHOLD    (500000)  // 5/10th of a second
 
 
 //This is the maximum number of times we'll be willing to 
 //catch a SIGINT, SIGTERM, or IPC message exit request before forcing an exit
-#define MAX_POLITE_EXIT_REQUESTS	(2)
+#define MAX_POLITE_EXIT_REQUESTS  (2)
 
-#define APB_ROW_EXPIRE		(30 * 60)	//Expire a passback entry in 30 minutes if it is still in the cache
-#define APB_DIST_EXPIRE		(100.0f)	//Expire the whole passback cache if the bus has moved at least APB_DIST_EXPIRE meters since the last accept
+#define APB_ROW_EXPIRE    (30 * 60)  //Expire a passback entry in 30 minutes if it is still in the cache
+#define APB_DIST_EXPIRE    (100.0f)  //Expire the whole passback cache if the bus has moved at least APB_DIST_EXPIRE meters since the last accept
 
-#define POLL_TIMEOUT		(1000)		//How many milliseconds to wait each time through the poll loop of each module
-#define DEFAULT_CONNECT_RETRY	(60)		//How many seconds to wait before attempting to reconnect to a forwarded port
+#define POLL_TIMEOUT    (1000)    //How many milliseconds to wait each time through the poll loop of each module
+#define DEFAULT_CONNECT_RETRY  (60)    //How many seconds to wait before attempting to reconnect to a forwarded port
 
 #define DEFAULT_BILL_SYNC_RETRY (1 * 60)        //How many seconds before reinitiating data transfer to billing server for any given log entry
 
-#define DEFAULT_PASS_SYNC_RETRY (2 * 60)	//How many seconds before re-querying the buspass server for updates
+#define DEFAULT_PASS_SYNC_RETRY (2 * 60)  //How many seconds before re-querying the buspass server for updates
 
-#define	AVLS_MOTION_INTERVAL	(2 * 60)	//How often to send AVLS chirps when in motion (in seconds) (default, see config)
-#define AVLS_STILL_INTERVAL	(60 * 60)	//How often to send AVLS chirps when still (in seconds)	(default, see config)
+#define  AVLS_MOTION_INTERVAL  (2 * 60)  //How often to send AVLS chirps when in motion (in seconds) (default, see config)
+#define AVLS_STILL_INTERVAL  (60 * 60)  //How often to send AVLS chirps when still (in seconds)  (default, see config)
 
-#define HUB_RETRY_TIME		(3)		//Number of seconds between connection retries if the IPC hub cannot be found.
+#define HUB_RETRY_TIME    (3)    //Number of seconds between connection retries if the IPC hub cannot be found.
 
-#define PADDLE_REQ_TIMEOUT	(15)		//How long to wait for a paddle request to time out.
+#define PADDLE_REQ_TIMEOUT  (15)    //How long to wait for a paddle request to time out.
 
-#define ALPHA_MAX	((unsigned) 255)	//Alpha value representing 100% opaque
-#define ALPHA_DRK	((unsigned) 192)	//Alpha value for dark blendovers
-#define ALPHA_LGT	((unsigned) 128)	//Alpha value for light blendovers
+#define ALPHA_MAX  ((unsigned) 255)  //Alpha value representing 100% opaque
+#define ALPHA_DRK  ((unsigned) 192)  //Alpha value for dark blendovers
+#define ALPHA_LGT  ((unsigned) 128)  //Alpha value for light blendovers
 
-#define SHADOW_OFFSET_UP	(5)		//How many pixels to offset the shadow under a unpressed button.
-#define SHADOW_OFFSET_DOWN	(2)		//How many pixels to offset the shadow under a pressed button.
+#define SHADOW_OFFSET_UP  (5)    //How many pixels to offset the shadow under a unpressed button.
+#define SHADOW_OFFSET_DOWN  (2)    //How many pixels to offset the shadow under a pressed button.
 
-#define TS_CALIB_HOLD_TIME	(15)		//How long the user has to hold down the touchscreen to initiate a calibration
+#define TS_CALIB_HOLD_TIME  (15)    //How long the user has to hold down the touchscreen to initiate a calibration
 
-#define SHELLCALL_VAR_ESC	('~')		//What character brackets variable expansion in shellcall actions
+#define SHELLCALL_VAR_ESC  ('~')    //What character brackets variable expansion in shellcall actions
 
 //-----------------------------------------------------------------
 //------------------------ CONFIGURATION FLAGS
@@ -156,7 +156,7 @@
 //if USE_WATCHDOG_ALARM is defined, the individual modules will
 //use a SIGALRM handler as a watchdog timer.
 
-#define USE_WATCHDOG_ALARM		
+#define USE_WATCHDOG_ALARM    
 
 
 //Define ALLOW_CREDENTIAL_COLLISIONS if you want to allow duplicate credential entries to exist.
@@ -191,39 +191,39 @@
 #ifdef USE_WATCHDOG_ALARM
   //How many seconds can a module go without running through its main 
   //loop (and resetting its watchdog) before it kills itself 
-  #define MODULE_WATCHDOG_VALUE	(60)	
+  #define MODULE_WATCHDOG_VALUE  (60)  
 #endif
 
 
-//	Uncomment this definition if you want to directly write to the frame buffer rather than
+//  Uncomment this definition if you want to directly write to the frame buffer rather than
 //having the UI engine batch changes and present them synchronously when present_framebuffer() is called.
-//	This method saves the RAM taken by a shadow frame buffer at the expense of some perceived display 
+//  This method saves the RAM taken by a shadow frame buffer at the expense of some perceived display 
 //flicker as the framebuffer will often contain (and display) partially drawn widgets for a frame while the
 //UI engine is busy drawing the rest of them.  This method is also slower for read-modify-write type framebuffer
 //operations since the framebuffer is marked non-cacheable so that the DMA controller that scans the framebuffer
 //will always see changes that occur.
 
-//#define FRAMEBUFFER_NO_SOFTWARE_BACKBUFFER	
+//#define FRAMEBUFFER_NO_SOFTWARE_BACKBUFFER  
 
 #ifndef FRAMEBUFFER_NO_SOFTWARE_BACKBUFFER
   #define FRAMEBUFFER_SOFTWARE_BACKBUFFER
 #endif
 
 
-//#define USE_REMOTE_UI	
+//#define USE_REMOTE_UI  
 
 #ifdef USE_REMOTE_UI
 
-  #define FB_SHADOW_TMP		"/tmp/fb_shadow.tmp"
-  #define FB_SHADOW_FILE	"/tmp/fb_shadow"
+  #define FB_SHADOW_TMP    "/tmp/fb_shadow.tmp"
+  #define FB_SHADOW_FILE  "/tmp/fb_shadow"
 
 #endif
 
 
-//	Uncomment this if you want the application to return the video framebuffer's colormap
+//  Uncomment this if you want the application to return the video framebuffer's colormap
 //to the state it was in then the application launched (If we need to be compatible with other 
 //3rd party framebuffer applications that expect a standard VGA palette for instance) after it exits.
-//	Mostly, we are going to run another instance of ourselves, or one of the showmessage programs
+//  Mostly, we are going to run another instance of ourselves, or one of the showmessage programs
 //so there is no harm in keeping the palette the way we like it and it prevents flicker and user
 //confusion.  So, yeah, really, don't uncomment FRAMEBUFFER_RESTORE_PALETTE unless you really mean it.
 
@@ -262,7 +262,7 @@
 
 //If COMMHUB_O_NONBLOCK is defined, the IPC hub will maintain all of its clients in 
 //nonblocking mode and cut anybody loose who doesn't respond.
-#define COMMHUB_O_NONBLOCK	
+#define COMMHUB_O_NONBLOCK  
 
 
 //If TOUCHSCREEN_QUIET is defined we request the touchscreen not send data between making a UI change and flushing it to
@@ -279,11 +279,11 @@
 //done by those buses until somebody can go fix their wiring...
 
 //how many DIU error messages to accept before rate-limiting
-#define DIU_ERROR_BURST_LIMIT	(5)		
+#define DIU_ERROR_BURST_LIMIT  (5)    
 
 //number of seconds before allowing another DIU error message to be logged
 //after exhausting the number allotted by DIU_ERROR_BURST_LIMIT
-#define DIU_ERROR_RATE_LIMIT	(120)		
+#define DIU_ERROR_RATE_LIMIT  (120)    
 
 
 //----------------------------------------------------------------
@@ -295,85 +295,88 @@
 
 //Configuration File Paths
 #ifdef TARGET_DEVEL_DESKTOP
-    #define CONFIG_FILE_PATH	"./"
+    //#define CONFIG_FILE_PATH  "./"
+    #define CONFIG_FILE_PATH  "/home/bus/config/"
 #else
-    #define CONFIG_FILE_PATH	"/mnt/data2/config/"
+    #define CONFIG_FILE_PATH  "/mnt/data2/config/"
 #endif
 
 //Database File Paths
 #ifdef TARGET_DEVEL_DESKTOP
-    #define DATABASE_FILE_PATH	"./"
+    //#define DATABASE_FILE_PATH  "./"
+    #define DATABASE_FILE_PATH  "/home/bus/database/"
 #else
-    #define DATABASE_FILE_PATH	"/mnt/data2/database/"
+    #define DATABASE_FILE_PATH  "/mnt/data2/database/"
 #endif
 
 //Executable File Paths
 #ifdef TARGET_DEVEL_DESKTOP
-    #define EXECUTABLE_FILE_PATH	"./"
+    //#define EXECUTABLE_FILE_PATH  "./"
+    #define EXECUTABLE_FILE_PATH  "/home/bus/bin/"
 #else
-    #define EXECUTABLE_FILE_PATH	"/mnt/data2/bin/"
+    #define EXECUTABLE_FILE_PATH  "/mnt/data2/bin/"
 #endif
 
 
 //Local database files
-#define	BILLING_FILE		(DATABASE_FILE_PATH "billing.mem")
-#define PASSES_FILE		(DATABASE_FILE_PATH "passes.mem")
+#define BILLING_FILE   (DATABASE_FILE_PATH "billing.mem")
+#define PASSES_FILE    (DATABASE_FILE_PATH "passes.mem")
 
 //Local configuration files
-#define DRIVER_MENU_FILE	(CONFIG_FILE_PATH "menu.xml")
-#define DRIVERS_FILE		(CONFIG_FILE_PATH "drivers.txt")
-#define SCHEME_INIT_FILE	(CONFIG_FILE_PATH "init.scm")
-#define RULES_FILE		(CONFIG_FILE_PATH "rules.scm")
-#define EQUIPNUM_FILE		(CONFIG_FILE_PATH "equipnum.txt")
-#define EQUIPNUM_TEMPFILE	(CONFIG_FILE_PATH "equipnum.tmp")
-#define RFID_PATTERN_FILE	(CONFIG_FILE_PATH "rfid_patterns.txt")
+#define DRIVER_MENU_FILE  (CONFIG_FILE_PATH "menu.xml")
+#define DRIVERS_FILE    (CONFIG_FILE_PATH "drivers.txt")
+#define SCHEME_INIT_FILE  (CONFIG_FILE_PATH "init.scm")
+#define RULES_FILE    (CONFIG_FILE_PATH "rules.scm")
+#define EQUIPNUM_FILE    (CONFIG_FILE_PATH "equipnum.txt")
+#define EQUIPNUM_TEMPFILE  (CONFIG_FILE_PATH "equipnum.tmp")
+#define RFID_PATTERN_FILE  (CONFIG_FILE_PATH "rfid_patterns.txt")
 #define TOUCHSCREEN_CALIB_FILE  (CONFIG_FILE_PATH "touchscreen_calib.txt")
-#define AVLS_CONFIG_FILE	(CONFIG_FILE_PATH "avls_freq.txt")
+#define AVLS_CONFIG_FILE  (CONFIG_FILE_PATH "avls_freq.txt")
 
-#define SERVER_LIST_FILE  	(CONFIG_FILE_PATH "server/server_list")
-#define SERVER_DESC_FILE  	(CONFIG_FILE_PATH "server/server_desc")
+#define SERVER_LIST_FILE    (CONFIG_FILE_PATH "server/server_list")
+#define SERVER_DESC_FILE    (CONFIG_FILE_PATH "server/server_desc")
 
 //Network status notification files
-#define TUNNEL_DROPFILE		"/tmp/tunnel-is-up"
-#define GPRS_DROPFILE		"/tmp/network-is-up"
+#define TUNNEL_DROPFILE    "/tmp/tunnel-is-up"
+#define GPRS_DROPFILE    "/tmp/network-is-up"
 
 //Serial port mapping
 #ifdef TARGET_DEVEL_DESKTOP
     //TARGET_DEVEL_DESKTOP is an x86 Linux box w/ a multiport serial board
-    //#define CONSOLE_PORT	"/dev/tty81a"
-    //#define DRIVER_UI_PORT	"/dev/tty81b"
-    //#define PASSENGER_UI_PORT	"/dev/tty81c"
-    //#define MODEM_PORT		"/dev/tty81d"
+    //#define CONSOLE_PORT  "/dev/tty81a"
+    //#define DRIVER_UI_PORT  "/dev/tty81b"
+    //#define PASSENGER_UI_PORT  "/dev/tty81c"
+    //#define MODEM_PORT    "/dev/tty81d"
 
-    #define CONSOLE_PORT	"/dev/ttyCONSOLE"
-    //#define DRIVER_UI_PORT	"/dev/ttyDIU"
-    #define DRIVER_UI_PORT	"/tmp/ttyDIU"
-    #define PASSENGER_UI_PORT	"/dev/ttyPIU"
-    #define MODEM_PORT		"/dev/ttyGPRS"
+    #define CONSOLE_PORT  "/dev/ttyCONSOLE"
+    //#define DRIVER_UI_PORT  "/dev/ttyDIU"
+    #define DRIVER_UI_PORT  "/tmp/ttyDIU"
+    #define PASSENGER_UI_PORT  "/dev/ttyPIU"
+    #define MODEM_PORT    "/dev/ttyGPRS"
 
 #else
     //The real target is an ARM Linux box with real serial ports at the expected locations
-    #define CONSOLE_PORT	"/dev/ttyS0"
-    #define DRIVER_UI_PORT	"/dev/ttyS1"
-    #define PASSENGER_UI_PORT	"/dev/ttyS2"
-    #define MODEM_PORT		"/dev/ttyS3"
+    #define CONSOLE_PORT  "/dev/ttyS0"
+    #define DRIVER_UI_PORT  "/dev/ttyS1"
+    #define PASSENGER_UI_PORT  "/dev/ttyS2"
+    #define MODEM_PORT    "/dev/ttyS3"
 #endif
 
 //Network protocol ports
-#define PASS_SERVER_IP		"127.0.0.1"
-#define PASS_SERVER_PORT	(7277)
+#define PASS_SERVER_IP    "127.0.0.1"
+#define PASS_SERVER_PORT  (7277)
 
-#define BILL_SERVER_IP		"127.0.0.1"
-#define BILL_SERVER_PORT	(2455)
+#define BILL_SERVER_IP    "127.0.0.1"
+#define BILL_SERVER_PORT  (2455)
 
-#define AVLS_SERVER_IP		"127.0.0.1"
-#define AVLS_SERVER_PORT	(2857)
+#define AVLS_SERVER_IP    "127.0.0.1"
+#define AVLS_SERVER_PORT  (2857)
 
-#define HELLO_SERVER_IP		"127.0.0.1"
-#define HELLO_SERVER_PORT	(3556)
+#define HELLO_SERVER_IP    "127.0.0.1"
+#define HELLO_SERVER_PORT  (3556)
 
 //Framebuffer location:
-#define CONFIG_FRAMEBUFFER_PATH	"/dev/fb0"
+#define CONFIG_FRAMEBUFFER_PATH  "/dev/fb0"
 
 //----------------------------------------------------------------
 //------------------------ DATA SIZE CONFIGURATION VALUES
@@ -384,53 +387,53 @@
 //Any sadistic bastard who writes config file lines longer than 1KB (that would be 
 //half a screen-full to the character on a standard 80x25 text screen!) deserves some
 //rude truncation.
-#define LINE_BUFFER_SIZE	(1024)
+#define LINE_BUFFER_SIZE  (1024)
 
 //This is the hardware page size for the mmap()'d data files:
-#define	MEMORY_PAGE_SIZE	(4096)		
+#define  MEMORY_PAGE_SIZE  (4096)    
 
 //This is the maximum size of a command line that can be assembled by the driver UI menu system using the <shellcall/> action.
-#define SHELLCALL_BUFFER_SIZE	(2048)
+#define SHELLCALL_BUFFER_SIZE  (2048)
 
 //This defines the expected size of the pass database and its RAM based index tables:
 
-//#define NUM_STORED_PASSES	(131072)	//A nice round number that multiplies by sizeof(rider_record) to a page boundary
-//#define STORED_PASS_HASH	(131101)	//A prime number larger than NUM_STORED_PASSES
+//#define NUM_STORED_PASSES  (131072)  //A nice round number that multiplies by sizeof(rider_record) to a page boundary
+//#define STORED_PASS_HASH  (131101)  //A prime number larger than NUM_STORED_PASSES
 
-#define NUM_STORED_PASSES	(262144)	//A nice round number that multiplies by sizeof(rider_record) to a page boundary
-#define STORED_PASS_HASH	(262147)	//A prime number larger than NUM_STORED_PASSES
+#define NUM_STORED_PASSES  (262144)  //A nice round number that multiplies by sizeof(rider_record) to a page boundary
+#define STORED_PASS_HASH  (262147)  //A prime number larger than NUM_STORED_PASSES
 
-//#define NUM_STORED_PASSES	(1048576)	//A nice round number that multiplies by sizeof(rider_record) to a page boundary
-//#define STORED_PASS_HASH	(1048583)	//A prime number larger than NUM_STORED_PASSES
+//#define NUM_STORED_PASSES  (1048576)  //A nice round number that multiplies by sizeof(rider_record) to a page boundary
+//#define STORED_PASS_HASH  (1048583)  //A prime number larger than NUM_STORED_PASSES
 
 //This defines the expected size of the billing cache:
 
-#define NUM_BILLING_ENTRIES	(2048)		//A nice round number that multiplies by sizeof(billing_record)
+#define NUM_BILLING_ENTRIES  (2048)    //A nice round number that multiplies by sizeof(billing_record)
                                                 //to be an integer number of MMU pages (for the benefit of efficient and
                                                 //transaction safe msync() calls.
 
-//	Thresholds for high-water-mark warnings on the billing log.  These cause the system to warn the driver
+//  Thresholds for high-water-mark warnings on the billing log.  These cause the system to warn the driver
 //when there are fewer than X free entries in the billing log file.  A prolonged time without connectiviry to
 //the billing log server where rows can be offloaded from the local cache to the main database is usually the
 //underlying cause of this condition.  The goal here is to issue frequent and annoying warnings to the driver
 //when the situation has gotten dangeriously bad such that they will call dispatch and the bus will be serviced.
 //
 
-#define BILLING_HIGH_THRESHOLD		(NUM_BILLING_ENTRIES / 2)	//Warn the driver at the half-way mark
-#define BILLING_CRITICAL_THRESHOLD	(NUM_BILLING_ENTRIES / 4)	//at 3/4 full, start really bitching about it
+#define BILLING_HIGH_THRESHOLD    (NUM_BILLING_ENTRIES / 2)  //Warn the driver at the half-way mark
+#define BILLING_CRITICAL_THRESHOLD  (NUM_BILLING_ENTRIES / 4)  //at 3/4 full, start really bitching about it
 
-#define BILLING_HIGH_FREQUENCY		(60 * 15)			//Warn every fifteen minutes after the half-way mark
-#define BILLING_CRITICAL_FREQUENCY	(60 * 5)			//Warn every 5 minutes at the 3/4 mark
+#define BILLING_HIGH_FREQUENCY    (60 * 15)      //Warn every fifteen minutes after the half-way mark
+#define BILLING_CRITICAL_FREQUENCY  (60 * 5)      //Warn every 5 minutes at the 3/4 mark
 
-#define REJECT_DIAG_DEBUG_THRESHOLD	(BILLING_HIGH_THRESHOLD)	//Reject diagnostic debug messages when log space is more than half full
-#define REJECT_DIAG_WARN_THRESHOLD	(BILLING_CRITICAL_THRESHOLD)	//Reject diagnostic warning messages when log space is more than 3/4 full
-#define REJECT_DIAG_ERROR_THRESHOLD	(BILLING_CRITICAL_THRESHOLD) 	//Reject diagnostic critical messages when log space is more than 3/4 full
+#define REJECT_DIAG_DEBUG_THRESHOLD  (BILLING_HIGH_THRESHOLD)  //Reject diagnostic debug messages when log space is more than half full
+#define REJECT_DIAG_WARN_THRESHOLD  (BILLING_CRITICAL_THRESHOLD)  //Reject diagnostic warning messages when log space is more than 3/4 full
+#define REJECT_DIAG_ERROR_THRESHOLD  (BILLING_CRITICAL_THRESHOLD)   //Reject diagnostic critical messages when log space is more than 3/4 full
 
 //This defines the size of the anti-passback-cache
-#define APB_CACHE_SIZE		(128)
+#define APB_CACHE_SIZE    (128)
 
 //This defines the maximum number of stops in a paddle
-#define MAX_PADDLE_SIZE		(1024)
+#define MAX_PADDLE_SIZE    (1024)
 
 //  This constant defines how deep down the rabbit hole of nested XML tags we will allow our parser to traverse when reading
 //a menu.xml file defining the behavior of the driver facing user interface.  This is NOT how deep the user-facing menu tree
@@ -438,18 +441,18 @@
 //very well may need to be a runtime value that is dynamically allocated after the UI engine analizes the contents of the XML
 //tree.  Alternately, if memory is not too tight, a double-the-reasonable-max type engineering tolerance estimate could produce
 //a statically allocated menu execution tree and thus reduce memory fragmentation and heap thrash.
-#define MENU_STACK_DEPTH	(32)
+#define MENU_STACK_DEPTH  (32)
 
 
 //  This is the size of the buffer used to load the menu.xml file.  It doesn't have to fit the whole file,
 //it just determines how many times we have to go back to the "disk" to fetch and parse the whole file.
 //4K seems like a reasonable block size.
-#define XML_CHUNK_SIZE		(4096)
+#define XML_CHUNK_SIZE    (4096)
 
 //  This is the maximum length of actuall DIU display messages
-#define DIU_MESSAGE_CHARS	(80)
+#define DIU_MESSAGE_CHARS  (80)
 //  This is how many lines to maintain
-#define DIU_MESSAGE_LINES	(25)
+#define DIU_MESSAGE_LINES  (25)
 
 //  This is the number of Raw->site:id mapping schemes supported for RFID decoding
 #define NUM_RFID_PATTERNS       (64)
@@ -462,29 +465,29 @@
 //The superviser checks for this module to be alive and preferentially
 //routes error messages there if it is present and alive, otherwise
 //they get routed to syslog.
-#define SUPERVISOR_SPECIAL_BILLDB		"billdb"
+#define SUPERVISOR_SPECIAL_BILLDB    "billdb"
 
 //The maximum number of modules that may be monitored by the supervisor
-#define SUPERVISOR_MAX_MODULES			(32)
+#define SUPERVISOR_MAX_MODULES      (32)
 
 //    If a spawned process lasts less than SUPERVISOR_RESPAWN_DELAY_THRESHOLD
 //seconds, we want to delay SUPERVISOR_RESPAWN_RATE_LIMIT seconds to avoid driving
 //load too high by thrashing a process that is doomed to fail.
-#define SUPERVISOR_RESPAWN_DELAY_THRESHOLD	(15)
-#define SUPERVISOR_RESPAWN_RATE_LIMIT		(30)
+#define SUPERVISOR_RESPAWN_DELAY_THRESHOLD  (15)
+#define SUPERVISOR_RESPAWN_RATE_LIMIT    (30)
 
 //    The supervisor process will refrain from spawning ANYTHING within
 //SUPERVISOR_GLOBAL_SPAWN_RATE_LIMIT seconds of the last spawn to prevent
 //thrashing the system and driving load too high by trying to start everything
 //all at once.
-#define SUPERVISOR_GLOBAL_SPAWN_RATE_LIMIT	(1)
+#define SUPERVISOR_GLOBAL_SPAWN_RATE_LIMIT  (1)
 
 
-//	These are some useful general math widgets so we don't keep repeating 
+//  These are some useful general math widgets so we don't keep repeating 
 //ourselves, and if we (god forbid) need to adjust the number of microseconds in
 //a second due to the evil decree of some mad scientist...
-#define SEC_TO_USEC(x)	((x) * 1000000)
-#define USEC_TO_SEC(x)	((x) / 1000000)
+#define SEC_TO_USEC(x)  ((x) * 1000000)
+#define USEC_TO_SEC(x)  ((x) / 1000000)
 
 //    The supervisor process will sent a message to MAILBOX_PING every 
 //SUPERVISOR_PING_INTERVAL microseconds.  If any module fails to respond
@@ -493,22 +496,22 @@
 //will be issued a SIGTERM, and if it again fails to respond within 
 //SUPERVISOR_PING_KILL_TIME it will be issued a SIGKILL.  If a PONG comes in
 //at any point, further abuse of the child module will stop.
-#define SUPERVISOR_PING_INTERVAL		SEC_TO_USEC(30)
-#define SUPERVISOR_PING_WARN_TIME		SEC_TO_USEC(60)
-#define SUPERVISOR_PING_TERM_TIME		SEC_TO_USEC(120)
-#define SUPERVISOR_PING_KILL_TIME		SEC_TO_USEC(180)
+#define SUPERVISOR_PING_INTERVAL    SEC_TO_USEC(30)
+#define SUPERVISOR_PING_WARN_TIME    SEC_TO_USEC(60)
+#define SUPERVISOR_PING_TERM_TIME    SEC_TO_USEC(120)
+#define SUPERVISOR_PING_KILL_TIME    SEC_TO_USEC(180)
 
 //How often to check system health parameters
-#define SUPERVISOR_SYSTEM_STAT_INTERVAL		(60)		
+#define SUPERVISOR_SYSTEM_STAT_INTERVAL    (60)    
 
 #ifdef TARGET_DEVEL_DESKTOP
-    #define SUPERVISOR_WARN_LOW_MEM		(4096)		//Warn if free memory goes below this threshold
-    #define SUPERVISOR_WARN_LOAD_AVG		(2.0f)		//Warn if our 5 minute load average goes above this threshold
-    #define SUPERVISOR_WARN_NUM_PROC		(256)		//Warn if there are more than this many processes 
+    #define SUPERVISOR_WARN_LOW_MEM    (4096)    //Warn if free memory goes below this threshold
+    #define SUPERVISOR_WARN_LOAD_AVG    (2.0f)    //Warn if our 5 minute load average goes above this threshold
+    #define SUPERVISOR_WARN_NUM_PROC    (256)    //Warn if there are more than this many processes 
 #else
-    #define SUPERVISOR_WARN_LOW_MEM		(4096)		//Warn if free memory goes below this threshold
-    #define SUPERVISOR_WARN_LOAD_AVG		(2.0f)		//Warn if our 5 minute load average goes above this threshold
-    #define SUPERVISOR_WARN_NUM_PROC		(100)		//Warn if there are more than this many processes 
+    #define SUPERVISOR_WARN_LOW_MEM    (4096)    //Warn if free memory goes below this threshold
+    #define SUPERVISOR_WARN_LOAD_AVG    (2.0f)    //Warn if our 5 minute load average goes above this threshold
+    #define SUPERVISOR_WARN_NUM_PROC    (100)    //Warn if there are more than this many processes 
 #endif
 
 //Which types of log entries should be sent to the server via the billing log?