Index: src/mlx/const.py
===================================================================
--- src/mlx/const.py	(revision 129)
+++ src/mlx/const.py	(revision 132)
@@ -115,88 +115,4 @@
 # Flight stage: end
 STAGE_END = 12
-
-#-------------------------------------------------------------------------------
-
-# Plane status: unknown
-PLANE_UNKNOWN = 0
-
-# Plane status: at home, i.e. LHBP
-PLANE_HOME = 1
-
-# Plane status: away
-PLANE_AWAY = 2
-
-# Plane status: parking
-PLANE_PARKING = 3
-
-#-------------------------------------------------------------------------------
-
-# Flight type: scheduled
-FLIGHTTYPE_SCHEDULED = 0
-
-# Flight type: old-timer
-FLIGHTTYPE_OLDTIMER = 1
-
-# Flight type: VIP
-FLIGHTTYPE_VIP = 2
-
-# Flight type: charter
-FLIGHTTYPE_CHARTER = 3
-
-#-------------------------------------------------------------------------------
-
-# Delay code: loading problems
-DELAYCODE_LOADING = 0
-
-# Delay code: VATSIM problem
-DELAYCODE_VATSIM = 1
-
-# Delay code: network problems
-DELAYCODE_NETWORK = 2
-
-# Delay code: controller's fault
-DELAYCODE_CONTROLLER = 3
-
-# Delay code: system crash or freeze
-DELAYCODE_SYSTEM = 4
-
-# Delay code: navigation problem
-DELAYCODE_NAVIGATION = 5
-
-# Delay code: traffic problems
-DELAYCODE_TRAFFIC = 6
-
-# Delay code: apron navigation
-DELAYCODE_APRON = 7
-
-# Delay code: weather problems
-DELAYCODE_WEATHER = 8
-
-# Delay code: personal reasons
-DELAYCODE_PERSONAL = 9
-
-#-------------------------------------------------------------------------------
-
-# The available gates at LHBP
-lhbpGateNumbers = []
-
-for i in range(1, 7):
-    lhbpGateNumbers.append(str(i))
-
-for i in range(10, 19):
-    lhbpGateNumbers.append(str(i))
-
-for i in range(24, 28):
-    lhbpGateNumbers.append(str(i))
-
-for i in range(31, 39):
-    lhbpGateNumbers.append(str(i))
-
-for i in range(42, 47):
-    lhbpGateNumbers.append(str(i))
-
-for i in range(60, 84):
-    if i!=70 and i!=80:
-        lhbpGateNumbers.append(str(i))
 
 #-------------------------------------------------------------------------------
@@ -221,3 +137,181 @@
 #-------------------------------------------------------------------------------
 
+# Plane status: unknown
+PLANE_UNKNOWN = 0
+
+# Plane status: at home, i.e. LHBP
+PLANE_HOME = 1
+
+# Plane status: away
+PLANE_AWAY = 2
+
+# Plane status: parking
+PLANE_PARKING = 3
+
+#-------------------------------------------------------------------------------
+
+# Flight type: scheduled
+FLIGHTTYPE_SCHEDULED = 0
+
+# Flight type: old-timer
+FLIGHTTYPE_OLDTIMER = 1
+
+# Flight type: VIP
+FLIGHTTYPE_VIP = 2
+
+# Flight type: charter
+FLIGHTTYPE_CHARTER = 3
+
+#-------------------------------------------------------------------------------
+
+# Delay code: loading problems
+DELAYCODE_LOADING = 0
+
+# Delay code: VATSIM problem
+DELAYCODE_VATSIM = 1
+
+# Delay code: network problems
+DELAYCODE_NETWORK = 2
+
+# Delay code: controller's fault
+DELAYCODE_CONTROLLER = 3
+
+# Delay code: system crash or freeze
+DELAYCODE_SYSTEM = 4
+
+# Delay code: navigation problem
+DELAYCODE_NAVIGATION = 5
+
+# Delay code: traffic problems
+DELAYCODE_TRAFFIC = 6
+
+# Delay code: apron navigation
+DELAYCODE_APRON = 7
+
+# Delay code: weather problems
+DELAYCODE_WEATHER = 8
+
+# Delay code: personal reasons
+DELAYCODE_PERSONAL = 9
+
+#-------------------------------------------------------------------------------
+
+# Message type: logger error
+MESSAGETYPE_LOGGER_ERROR = 1
+
+# Message type: information
+MESSAGETYPE_INFORMATION = 2
+
+# Message type: fault messages
+MESSAGETYPE_FAULT = 3
+
+# Message type: NO-GO fault messages
+MESSAGETYPE_NOGO = 4
+
+# Message type: gate system messages
+MESSAGETYPE_GATE_SYSTEM = 5
+
+# Message type: environment messages
+MESSAGETYPE_ENVIRONMENT = 6
+
+# Message type: help messages
+MESSAGETYPE_HELP = 7
+
+# Message type: visibility messages
+MESSAGETYPE_VISIBILITY = 8
+
+#-------------------------------------------------------------------------------
+
+messageTypes = [ MESSAGETYPE_LOGGER_ERROR,
+                 MESSAGETYPE_INFORMATION,
+                 MESSAGETYPE_FAULT,
+                 MESSAGETYPE_NOGO,
+                 MESSAGETYPE_GATE_SYSTEM,
+                 MESSAGETYPE_ENVIRONMENT,
+                 MESSAGETYPE_HELP,
+                 MESSAGETYPE_VISIBILITY ]
+
+#-------------------------------------------------------------------------------
+
+_messageTypeStrings = { MESSAGETYPE_LOGGER_ERROR : "loggerError",
+                        MESSAGETYPE_INFORMATION : "information",
+                        MESSAGETYPE_FAULT : "fault",
+                        MESSAGETYPE_NOGO : "nogo",
+                        MESSAGETYPE_GATE_SYSTEM : "gateSystem",
+                        MESSAGETYPE_ENVIRONMENT : "environment",
+                        MESSAGETYPE_HELP : "help",
+                        MESSAGETYPE_VISIBILITY : "visibility" }
+
+def messageType2string(messageType):
+    """Get the string equivalent of the given message type."""
+    return _messageTypeStrings[messageType] \
+           if messageType in _messageTypeStrings else None    
+
+#-------------------------------------------------------------------------------
+
+# Message display level: none
+MESSAGELEVEL_NONE = 0
+
+# Message display level: only message in the simulator
+MESSAGELEVEL_FS = 1
+
+# Message display level: only sound
+MESSAGELEVEL_SOUND = 2
+
+# Message display level: both
+MESSAGELEVEL_BOTH = 3
+
+#-------------------------------------------------------------------------------
+
+messageLevels = [ MESSAGELEVEL_NONE,
+                  MESSAGELEVEL_FS,
+                  MESSAGELEVEL_SOUND,
+                  MESSAGELEVEL_BOTH ]
+
+#-------------------------------------------------------------------------------
+
+_messageLevelStrings = { MESSAGELEVEL_NONE : "none",
+                         MESSAGELEVEL_FS : "fs",
+                         MESSAGELEVEL_SOUND : "sound",
+                         MESSAGELEVEL_BOTH : "both" }
+
+def messageLevel2string(messageLevel):
+    """Get the string equivalent of the given message level."""
+    return _messageLevelStrings[messageLevel] \
+           if messageLevel in _messageLevelStrings else None    
+
+def string2messageLevel(str):
+    """Get the message level for the given string."""
+    for (value, s) in _messageLevelStrings.iteritems():
+        if str==s:
+            return value
+    return MESSAGELEVEL_NONE
+
+#-------------------------------------------------------------------------------
+
+# The available gates at LHBP
+lhbpGateNumbers = []
+
+for i in range(1, 7):
+    lhbpGateNumbers.append(str(i))
+
+for i in range(10, 19):
+    lhbpGateNumbers.append(str(i))
+
+for i in range(24, 28):
+    lhbpGateNumbers.append(str(i))
+
+for i in range(31, 39):
+    lhbpGateNumbers.append(str(i))
+
+for i in range(42, 47):
+    lhbpGateNumbers.append(str(i))
+
+for i in range(60, 84):
+    if i!=70 and i!=80:
+        lhbpGateNumbers.append(str(i))
+
+#-------------------------------------------------------------------------------
+
 languages = ["$system", "en_GB", "hu_HU"]
+
