Created
March 20, 2020 15:14
-
-
Save martinloretzzz/a281b0ce1fbb7ce523f12c02a179e4f7 to your computer and use it in GitHub Desktop.
Typescript Definition from The Things Network Http Integration
This file contains hidden or 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
// https://www.thethingsnetwork.org/docs/applications/http/ | |
export interface TTNHttpMessage { | |
app_id: string; | |
dev_id: string; | |
hardware_serial: string; | |
port: number; | |
counter: number; | |
is_retry: boolean; | |
confirmed: boolean; | |
payload_raw: string; | |
payload_fields?: object; | |
metadata: Metadata; | |
} | |
type ISODate = string; | |
interface Metadata { | |
time: ISODate; | |
frequency: number; | |
modulation: "LORA" | "FSK"; | |
data_rate?: string; // if LORA | |
bit_rate?: number; // if FSK | |
coding_rate: string; | |
gateways: Gateway[]; | |
latitude?: number; | |
longitude?: number; | |
altitude?: number; | |
} | |
interface Gateway { | |
gtw_id: string; | |
timestamp: number; | |
time?: ISODate; | |
channel: number; | |
rssi: number; | |
snr: number; | |
rf_chain: number; | |
latitude?: number; | |
longitude?: number; | |
altitude?: number; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment