Gets the container's communication manager.
Gets the container object of this controller.
Gets the controller's options as specified in the configuration options.
Gets the registered name of this controller.
The registered name is either defined by the corresponding key in the
Components.controllers
object in the container configuration, or by
invoking Container.registerController
method with this name.
Gets an Observable emitting information about changes in the currently registered sensors.
Registered sensor objects are augmented by a property thing
which
references the associated Thing
object.
Emitted sensor objects are read-only. If you need to modify one, e.g. to
delete the thing
property, clone the object first (using clone()
function in @coaty/core
).
Gets the container's Runtime object.
Sets a filter predicate that determines whether an observed sensor is relevant and should be registered with the controller.
The filter predicate should return true
if the passed-in sensor is
relevant; false
otherwise.
By default, all observed sensors of all relevant things are considered relevant.
Gets an Observable emitting incoming observations on registered sensors.
Sets a filter predicate that determines whether an observed thing is relevant and should be registered with the controller.
The filter predicate should return true
if the passed-in thing is
relevant; false
otherwise.
By default, all observed things are considered relevant.
a filter predicate for things
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.
Whenever one of the controller's log methods (e.g. logDebug
, logInfo
,
logWarning
, logError
, logFatal
) is called by application code, the
controller creates a Log object with appropriate property values and
passes it to this method before advertising it.
You can override this method to additionally set certain properties (such
as LogHost.hostname
or Log.logLabels
). Ensure that
super.extendLogObject
is called in your override. The base method does
nothing.
log object to be extended before being advertised
Advertise a Log object for debugging purposes.
a debug message
any number of log tags
Advertise a Log object for an error.
an error (object)
additional error message
any number of log tags
Advertise a Log object for an error with stacktrace information.
an error (object)
additional error message
any number of log tags
Advertise a Log object for a fatal error.
an error (object)
additional error message
any number of log tags
Advertise an informational Log object.
an informational message
any number of log tags
Advertise a Log object for a warning.
a warning message
any number of log tags
Returns an observable emitting advertised Things.
This method does not perform any kind of caching and it should be performed on the application-side.
Called when the communication manager is about to start or restart.
Override this method to implement side effects here. Ensure that
super.onCommunicationManagerStarting
is called in your override. The
base implementation does nothing.
Called when the communication manager is about to stop.
Override this method to implement side effects here. Ensure that
super.onCommunicationManagerStopping
is called in your override. The
base implementation does nothing.
Called by the container when this instance should be disposed.
Implement cleanup side effects here. Ensure that super.onDispose
is
called in your override. The base implementation does nothing.
Called when the container has completely set up and injected all dependency components, including all its controllers.
Override this method to perform initializations in your custom controller
class instead of defining a constructor. Although the base implementation
does nothing it is good practice to call super.onInit()
in your
override method; especially if your custom controller class does not
extend from the base Controller
class directly.
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.
Generated using TypeDoc
A convenience controller that observes things and associated sensor and observation objects, combining the functionality of
ThingObserverController
andSensorObserverController
.This controller is designed to be used by a client that wants to easily handle sensor-related events as well as sensor observations.