   (dotimes [i (count labels)]
       (core defineStateLabel dev i (get labels i))))
 
+(defn get-port
+  "Get the name of the port connected to a device."
+  [dev]
+  (when (core hasProperty dev "Port")
+    (core getProperty dev "Port")))
+
 (defn read-device-startup-settings
   [dev]
   {:library-location (device-library-location dev)
    :pre-init-settings (pre-init-property-settings dev)
-   :state-labels (state-device-labels dev)})
+   :state-labels (state-device-labels dev)
+   :port (get-port dev)})
 
 (defn startup-device
   "Startup a device given a device startup settings map."

(ns org.micromanager.reloader
  (:use [clojure.java.io :only (file copy)]
        [clojure.data :only (diff)]

  (:import (javax.swing JLabel JWindow)
           (java.awt Color)))

(load-mm (org.micromanager.MMStudioMainFrame/getInstance))

(defn devices-in-each-module
