-
Notifications
You must be signed in to change notification settings - Fork 137
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#3520] specific metrics for unknown messages
Signed-off-by: Bob Claerhout <[email protected]>
- Loading branch information
1 parent
4a8911a
commit 00f5993
Showing
26 changed files
with
502 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
60 changes: 60 additions & 0 deletions
60
adapters/lora/src/main/java/org/eclipse/hono/adapter/lora/UnknownLoraMessage.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
/** | ||
* Copyright (c) 2023 Contributors to the Eclipse Foundation | ||
* | ||
* See the NOTICE file(s) distributed with this work for additional | ||
* information regarding copyright ownership. | ||
* | ||
* This program and the accompanying materials are made available under the | ||
* terms of the Eclipse Public License 2.0 which is available at | ||
* http://www.eclipse.org/legal/epl-2.0 | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 | ||
*/ | ||
|
||
|
||
package org.eclipse.hono.adapter.lora; | ||
|
||
import com.google.common.io.BaseEncoding; | ||
import io.vertx.core.buffer.Buffer; | ||
import io.vertx.core.json.JsonObject; | ||
import java.util.Objects; | ||
|
||
|
||
/** | ||
* A Lora message that contains unknown data sent from an end-device to a Network Server. | ||
* | ||
*/ | ||
public class UnknownLoraMessage implements LoraMessage { | ||
|
||
/** | ||
* {@inheritDoc} | ||
*/ | ||
@Override | ||
public final byte[] getDevEUI() { | ||
return new byte[0]; | ||
} | ||
|
||
/** | ||
* {@inheritDoc} | ||
*/ | ||
@Override | ||
public final String getDevEUIAsString() { | ||
return ""; | ||
} | ||
|
||
/** | ||
* {@inheritDoc} | ||
*/ | ||
@Override | ||
public final LoraMessageType getType() { | ||
return LoraMessageType.UNKNOWN; | ||
} | ||
|
||
/** | ||
* {@inheritDoc} | ||
*/ | ||
@Override | ||
public final Buffer getPayload() { | ||
return Buffer.buffer(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
adapters/lora/src/test/resources/payload/actilityEnterprise.unknown.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"DevEUI_unknown": { | ||
|
||
} | ||
} |
4 changes: 4 additions & 0 deletions
4
adapters/lora/src/test/resources/payload/actilityWireless.unknown.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"DevEUI_unknown": { | ||
} | ||
} |
42 changes: 42 additions & 0 deletions
42
adapters/lora/src/test/resources/payload/chirpStack.unknown.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
{ | ||
"applicationID": "123", | ||
"applicationName": "temperature-sensor", | ||
"deviceName": "garden-sensor", | ||
"devEUI": "AgICAgICAgI=", | ||
"devAddr": "AFE5Qg==", | ||
"rxInfo": [ | ||
{ | ||
"gatewayID": "AwMDAwMDAwM=", | ||
"time": "2019-11-08T13:59:25.048445Z", | ||
"timeSinceGPSEpoch": null, | ||
"rssi": -48, | ||
"loRaSNR": 9, | ||
"channel": 5, | ||
"rfChain": 0, | ||
"board": 0, | ||
"antenna": 0, | ||
"location": { | ||
"latitude": 52.3740364, | ||
"longitude": 4.9144401, | ||
"altitude": 10.5 | ||
}, | ||
"fineTimestampType": "NONE", | ||
"context": "9u/uvA==", | ||
"uplinkID": "jhMh8Gq6RAOChSKbi83RHQ==" | ||
} | ||
], | ||
"txInfo": { | ||
"frequency": 868100000, | ||
"modulation": "LORA", | ||
"loRaModulationInfo": { | ||
"bandwidth": 125, | ||
"spreadingFactor": 11, | ||
"codeRate": "4/5", | ||
"polarizationInversion": false | ||
} | ||
}, | ||
"dr": 1, | ||
"tags": { | ||
"key": "value" | ||
} | ||
} |
18 changes: 18 additions & 0 deletions
18
adapters/lora/src/test/resources/payload/chirpStackV4.unknown.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"deduplicationId": "c9dbe358-2578-4fb7-b295-66b44edc45a6", | ||
"time": "2022-07-18T09:33:28.823500726+00:00", | ||
"deviceInfo": { | ||
"tenantId": "52f14cd4-c6f1-4fbd-8f87-4025e1d49242", | ||
"tenantName": "ChirpStack", | ||
"applicationId": "17c82e96-be03-4f38-aef3-f83d48582d97", | ||
"applicationName": "Test application", | ||
"deviceProfileId": "14855bf7-d10d-4aee-b618-ebfcb64dc7ad", | ||
"deviceProfileName": "Test device-profile", | ||
"deviceName": "Test device", | ||
"devEui": "0101010101010101", | ||
"tags": { | ||
"key": "value" | ||
} | ||
}, | ||
"devAddr": "00189440" | ||
} |
18 changes: 18 additions & 0 deletions
18
adapters/lora/src/test/resources/payload/everynet.unknown.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"meta": { | ||
"network": "9e9bf02a", | ||
"packet_hash": "adc6bcac0d06195bc0329c3ef6a2d6ea", | ||
"application": "b3a1067cf7085309", | ||
"time": 1504638900.866375, | ||
"device": "8c30dd074be218cb", | ||
"packet_id": "287f9555a3e8b000ffc8c3c50f60e309", | ||
"gateway": "017e8cd996cd3a0e" | ||
}, | ||
"params": { | ||
"dev_eui": "8c30dd074be218cb", | ||
"dev_addr": "01d6dcd6", | ||
"dev_nonce": "f9e7", | ||
"net_id": "000000" | ||
}, | ||
"type": "join_request" | ||
} |
9 changes: 9 additions & 0 deletions
9
adapters/lora/src/test/resources/payload/firefly.unknown.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"uid": "8a569133-aa44-4d7e-810d-af62faf9f722", | ||
"type": "join_accept", | ||
"received_at": "2016-07-15T14:31:11", | ||
"frame_counter": null, | ||
"for_frame_counter": null, | ||
"direction": "down", | ||
"device_eui": "2564927382738492" | ||
} |
2 changes: 2 additions & 0 deletions
2
adapters/lora/src/test/resources/payload/kerlink-custom-content-type.unknown.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
{ | ||
} |
2 changes: 2 additions & 0 deletions
2
adapters/lora/src/test/resources/payload/kerlink.unknown.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
{ | ||
} |
Oops, something went wrong.