api: Add duty-cycle stats messages + types.

This commit is contained in:
Orne Brocaar
2024-04-03 09:52:00 +01:00
parent 2bb05fba58
commit ac9923e120
8 changed files with 991 additions and 647 deletions

View File

@ -155,6 +155,14 @@ enum MetricKind {
GAUGE = 2;
}
enum Regulation {
// Unknown.
REGULATION_UNKNOWN = 0;
// ETSI EN 300 220.
ETSI_EN_300_220 = 1;
}
message Location {
// Latitude.
double latitude = 1;
@ -221,4 +229,4 @@ message JoinServerContext {
// AppSKey envelope.
KeyEnvelope app_s_key = 2;
}
}

View File

@ -97,6 +97,9 @@ enum TxAckStatus {
// Internal error.
INTERNAL_ERROR = 10;
// Duty-cycle overflow.
DUTY_CYCLE_OVERFLOW = 11;
}
message Modulation {
@ -249,6 +252,9 @@ message GatewayStats {
// Tx packets per status.
map<string, uint32> tx_packets_per_status = 16;
// Duty-cycle statistics (Concentratord only).
DutyCycleStats duty_cycle_stats = 18;
}
message PerModulationCount {
@ -259,6 +265,31 @@ message PerModulationCount {
uint32 count = 2;
}
message DutyCycleStats {
// Implemented regulation.
common.Regulation regulation = 1;
// Bands.
repeated DutyCycleBand bands = 2;
}
message DutyCycleBand {
// Band name.
string name = 1;
// Min frequency for this band.
uint32 frequency_min = 2;
// Max frequency for this band.
uint32 frequency_max = 3;
// Max. allowed load.
google.protobuf.Duration load_max = 4;
// Tracked load (within the window of the regionlation).
google.protobuf.Duration load_tracked = 5;
}
message UplinkRxInfoLegacy {
// Gateway ID.
bytes gateway_id = 1;