Add device-profile option to configure region configuration.

By selecting a region configuration, devices using the device-profile
will only stick to the selected region configuration, rather than the
configurations provided by the selected region common-name.

This change also renames the region 'name' option to 'id' in the region
configuration, as well it adds a 'description' to provide a human
readable description, which is used in the drop-down in the UI.

This also fixes the JS API generation. In a previous commit the the
protobuf package was updated, but the latest protobuf compiler no longer
supports generating JS code (this now requires an external plugin). This
has been fixed.

Please note that if you have implemented custom ADR algorithms that are
referring to the 'regionName' key, that you must change this to
'regionConfigId' (see the ADR code example).
This commit is contained in:
Orne Brocaar
2023-01-09 12:04:10 +00:00
parent 6016159c86
commit 103e4298fb
179 changed files with 6247 additions and 3783 deletions

View File

@ -183,6 +183,14 @@ message DeviceProfile {
// keys of the decoded payload. In cases where the decoded payload contains
// random keys in the data, you want to set this to false.
bool auto_detect_measurements = 28;
// Region configuration ID.
// If set, devices will only use the associated region. If let blank, then
// devices will use all regions matching the selected common-name. Note
// that multiple region configurations can exist for the same common-name,
// e.g. to provide an 8 channel and 16 channel configuration for the US915
// band.
string region_config_id = 29;
}
message Measurement {

View File

@ -312,21 +312,24 @@ message ListRegionsResponse {
}
message RegionListItem {
// Name.
string name = 1;
// ID.
string id = 1;
// Region.
common.Region region = 2;
// Description.
string description = 3;
}
message GetRegionRequest {
// Region name.
string name = 1;
// Region ID.
string id = 1;
}
message GetRegionResponse {
// Name.
string name = 1;
// ID.
string id = 1;
// Region.
common.Region region = 2;
@ -354,6 +357,9 @@ message GetRegionResponse {
// Class-B ping-slot frequency.
uint32 class_b_ping_slot_frequency = 10;
// Region description.
string description = 11;
}
message RegionChannel {

View File

@ -135,8 +135,8 @@ message DeviceSession {
// Uplink max. EIRP index.
uint32 uplink_max_eirp_index = 39;
// Region name.
string region_name = 40;
// Region configuration ID.
string region_config_id = 40;
}
message UplinkAdrHistory {

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long