BundleContainer
open class BundleContainer
extension BundleContainer: CustomStringConvertible
extension BundleContainer: Sequence
Underlining Data Model for the Vuzix Connectivity framework.
Messages received or sent to a Vuzix Device are of this base type. Under the hood this class takes care of encoding and decoding the payloads transmitted over BLE.
Supported data types are as follows: Bool, BundleContainer, Character, Double, Float, Int, Intent, Int64, Int16, String, Data, Bool Array, BundleContainer Array, Character Array, Double Array, Float Array, Int Array, Intent Array, Int64 Array, Int16 Array, and String Array. Any other type is ignored.
See also
Broadcast, OrderBroadcast, OrderBroadcastResult-
Creates an empty BundleContainer
Declaration
Swift
public init()
-
Adds a value to the BundleContainer for the key
Declaration
Swift
public func add(key: String, value: Any)
-
Accessor to fetch values from the key
Declaration
Swift
public func getValueForKey(key: String) -> Any?
-
Convinence: Accessor to fetch values from the key
Declaration
Swift
public subscript(key: String) -> Any? { get set }
-
Declaration
Swift
public func isEmpty() -> Bool
Return Value
is the BundleContainer empty
-
Converts a BundleContainer to a hierarchical Swift Dictionary
Declaration
Swift
public func toDictionary() -> [String : Any]
-
Declaration
Swift
public var description: String { get }
-
Returns an iterator over the elements of this sequence.
Declaration
Swift
public func makeIterator() -> DictionaryIterator<String, Any>