ThingObserverController

open class ThingObserverController : Controller

Observes Things and Thing-related objects.

This controller is designed to be used by a client with a corresponding controller (e.g. ThingSourceController) that answers to its events.

  • Returns an observable of the Things in the system.

    This is performed by sending a Discovery event with the object type of Thing.

    This method does not perform any kind of caching and it should be performed on the application-side.

    Declaration

    Swift

    public func discoverThings() -> Observable<Thing>
  • Returns an observable emitting advertised Things.

    This method does not perform any kind of caching and it should be performed on the application-side.

    Declaration

    Swift

    public func observeAdvertisedThings() throws -> Observable<Thing>
  • Returns an observable of the Things that are located at the given Location.

    This is performed by sending a Query event for Thing objects with the locationId matching the objectId of the Location.

    This method does not perform any kind of caching and it should be performed on the application-side.

    Declaration

    Swift

    public func queryThingsAtLocation(locationId: CoatyUUID) -> Observable<[Thing]>