Broker publish and subscription sensor events.
Methods
attach(socket)
static
Attach a socket that listens to all events
Arguments:
-
socket
(Object)
 Socket
create(sensorName) → function
static
Arguments:
-
sensorName
(String)
destroy(sensorName)
static
Remove publish function.
Arguments:
-
sensorName
(String)
detach(c)
static
Remove a previously attached socket
Arguments:
-
c
(Object)
 Client
subscribe(sensorName, cb)
static
Pass in a function to call when a sensor event fires.
Arguments:
-
sensorName
(String)
-
cb
(function)
 Publish callback
unSubscribe(listener)
static
Stop subscribing to a sensor
Arguments:
-
listener
(*)
socket
(Object)
 Socket
sensorName
(String)
sensorName
(String)
c
(Object)
 Client
sensorName
(String)
cb
(function)
 Publish callback
listener
(*)