Class: NetworkMgr

NetworkMgr()

new NetworkMgr()

The manager for network queues.
Source:
Fires:

Methods

close(callback)

To close the manager queues. The underlying connection will be closed when there are no queues use it.
Parameters:
Name Type Description
callback function
Properties
Name Type Attributes Description
err Error <nullable>
Source:

id() → {string}

Source:
Returns:
The network ID.
Type
string

mqStatus() → {DataMqStatus}

Source:
Returns:
Manager status.
Type
DataMqStatus

name() → {string}

Source:
Returns:
The network code.
Type
string

sendDlDataResult(data, callback)

Send downlink result data to the broker.
Parameters:
Name Type Description
data NetDlDataResult
callback function
Properties
Name Type Attributes Description
err Error <nullable>
Source:
Throws:
Wrong arguments.
Type
Error

sendUlData(data, callback)

Send uplink data to the broker.
Parameters:
Name Type Description
data NetUlData
callback function
Properties
Name Type Attributes Description
err Error <nullable>
Source:
Throws:
Wrong arguments.
Type
Error

status() → {MgrStatus}

Source:
Returns:
Manager status.
Type
MgrStatus

unitCode() → {string}

Source:
Returns:
The associated unit code of the network.
Type
string

unitId() → {string}

Source:
Returns:
The associated unit ID of the network.
Type
string

Events

status

Connection status event.
Type:
  • Status
Source:

NetworkMgr(connPool, hostUri, opts, handler)

new NetworkMgr(connPool, hostUri, opts, handler)

Parameters:
Name Type Description
connPool Map.<string, Connection>
hostUri URL
opts Options
handler NetMgrMsgHandlers
Source:
Throws:
Wrong arguments.
Type
Error

Methods

close(callback)

To close the manager queues. The underlying connection will be closed when there are no queues use it.
Parameters:
Name Type Description
callback function
Properties
Name Type Attributes Description
err Error <nullable>
Source:

id() → {string}

Source:
Returns:
The network ID.
Type
string

mqStatus() → {DataMqStatus}

Source:
Returns:
Manager status.
Type
DataMqStatus

name() → {string}

Source:
Returns:
The network code.
Type
string

sendDlDataResult(data, callback)

Send downlink result data to the broker.
Parameters:
Name Type Description
data NetDlDataResult
callback function
Properties
Name Type Attributes Description
err Error <nullable>
Source:
Throws:
Wrong arguments.
Type
Error

sendUlData(data, callback)

Send uplink data to the broker.
Parameters:
Name Type Description
data NetUlData
callback function
Properties
Name Type Attributes Description
err Error <nullable>
Source:
Throws:
Wrong arguments.
Type
Error

status() → {MgrStatus}

Source:
Returns:
Manager status.
Type
MgrStatus

unitCode() → {string}

Source:
Returns:
The associated unit code of the network.
Type
string

unitId() → {string}

Source:
Returns:
The associated unit ID of the network.
Type
string

Events

status

Connection status event.
Type:
  • Status
Source: