mirror of
https://github.com/chirpstack/chirpstack.git
synced 2024-12-24 07:16:42 +00:00
Expose region_config_id in Uplink and Join event.
This commit is contained in:
parent
922a83597f
commit
70e4afae54
8
api/proto/integration/integration.proto
vendored
8
api/proto/integration/integration.proto
vendored
@ -169,6 +169,10 @@ message UplinkEvent {
|
||||
// the AppSKey and that the encryption / decryption of the payloads is
|
||||
// the responsibility of the end-application.
|
||||
common.JoinServerContext join_server_context = 15;
|
||||
|
||||
// Region config ID.
|
||||
// This contains the region config ID which reported the uplink.
|
||||
string region_config_id = 16;
|
||||
}
|
||||
|
||||
// JoinEvent is the message sent when a device joined the network.
|
||||
@ -194,6 +198,10 @@ message JoinEvent {
|
||||
// the AppSKey and that the encryption / decryption of the payloads is
|
||||
// the responsibility of the end-application.
|
||||
common.JoinServerContext join_server_context = 6;
|
||||
|
||||
// Region config ID.
|
||||
// This contains the region config ID which reported the uplink.
|
||||
string region_config_id = 7;
|
||||
}
|
||||
|
||||
// AckEvent is the message sent when a confirmation on a confirmed downlink
|
||||
|
@ -169,6 +169,10 @@ message UplinkEvent {
|
||||
// the AppSKey and that the encryption / decryption of the payloads is
|
||||
// the responsibility of the end-application.
|
||||
common.JoinServerContext join_server_context = 15;
|
||||
|
||||
// Region config ID.
|
||||
// This contains the region config ID which reported the uplink.
|
||||
string region_config_id = 16;
|
||||
}
|
||||
|
||||
// JoinEvent is the message sent when a device joined the network.
|
||||
@ -194,6 +198,10 @@ message JoinEvent {
|
||||
// the AppSKey and that the encryption / decryption of the payloads is
|
||||
// the responsibility of the end-application.
|
||||
common.JoinServerContext join_server_context = 6;
|
||||
|
||||
// Region config ID.
|
||||
// This contains the region config ID which reported the uplink.
|
||||
string region_config_id = 7;
|
||||
}
|
||||
|
||||
// AckEvent is the message sent when a confirmation on a confirmed downlink
|
||||
|
@ -665,6 +665,7 @@ async fn test_lorawan_10_skip_f_cnt() {
|
||||
rx_info: vec![rx_info.clone()],
|
||||
f_cnt: 7,
|
||||
f_port: 1,
|
||||
region_config_id: "eu868".into(),
|
||||
..Default::default()
|
||||
}),
|
||||
assert::f_cnt_up(dev.dev_eui, 8),
|
||||
@ -714,6 +715,7 @@ async fn test_lorawan_10_skip_f_cnt() {
|
||||
rx_info: vec![rx_info.clone()],
|
||||
f_cnt: 0,
|
||||
f_port: 1,
|
||||
region_config_id: "eu868".into(),
|
||||
..Default::default()
|
||||
}),
|
||||
assert::f_cnt_up(dev.dev_eui, 1),
|
||||
@ -983,6 +985,7 @@ async fn test_lorawan_10_uplink() {
|
||||
f_port: 1,
|
||||
dr: 0,
|
||||
data: vec![215, 241, 112, 52],
|
||||
region_config_id: "eu868".into(),
|
||||
..Default::default()
|
||||
}),
|
||||
],
|
||||
@ -1055,6 +1058,7 @@ async fn test_lorawan_10_uplink() {
|
||||
f_port: 1,
|
||||
dr: 10,
|
||||
data: vec![215, 241, 112, 52],
|
||||
region_config_id: "eu868".into(),
|
||||
..Default::default()
|
||||
}),
|
||||
],
|
||||
@ -1134,6 +1138,7 @@ async fn test_lorawan_10_uplink() {
|
||||
f_port: 1,
|
||||
dr: 0,
|
||||
data: vec![215, 241, 112, 52],
|
||||
region_config_id: "eu868".into(),
|
||||
..Default::default()
|
||||
}),
|
||||
],
|
||||
@ -1185,6 +1190,7 @@ async fn test_lorawan_10_uplink() {
|
||||
f_port: 1,
|
||||
dr: 0,
|
||||
data: vec![],
|
||||
region_config_id: "eu868".into(),
|
||||
..Default::default()
|
||||
}),
|
||||
],
|
||||
@ -1237,6 +1243,7 @@ async fn test_lorawan_10_uplink() {
|
||||
dr: 0,
|
||||
confirmed: true,
|
||||
data: vec![215, 241, 112, 52],
|
||||
region_config_id: "eu868".into(),
|
||||
..Default::default()
|
||||
}),
|
||||
assert::downlink_frame(gw::DownlinkFrame {
|
||||
@ -1348,6 +1355,7 @@ async fn test_lorawan_10_uplink() {
|
||||
f_port: 1,
|
||||
dr: 0,
|
||||
confirmed: true,
|
||||
region_config_id: "eu868".into(),
|
||||
..Default::default()
|
||||
}),
|
||||
assert::downlink_frame(gw::DownlinkFrame {
|
||||
@ -1626,6 +1634,7 @@ async fn test_lorawan_10_end_to_end_enc() {
|
||||
session_key_id: "010203".into(),
|
||||
..Default::default()
|
||||
}),
|
||||
region_config_id: "eu868".into(),
|
||||
..Default::default()
|
||||
})],
|
||||
},
|
||||
@ -1680,6 +1689,7 @@ async fn test_lorawan_10_end_to_end_enc() {
|
||||
}),
|
||||
..Default::default()
|
||||
}),
|
||||
region_config_id: "eu868".into(),
|
||||
..Default::default()
|
||||
})],
|
||||
},
|
||||
@ -1743,6 +1753,7 @@ async fn test_lorawan_10_end_to_end_enc() {
|
||||
}),
|
||||
..Default::default()
|
||||
}),
|
||||
region_config_id: "eu868".into(),
|
||||
..Default::default()
|
||||
}),
|
||||
assert::f_cnt_up(dev.dev_eui, 11),
|
||||
@ -1937,6 +1948,7 @@ async fn test_lorawan_11_uplink() {
|
||||
f_port: 1,
|
||||
dr: 0,
|
||||
data: vec![215, 241, 112, 52],
|
||||
region_config_id: "eu868".into(),
|
||||
..Default::default()
|
||||
}),
|
||||
],
|
||||
@ -2016,6 +2028,7 @@ async fn test_lorawan_11_uplink() {
|
||||
f_port: 1,
|
||||
dr: 0,
|
||||
data: vec![215, 241, 112, 52],
|
||||
region_config_id: "eu868".into(),
|
||||
..Default::default()
|
||||
}),
|
||||
],
|
||||
@ -2168,6 +2181,7 @@ async fn test_lorawan_10_rx_delay() {
|
||||
f_port: 1,
|
||||
confirmed: true,
|
||||
dr: 0,
|
||||
region_config_id: "eu868".into(),
|
||||
..Default::default()
|
||||
}),
|
||||
assert::downlink_frame(gw::DownlinkFrame {
|
||||
@ -2289,6 +2303,7 @@ async fn test_lorawan_10_rx_delay() {
|
||||
f_port: 1,
|
||||
confirmed: true,
|
||||
dr: 0,
|
||||
region_config_id: "eu868".into(),
|
||||
..Default::default()
|
||||
}),
|
||||
assert::downlink_frame(gw::DownlinkFrame {
|
||||
@ -2410,6 +2425,7 @@ async fn test_lorawan_10_rx_delay() {
|
||||
f_port: 1,
|
||||
confirmed: true,
|
||||
dr: 0,
|
||||
region_config_id: "eu868".into(),
|
||||
..Default::default()
|
||||
}),
|
||||
assert::downlink_phy_payloads(vec![
|
||||
|
@ -183,6 +183,7 @@ async fn test_js() {
|
||||
}),
|
||||
dev_addr: "01020304".into(),
|
||||
join_server_context: None,
|
||||
region_config_id: "eu868".into(),
|
||||
..Default::default()
|
||||
}),
|
||||
],
|
||||
@ -250,6 +251,7 @@ async fn test_js() {
|
||||
session_key_id: "01020304".into(),
|
||||
..Default::default()
|
||||
}),
|
||||
region_config_id: "eu868".into(),
|
||||
..Default::default()
|
||||
}),
|
||||
],
|
||||
@ -326,6 +328,7 @@ async fn test_js() {
|
||||
}),
|
||||
..Default::default()
|
||||
}),
|
||||
region_config_id: "eu868".into(),
|
||||
..Default::default()
|
||||
}),
|
||||
],
|
||||
|
@ -466,6 +466,7 @@ async fn test_lorawan_10() {
|
||||
data: vec![],
|
||||
rx_info: vec![rx_info.clone()],
|
||||
tx_info: Some(tx_info.clone()),
|
||||
region_config_id: "eu868".into(),
|
||||
..Default::default()
|
||||
}),
|
||||
assert::uplink_event(integration_pb::UplinkEvent {
|
||||
@ -495,6 +496,7 @@ async fn test_lorawan_10() {
|
||||
rssi: -100,
|
||||
wor_channel: 0,
|
||||
}),
|
||||
region_config_id: "eu868".into(),
|
||||
..Default::default()
|
||||
}),
|
||||
assert::no_downlink_frame(),
|
||||
@ -532,6 +534,7 @@ async fn test_lorawan_10() {
|
||||
data: vec![],
|
||||
rx_info: vec![rx_info.clone()],
|
||||
tx_info: Some(tx_info.clone()),
|
||||
region_config_id: "eu868".into(),
|
||||
..Default::default()
|
||||
}),
|
||||
assert::uplink_event(integration_pb::UplinkEvent {
|
||||
@ -562,6 +565,7 @@ async fn test_lorawan_10() {
|
||||
rssi: -100,
|
||||
wor_channel: 0,
|
||||
}),
|
||||
region_config_id: "eu868".into(),
|
||||
..Default::default()
|
||||
}),
|
||||
assert::downlink_frame(gw::DownlinkFrame {
|
||||
@ -658,6 +662,7 @@ async fn test_lorawan_10() {
|
||||
data: vec![],
|
||||
rx_info: vec![rx_info.clone()],
|
||||
tx_info: Some(tx_info.clone()),
|
||||
region_config_id: "eu868".into(),
|
||||
..Default::default()
|
||||
}),
|
||||
assert::uplink_event(integration_pb::UplinkEvent {
|
||||
@ -687,6 +692,7 @@ async fn test_lorawan_10() {
|
||||
rssi: -100,
|
||||
wor_channel: 0,
|
||||
}),
|
||||
region_config_id: "eu868".into(),
|
||||
..Default::default()
|
||||
}),
|
||||
assert::downlink_frame(gw::DownlinkFrame {
|
||||
|
@ -950,6 +950,7 @@ impl Data {
|
||||
} else {
|
||||
None
|
||||
},
|
||||
region_config_id: self.uplink_frame_set.region_config_id.clone(),
|
||||
};
|
||||
|
||||
if !self._is_end_to_end_encrypted() {
|
||||
|
@ -955,6 +955,7 @@ impl JoinRequest {
|
||||
} else {
|
||||
None
|
||||
},
|
||||
region_config_id: self.uplink_frame_set.region_config_id.clone(),
|
||||
};
|
||||
|
||||
integration::join_event(app.id.into(), &dev.variables, &pl).await;
|
||||
|
@ -705,6 +705,7 @@ impl JoinRequest {
|
||||
} else {
|
||||
None
|
||||
},
|
||||
region_config_id: self.uplink_frame_set.region_config_id.clone(),
|
||||
};
|
||||
|
||||
integration::join_event(app.id.into(), &dev.variables, &pl).await;
|
||||
|
Loading…
Reference in New Issue
Block a user