Communication functions definitions to deal with sent and received messages
Methods
# inner addAnchorsDataToJsonMessage(payloadString, geojson_anchors, geojson_precison_decimal_places) → {string}
Add Anchors Data To Json Message
Parameters:
| Name | Type | Description |
|---|---|---|
payloadString |
string
|
Payload string data to add |
geojson_anchors |
FeatureCollection
|
Anchors FeatureCollection |
geojson_precison_decimal_places |
number
|
Value of precison decimal places |
Payload string data
string
# inner addAntennasDataToJsonMessage(payloadString, geojson_antennas, geojson_precison_decimal_places) → {string}
Add Antennas Data To Json Message
Parameters:
| Name | Type | Description |
|---|---|---|
payloadString |
string
|
Payload string data to add |
geojson_antennas |
FeatureCollection
|
Antennas FeatureCollection |
geojson_precison_decimal_places |
number
|
Value of precison decimal places |
Payload string data
string
# inner addAssetPointsDataToJsonMessage(payloadString, geojson_asset_points, geojson_precison_decimal_places) → {string}
Add Asset Points Data To Json Message
Parameters:
| Name | Type | Description |
|---|---|---|
payloadString |
string
|
Payload string data to add |
geojson_asset_points |
FeatureCollection
|
Asset Points FeatureCollection |
geojson_precison_decimal_places |
number
|
Value of precison decimal places |
Payload string data
string
# inner addBackendReadRateToJsonMessage(payloadString, backend_read_rate)
Add Backend Read Rate To Json Message
Parameters:
| Name | Type | Description |
|---|---|---|
payloadString |
string
|
Payload string data to add |
backend_read_rate |
number
|
Backend read rate value |
Payload string data
# inner addMapIdToJsonMessage(payloadString, selectedMapIndex)
Add Map ID To Json Message
Parameters:
| Name | Type | Description |
|---|---|---|
payloadString |
string
|
Payload string data to add |
selectedMapIndex |
number
|
Index of selected Map |
Payload string data
# inner addRssiParametersDataToJsonMessage(payloadString) → {string}
Add Rssi Parameters Data To Json Message
Parameters:
| Name | Type | Description |
|---|---|---|
payloadString |
string
|
Payload string data to add |
Payload string data
string
# inner addSelectedMlAgentsDataToJsonMessage(payloadString) → {string}
Add Selected ML Agents Data To Json Message
Parameters:
| Name | Type | Description |
|---|---|---|
payloadString |
string
|
Payload string data to add |
Payload string data
string
# inner addSessionUuidToJsonMessage(payloadString) → {string}
Add Session UUID To Json Message
Parameters:
| Name | Type | Description |
|---|---|---|
payloadString |
string
|
Payload string data to add |
Payload string data
string
# inner addStatusCloseToJsonMessage(payloadString) → {string}
Add "Close" Status To Json Message
Parameters:
| Name | Type | Description |
|---|---|---|
payloadString |
string
|
Payload string data to add |
Payload string data
string
# inner addStatusOpenToJsonMessage(payloadString) → {string}
Add "Open" Status To Json Message
Parameters:
| Name | Type | Description |
|---|---|---|
payloadString |
string
|
Payload string data to add |
Payload string data
string
# inner constructJsonMessage(origin, geojson_asset_points, geojson_antennas, geojson_anchors, geojson_precison_decimal_places, backend_read_rate, selectedMapIndex, messageToSend) → {string}
Construct Json Message to send to MQTT Broker
Parameters:
| Name | Type | Default | Description |
|---|---|---|---|
origin |
string
|
default | Label with description from where the message came from |
geojson_asset_points |
FeatureCollection
|
Asset Points FeatureCollection | |
geojson_antennas |
FeatureCollection
|
Antennas FeatureCollection | |
geojson_anchors |
FeatureCollection
|
Anchors FeatureCollection | |
geojson_precison_decimal_places |
number
|
Value of precison decimal places | |
backend_read_rate |
number
|
Backend read rate value | |
selectedMapIndex |
number
|
Index of selected Map | |
messageToSend |
string
|
MQTT message to send to broker |
Constructed Message to send to the MQTT Broker
string
# inner processReceivedJsonMessage(message, geojson_asset_points, geojson_antennas, geojson_anchors, pulsing_dots_layers_sources, received_uuid)
Process Json Message received from MQTT Broker
Parameters:
| Name | Type | Description |
|---|---|---|
message |
string
|
MQTT message received from the broker |
geojson_asset_points |
FeatureCollection
|
Asset Points FeatureCollection |
geojson_antennas |
FeatureCollection
|
Antennas FeatureCollection |
geojson_anchors |
FeatureCollection
|
Anchors FeatureCollection |
pulsing_dots_layers_sources |
Array
|
Pulsing Dots sources Array |
received_uuid |
string
|
MQTT received session UUID |