DALIFood
public class DALIFood
An interface for getting and setting information about food in the lab
-
The most recently gathered information on food
Declaration
Swift
public static var current: String?
-
Gets the current food for the night
Declaration
Swift
public static func getFood(callback: @escaping (_ food: String?) -> Void)
Parameters
callback
The function called when the data has been received
food
The food tonight
-
Observe the current listing of food
Declaration
Swift
public static func observeFood(callback: @escaping (_ food: String?) -> Void) -> Observation
Parameters
callback
Called when complete
food
The food listed for tonight, if any
-
Sets the food listing for the night
Declaration
Swift
public static func setFood(food: String, callback: @escaping (_ success: Bool) -> Void)
Parameters
food
The food to set the listing to
callback
Called when complete
success
Was successful
-
Cancels the food listing for tonight
Declaration
Swift
public static func cancelFood(callback: @escaping (_ success: Bool) -> Void)
Parameters
callback
Called when complete
success
Was successful