Abstract
Interface to the opensense map service . Use it to send data to opensense map .
Provides a service to invoke broker messages from external networks . Allows only configured messages .
Contents
Meta
File | index.js |
Abstract | Interface to the opensense map service . Use it to send data to opensense map . |
Author | Volker Böhm |
Copyright | Copyright ( c ) 2020 Volker Böhm |
License | This software is licensed under the GNU LESSER GENERAL PUBLIC LICENSE Version 3 . It is furnished "as is" , without any support , and with no warranty , express or implied , as to its usefulness for any purpose . |
File | remoteservice.js |
Abstract | Provides a service to invoke broker messages from external networks . Allows only configured messages . |
Author | Volker Böhm |
Copyright | Copyright ( c ) 2020 Volker Böhm |
License | This software is licensed under the GNU LESSER GENERAL PUBLIC LICENSE Version 3 . It is furnished "as is" , without any support , and with no warranty , express or implied , as to its usefulness for any purpose . |
Type definitions
Service {Object}
Service configuration
Name | Type | Description |
---|---|---|
path |
string |
|
reason |
string |
|
qos |
number |
optional |
devices |
Object |
Global functions
prepare
prepare (config, remoteService) => {RemoteService}
Prepares the object
prepare Parameters
Name | Type | Attribute | Default | Description |
---|---|---|---|---|
config |
Object |
remote service configuration | ||
remoteService |
RemoteService |
optional | null | existing remote service class |
prepare returns
Type | Description |
---|---|
RemoteService |
the prepared remote service object |
Class RemoteService
new RemoteService(options)
Creates a remote service
RemoteService Parameters
Name | Type | Attribute | Default | Description |
---|---|---|---|---|
options |
Object |
optional | { } | remote server parameter |
options properties
Name | Type | Description |
---|---|---|
services |
Array.<Service> |
list of supported services |
RemoteService Methods
close
async close ()
Closes the broker , stops listening
on
on (event, callback)
Sets a callback .
on Parameters
Name | Type | Description |
---|---|---|
event |
string |
event name ( not case sensitive ) for the callback |
callback |
function |
function ( . . . parameter ) |
on throws
Type | Description |
---|---|
Error |
if the event is not supported |
Error |
if the callback is not 'function' |
run
run ()
Listens to a configured port