     public init(bytes: ByteValue = (0,0,0,0,0,0)) {
         
         self.bytes = bytes
+    }
+}
+
+// MARK: - Byte Swap
+
+public extension Address {
+    
+    /// A representation of this address with the byte order swapped.
+    public var byteSwapped: Address {
+        
+        return Address(bytes: (bytes.5, bytes.4, bytes.3, bytes.2, bytes.1, bytes.0))
+    }
+    
+    /// Creates an address from its little-endian representation, changing the
+    /// byte order if necessary.
+    ///
+    /// - Parameter value: A value to use as the little-endian representation of
+    ///   the new address.
+    public init(littleEndian value: Address) {
+        #if _endian(little)
+            self = value
+        #else
+            self = value.byteSwapped
+        #endif
+    }
+    
+    /// Creates an address from its big-endian representation, changing the byte
+    /// order if necessary.
+    ///
+    /// - Parameter value: A value to use as the big-endian representation of the
+    ///   new address.
+    public init(bigEndian value: Address) {
+        #if _endian(big)
+            self = value
+        #else
+            self = value.byteSwapped
+        #endif
+    }
+    
+    /// The little-endian representation of this address.
+    ///
+    /// If necessary, the byte order of this value is reversed from the typical
+    /// byte order of this address. On a little-endian platform, for any
+    /// address `x`, `x == x.littleEndian`.
+    public var littleEndian: Address {
+        #if _endian(little)
+            return self
+        #else
+            return byteSwapped
+        #endif
+    }
+    
+    /// The big-endian representation of this address.
+    ///
+    /// If necessary, the byte order of this value is reversed from the typical
+    /// byte order of this address. On a big-endian platform, for any
+    /// address `x`, `x == x.bigEndian`.
+    public var bigEndian: Address {
+        #if _endian(big)
+            return self
+        #else
+            return byteSwapped
+        #endif
     }
 }
 


import Foundation

/// Bluetooth Address type.
public struct Address: ByteValue {
    
    // MARK: - ByteValueType

    
    public var description: String { return rawValue }
}
