Initial Relay support implementation (TS011).

Closes #59.
This commit is contained in:
Orne Brocaar
2023-05-22 11:04:13 +01:00
parent 513aa7804d
commit cefe61072d
138 changed files with 28259 additions and 5157 deletions

1
api/python/Makefile vendored
View File

@ -38,6 +38,7 @@ api:
$(PROTOC) ${PROTOC_ARGS} chirpstack-api/api/frame_log.proto
$(PROTOC) ${PROTOC_ARGS} chirpstack-api/api/multicast_group.proto
$(PROTOC) ${PROTOC_ARGS} chirpstack-api/api/request_log.proto
$(PROTOC) ${PROTOC_ARGS} chirpstack-api/api/relay.proto
integration:
$(PROTOC) ${PROTOC_ARGS} chirpstack-api/integration/integration.proto

View File

@ -190,6 +190,13 @@ message Device {
// These tags are exposed in the event payloads or to integration. Tags are
// intended for aggregation and filtering.
map<string, string> tags = 9;
// JoinEUI (optional, EUI64).
// This field will be automatically set / updated on OTAA. However, in some
// cases it must be pre-configured. For example to allow OTAA using a Relay.
// In this case the Relay needs to know the JoinEUI + DevEUI combinations
// of the devices for which it needs to forward uplinks.
string join_eui = 10;
}
message DeviceStatus {

View File

@ -41,6 +41,61 @@ enum MeasurementKind {
STRING = 4;
}
enum CadPeriodicity {
// 1 second.
SEC_1 = 0;
// 500 milliseconds
MS_500 = 1;
// 250 milliseconds
MS_250 = 2;
// 100 milliseconds
MS_100 = 3;
// 50 milliseconds
MS_50 = 4;
// 20 milliseconds
MS_20 = 5;
}
enum SecondChAckOffset {
// 0 kHz.
KHZ_0 = 0;
// 200 kHz.
KHZ_200 = 1;
// 400 kHz.
KHZ_400 = 2;
// 800 kHz.
KHZ_800 = 3;
// 1600 kHz.
KHZ_1600 = 4;
// 3200 kHz.
KHZ_3200 = 5;
}
enum RelayModeActivation {
// Disable the relay mode.
DISABLE_RELAY_MODE = 0;
// Enable the relay model.
ENABLE_RELAY_MODE = 1;
// Dynamic.
DYNAMIC = 2;
// End-device controlled.
END_DEVICE_CONTROLLED = 3;
}
// DeviceProfileService is the service providing API methods for managing device-profiles.
service DeviceProfileService {
// Create the given device-profile.
@ -195,6 +250,154 @@ message DeviceProfile {
// e.g. to provide an 8 channel and 16 channel configuration for the US915
// band.
string region_config_id = 29;
// Device is a Relay device.
// Enable this in case the device is a Relay. A Relay device implements TS011
// and is able to relay data from relay capable devices.
// See for more information the TS011 specification.
bool is_relay = 30;
// Device is a Relay end-device.
// Enable this in case the device is an end-device that can operate under a
// Relay. Please refer to the TS011 specification for more information.
bool is_relay_ed = 31;
// End-device only accept data through relay.
// Only accept data for this device through a relay. This setting is useful
// for testing as in case of a test-setup, the end-device is usually within
// range of the gateway.
bool relay_ed_relay_only = 32;
// Relay must be enabled.
bool relay_enabled = 33;
// Relay CAD periodicity.
CadPeriodicity relay_cad_periodicity = 34;
// Relay default channel index.
// Valid values are 0 and 1, please refer to the RP002 specification for
// the meaning of these values.
uint32 relay_default_channel_index = 35;
// Relay second channel frequency (Hz).
uint32 relay_second_channel_freq = 36;
// Relay second channel DR.
uint32 relay_second_channel_dr = 37;
// Relay second channel ACK offset.
SecondChAckOffset relay_second_channel_ack_offset = 38;
// Relay end-device activation mode.
RelayModeActivation relay_ed_activation_mode = 39;
// Relay end-device smart-enable level.
uint32 relay_ed_smart_enable_level = 40;
// Relay end-device back-off (in case it does not receive WOR ACK frame).
// 0 = Always send a LoRaWAN uplink
// 1..63 = Send a LoRaWAN uplink after X WOR frames without a WOR ACK
uint32 relay_ed_back_off = 41;
// Relay end-device uplink limit bucket size.
//
// This field indicates the multiplier to determine the bucket size
// according to the following formula:
// BucketSize TOKEN = _reload_rate x _bucket_size
//
// Valid values (0 - 3):
// 0 = 1
// 1 = 2
// 2 = 4
// 3 = 12
uint32 relay_ed_uplink_limit_bucket_size = 42;
// Relay end-device uplink limit reload rate.
//
// Valid values:
// * 0 - 62 = X tokens every hour
// * 63 = no limitation
uint32 relay_ed_uplink_limit_reload_rate = 43;
// Relay join-request limit reload rate.
//
// Valid values:
// * 0 - 126 = X tokens every hour
// * 127 = no limitation
uint32 relay_join_req_limit_reload_rate = 44;
// Relay notify limit reload rate.
//
// Valid values:
// * 0 - 126 = X tokens every hour
// * 127 = no limitation
uint32 relay_notify_limit_reload_rate = 45;
// Relay global uplink limit reload rate.
//
// Valid values:
// * 0 - 126 = X tokens every hour
// * 127 = no limitation
uint32 relay_global_uplink_limit_reload_rate = 46;
// Relay overall limit reload rate.
//
// Valid values:
// * 0 - 126 = X tokens every hour
// * 127 = no limitation
uint32 relay_overall_limit_reload_rate = 47;
// Relay join-request limit bucket size.
//
// This field indicates the multiplier to determine the bucket size
// according to the following formula:
// BucketSize TOKEN = _reload_rate x _bucket_size
//
// Valid values (0 - 3):
// 0 = 1
// 1 = 2
// 2 = 4
// 3 = 12
uint32 relay_join_req_limit_bucket_size = 48;
// Relay notify limit bucket size.
//
// This field indicates the multiplier to determine the bucket size
// according to the following formula:
// BucketSize TOKEN = _reload_rate x _bucket_size
//
// Valid values (0 - 3):
// 0 = 1
// 1 = 2
// 2 = 4
// 3 = 12
uint32 relay_notify_limit_bucket_size = 49;
// Relay globak uplink limit bucket size.
//
// This field indicates the multiplier to determine the bucket size
// according to the following formula:
// BucketSize TOKEN = _reload_rate x _bucket_size
//
// Valid values (0 - 3):
// 0 = 1
// 1 = 2
// 2 = 4
// 3 = 12
uint32 relay_global_uplink_limit_bucket_size = 50;
// Relay overall limit bucket size.
//
// This field indicates the multiplier to determine the bucket size
// according to the following formula:
// BucketSize TOKEN = _reload_rate x _bucket_size
//
// Valid values (0 - 3):
// 0 = 1
// 1 = 2
// 2 = 4
// 3 = 12
uint32 relay_overall_limit_bucket_size = 51;
}
message Measurement {

View File

@ -34,8 +34,11 @@ message UplinkFrameLog {
// Time.
google.protobuf.Timestamp time = 7;
// Plaintext mac-commands.
bool plaintext_mac_commands = 8;
// Plaintext f_opts mac-commands.
bool plaintext_f_opts = 8;
// Plaintext frm_payload.
bool plaintext_frm_payload = 9;
}
message DownlinkFrameLog {
@ -63,6 +66,9 @@ message DownlinkFrameLog {
// Device EUI (optional).
string dev_eui = 8;
// Plaintext mac-commands.
bool plaintext_mac_commands = 9;
// Plaintext f_opts mac-commands.
bool plaintext_f_opts = 9;
// Plaintext frm_payload.
bool plaintext_frm_payload = 10;
}

View File

@ -0,0 +1,119 @@
syntax = "proto3";
package api;
option go_package = "github.com/chirpstack/chirpstack/api/go/v4/api";
option java_package = "io.chirpstack.api";
option java_multiple_files = true;
option java_outer_classname = "RelayProto";
option csharp_namespace = "Chirpstack.Api";
import "google/api/annotations.proto";
import "google/protobuf/timestamp.proto";
import "google/protobuf/empty.proto";
// RelayService is the service providing API methos for managing relays.
service RelayService {
// List lists the relays for the given application id.
rpc List(ListRelaysRequest) returns (ListRelaysResponse) {
option(google.api.http) = {
get: "/api/relays"
};
}
// AddDevice adds the given device to the relay.
rpc AddDevice(AddRelayDeviceRequest) returns (google.protobuf.Empty) {
option(google.api.http) = {
post: "/api/relays/{relay_dev_eui}/devices"
body: "*"
};
}
// RemoveDevice removes the given device from the relay.
rpc RemoveDevice(RemoveRelayDeviceRequest) returns (google.protobuf.Empty) {
option(google.api.http) = {
delete: "/api/relays/{relay_dev_eui}/devices/{dev_eui}"
};
};
// ListDevices lists the devices for the given relay.
rpc ListDevices(ListRelayDevicesRequest) returns (ListRelayDevicesResponse) {
option(google.api.http) = {
get: "/api/relays/{relay_dev_eui}/devices"
};
};
}
message RelayListItem {
// DevEUI (EUI64).
string dev_eui = 1;
// Name.
string name = 2;
}
message ListRelaysRequest {
// Max number of devices to return in the result-set.
uint32 limit = 1;
// Offset in the result-set (for pagination).
uint32 offset = 2;
// Application ID (UUID).
string application_id = 3;
}
message ListRelaysResponse {
// Total number of relays.
uint32 total_count = 1;
// Result-set.
repeated RelayListItem result = 2;
}
message AddRelayDeviceRequest {
// Relay DevEUI (EUI64).
string relay_dev_eui = 1;
// Device DevEUI (EUI64).
string device_dev_eui = 2;
}
message RemoveRelayDeviceRequest {
// Relay DevEUI (EUI64).
string relay_dev_eui = 1;
// Device DevEUI (EUI64).
string device_dev_eui = 2;
}
message ListRelayDevicesRequest {
// Max number of multicast groups to return in the result-set.
uint32 limit = 1;
// Offset in the result-set (for pagination).
uint32 offset = 2;
// Relay DevEUI (EUI64).
string relay_dev_eui = 3;
}
message RelayDeviceListItem {
// DevEUI (EUI64).
string dev_eui = 1;
// Created at timestamp.
google.protobuf.Timestamp created_at = 2;
// Device name.
string name = 3;
}
message ListRelayDevicesResponse {
// Total number of devices.
uint32 total_count = 1;
// Result-set.
repeated RelayDeviceListItem result = 2;
}

File diff suppressed because it is too large Load Diff

View File

@ -14,288 +14,319 @@ import "google/protobuf/timestamp.proto";
import "google/protobuf/struct.proto";
enum LogLevel {
// Info.
INFO = 0;
// Info.
INFO = 0;
// Warning.
WARNING = 1;
// Warning.
WARNING = 1;
// Error.
ERROR = 2;
// Error.
ERROR = 2;
}
enum LogCode {
// Unknown type.
UNKNOWN = 0;
// Unknown type.
UNKNOWN = 0;
// Error related to the downlink payload size.
// Usually seen when the payload exceeded the maximum allowed payload size.
DOWNLINK_PAYLOAD_SIZE = 1;
// Error related to the downlink payload size.
// Usually seen when the payload exceeded the maximum allowed payload size.
DOWNLINK_PAYLOAD_SIZE = 1;
// Uplink codec error.
UPLINK_CODEC = 2;
// Uplink codec error.
UPLINK_CODEC = 2;
// Downlink codec error.
DOWNLINK_CODEC = 3;
// Downlink codec error.
DOWNLINK_CODEC = 3;
// OTAA error.
OTAA = 4;
// OTAA error.
OTAA = 4;
// Uplink frame-counter was reset.
UPLINK_F_CNT_RESET = 5;
// Uplink frame-counter was reset.
UPLINK_F_CNT_RESET = 5;
// Uplink MIC error.
UPLINK_MIC = 6;
// Uplink MIC error.
UPLINK_MIC = 6;
// Uplink frame-counter retransmission.
UPLINK_F_CNT_RETRANSMISSION = 7;
// Uplink frame-counter retransmission.
UPLINK_F_CNT_RETRANSMISSION = 7;
// Downlink gateway error.
DOWNLINK_GATEWAY = 8;
// Downlink gateway error.
DOWNLINK_GATEWAY = 8;
// Relay new end-device.
RELAY_NEW_END_DEVICE = 9;
}
// Device information.
message DeviceInfo {
// Tenant ID (UUID).
string tenant_id = 1;
// Tenant ID (UUID).
string tenant_id = 1;
// Tenant name.
string tenant_name = 2;
// Tenant name.
string tenant_name = 2;
// Application ID (UUID).
string application_id = 3;
// Application ID (UUID).
string application_id = 3;
// Application name.
string application_name = 4;
// Application name.
string application_name = 4;
// Device-profile ID (UUID).
string device_profile_id = 5;
// Device-profile ID (UUID).
string device_profile_id = 5;
// Device-profile name.
string device_profile_name = 6;
// Device-profile name.
string device_profile_name = 6;
// Device name.
string device_name = 7;
// Device name.
string device_name = 7;
// Device EUI.
string dev_eui = 8;
// Device EUI.
string dev_eui = 8;
// Device-profile and device tags.
map<string, string> tags = 9;
// Device-profile and device tags.
map<string, string> tags = 9;
}
// Uplink relay RX information.
message UplinkRelayRxInfo {
// Relay DevEUI.
string dev_eui = 1;
// Frequency.
uint32 frequency = 2;
// Data-rate.
uint32 dr = 3;
// SNR.
int32 snr = 4;
// RSSI.
int32 rssi = 5;
// WOR channel.
uint32 wor_channel = 6;
}
// UplinkEvent is the message sent when an uplink payload has been received.
message UplinkEvent {
// Deduplication ID (UUID).
string deduplication_id = 1;
// Deduplication ID (UUID).
string deduplication_id = 1;
// Timestamp.
google.protobuf.Timestamp time = 2;
// Timestamp.
google.protobuf.Timestamp time = 2;
// Device information.
DeviceInfo device_info = 3;
// Device information.
DeviceInfo device_info = 3;
// Device address.
string dev_addr = 4;
// Device address.
string dev_addr = 4;
// Device has ADR bit set.
bool adr = 5;
// Device has ADR bit set.
bool adr = 5;
// Data-rate.
uint32 dr = 6;
// Data-rate.
uint32 dr = 6;
// Frame counter.
uint32 f_cnt = 7;
// Frame counter.
uint32 f_cnt = 7;
// Frame port.
uint32 f_port = 8;
// Frame port.
uint32 f_port = 8;
// Uplink was of type confirmed.
bool confirmed = 9;
// Uplink was of type confirmed.
bool confirmed = 9;
// FRMPayload data.
bytes data = 10;
// FRMPayload data.
bytes data = 10;
// Note that this is only set when a codec is configured in the Device Profile.
google.protobuf.Struct object = 11;
// Note that this is only set when a codec is configured in the Device
// Profile.
google.protobuf.Struct object = 11;
// Receiving gateway RX info.
repeated gw.UplinkRxInfo rx_info = 12;
// Receiving gateway RX info.
repeated gw.UplinkRxInfo rx_info = 12;
// TX info.
gw.UplinkTxInfo tx_info = 13;
// TX info.
gw.UplinkTxInfo tx_info = 13;
// Relay info.
UplinkRelayRxInfo relay_rx_info = 14;
}
// JoinEvent is the message sent when a device joined the network.
// Note: this event is sent at the first uplink after OTAA.
message JoinEvent {
// Deduplication ID (UUID).
string deduplication_id = 1;
// Deduplication ID (UUID).
string deduplication_id = 1;
// Timestamp.
google.protobuf.Timestamp time = 2;
// Timestamp.
google.protobuf.Timestamp time = 2;
// Device info.
DeviceInfo device_info = 3;
// Device info.
DeviceInfo device_info = 3;
// Device address.
string dev_addr = 4;
// Device address.
string dev_addr = 4;
// Relay info.
UplinkRelayRxInfo relay_rx_info = 5;
}
// AckEvent is the message sent when a confirmation on a confirmed downlink
// has been received -or- when the downlink timed out.
message AckEvent {
// Deduplication ID (UUID).
string deduplication_id = 1;
// Deduplication ID (UUID).
string deduplication_id = 1;
// Timestamp.
google.protobuf.Timestamp time = 2;
// Timestamp.
google.protobuf.Timestamp time = 2;
// Device info.
DeviceInfo device_info = 3;
// Device info.
DeviceInfo device_info = 3;
// Downlink queue item ID (UUID).
string queue_item_id = 4;
// Downlink queue item ID (UUID).
string queue_item_id = 4;
// Frame was acknowledged.
bool acknowledged = 5;
// Frame was acknowledged.
bool acknowledged = 5;
// Downlink frame counter to which the acknowledgement relates.
uint32 f_cnt_down = 6;
// Downlink frame counter to which the acknowledgement relates.
uint32 f_cnt_down = 6;
}
// TxAckEvent is the message sent when a downlink was acknowledged by the gateway
// for transmission. As a downlink can be scheduled in the future, this event
// does not confirm that the message has already been transmitted.
// TxAckEvent is the message sent when a downlink was acknowledged by the
// gateway for transmission. As a downlink can be scheduled in the future, this
// event does not confirm that the message has already been transmitted.
message TxAckEvent {
// Downlink ID.
uint32 downlink_id = 1;
// Downlink ID.
uint32 downlink_id = 1;
// Timestamp.
google.protobuf.Timestamp time = 2;
// Timestamp.
google.protobuf.Timestamp time = 2;
// Device info.
DeviceInfo device_info = 3;
// Device info.
DeviceInfo device_info = 3;
// Downlink queue item ID (UUID).
string queue_item_id = 4;
// Downlink queue item ID (UUID).
string queue_item_id = 4;
// Downlink frame-counter.
uint32 f_cnt_down = 5;
// Downlink frame-counter.
uint32 f_cnt_down = 5;
// Gateway ID.
string gateway_id = 6;
// Gateway ID.
string gateway_id = 6;
// TX info.
gw.DownlinkTxInfo tx_info = 7;
// TX info.
gw.DownlinkTxInfo tx_info = 7;
}
// LogEvent is the message sent when a device-related log was sent.
message LogEvent {
// Timestamp.
google.protobuf.Timestamp time = 1;
// Timestamp.
google.protobuf.Timestamp time = 1;
// Device info.
DeviceInfo device_info = 2;
// Device info.
DeviceInfo device_info = 2;
// Log level.
LogLevel level = 3;
// Log level.
LogLevel level = 3;
// Log code.
LogCode code = 4;
// Log code.
LogCode code = 4;
// Description message.
string description = 5;
// Description message.
string description = 5;
// Context map.
map<string, string> context = 6;
// Context map.
map<string, string> context = 6;
}
// StatusEvent is the message sent when a device-status mac-command was sent
// by the device.
message StatusEvent {
// Deduplication ID (UUID).
string deduplication_id = 1;
// Deduplication ID (UUID).
string deduplication_id = 1;
// Timestamp.
google.protobuf.Timestamp time = 2;
// Timestamp.
google.protobuf.Timestamp time = 2;
// Device info.
DeviceInfo device_info = 3;
// Device info.
DeviceInfo device_info = 3;
// The demodulation signal-to-noise ratio in dB for the last successfully
// received device-status request by the Network Server.
int32 margin = 5;
// The demodulation signal-to-noise ratio in dB for the last successfully
// received device-status request by the Network Server.
int32 margin = 5;
// Device is connected to an external power source.
bool external_power_source = 6;
// Device is connected to an external power source.
bool external_power_source = 6;
// Battery level is not available.
bool battery_level_unavailable = 7;
// Battery level is not available.
bool battery_level_unavailable = 7;
// Battery level.
float battery_level = 8;
// Battery level.
float battery_level = 8;
}
// LocationEvent is the message sent when a geolocation resolve was returned.
message LocationEvent {
// Deduplication ID (UUID).
string deduplication_id = 1;
// Deduplication ID (UUID).
string deduplication_id = 1;
// Timestamp.
google.protobuf.Timestamp time = 2;
// Timestamp.
google.protobuf.Timestamp time = 2;
// Device info.
DeviceInfo device_info = 3;
// Device info.
DeviceInfo device_info = 3;
// Location.
common.Location location = 4;
// Location.
common.Location location = 4;
}
// IntegrationEvent is the message that can be sent by an integration.
// It allows for sending events which are provided by an external integration
// which are "not native" to ChirpStack.
message IntegrationEvent {
// Deduplication ID (UUID).
string deduplication_id = 1;
// Deduplication ID (UUID).
string deduplication_id = 1;
// Timestamp.
google.protobuf.Timestamp time = 2;
// Timestamp.
google.protobuf.Timestamp time = 2;
// Device info.
DeviceInfo device_info = 3;
// Device info.
DeviceInfo device_info = 3;
// Integration name.
string integration_name = 4;
// Integration name.
string integration_name = 4;
// Event type.
string event_type = 5;
// Event type.
string event_type = 5;
// Struct containing the event object.
google.protobuf.Struct object = 6;
// Struct containing the event object.
google.protobuf.Struct object = 6;
}
// DownlinkCommand is the command to enqueue a downlink payload for the given
// device.
message DownlinkCommand {
// ID (UUID).
// If left blank, a random UUID will be generated.
string id = 1;
// ID (UUID).
// If left blank, a random UUID will be generated.
string id = 1;
// Device EUI (EUI64).
string dev_eui = 2;
// Device EUI (EUI64).
string dev_eui = 2;
// Confirmed.
bool confirmed = 3;
// Confirmed.
bool confirmed = 3;
// FPort (must be > 0).
uint32 f_port = 4;
// FPort (must be > 0).
uint32 f_port = 4;
// Data.
// Or use the json_object field when a codec has been configured.
bytes data = 5;
// Data.
// Or use the json_object field when a codec has been configured.
bytes data = 5;
// Only use this when a codec has been configured that can encode this
// object to bytes.
google.protobuf.Struct object = 6;
// Only use this when a codec has been configured that can encode this
// object to bytes.
google.protobuf.Struct object = 6;
}

View File

@ -7,272 +7,403 @@ import "chirpstack-api/gw/gw.proto";
import "google/protobuf/timestamp.proto";
message DeviceSession {
// Device EUI.
bytes dev_eui = 1;
// Device EUI.
bytes dev_eui = 1;
// Device address.
bytes dev_addr = 2;
// Device address.
bytes dev_addr = 2;
// Join EUI.
bytes join_eui = 3;
// Join EUI.
bytes join_eui = 3;
// LoRaWAN mac-version.
common.MacVersion mac_version = 4;
// LoRaWAN mac-version.
common.MacVersion mac_version = 4;
// FNwkSIntKey.
bytes f_nwk_s_int_key = 5;
// FNwkSIntKey.
bytes f_nwk_s_int_key = 5;
// SNwkSIntKey.
bytes s_nwk_s_int_key = 6;
// SNwkSIntKey.
bytes s_nwk_s_int_key = 6;
// NwkSEncKey.
bytes nwk_s_enc_key = 7;
// NwkSEncKey.
bytes nwk_s_enc_key = 7;
// AppSKey envelope.
common.KeyEnvelope app_s_key = 8;
// AppSKey envelope.
common.KeyEnvelope app_s_key = 8;
// Uplink frame-counter.
uint32 f_cnt_up = 9;
// Uplink frame-counter.
uint32 f_cnt_up = 9;
// Downlink frame-counter (ns).
uint32 n_f_cnt_down = 10;
// Downlink frame-counter (ns).
uint32 n_f_cnt_down = 10;
// Downlink frame-counter (as).
uint32 a_f_cnt_down = 11;
// Downlink frame-counter (as).
uint32 a_f_cnt_down = 11;
// Frame-counter holding the last confirmed downlink frame (n_f_cnt_down or a_f_cnt_down).
uint32 conf_f_cnt = 12;
// Frame-counter holding the last confirmed downlink frame (n_f_cnt_down or
// a_f_cnt_down).
uint32 conf_f_cnt = 12;
// Skip uplink frame-counter validation.
bool skip_f_cnt_check = 13;
// Skip uplink frame-counter validation.
bool skip_f_cnt_check = 13;
// RX1 delay.
uint32 rx1_delay = 14;
// RX1 delay.
uint32 rx1_delay = 14;
// RX1 data-rate offset.
uint32 rx1_dr_offset = 15;
// RX1 data-rate offset.
uint32 rx1_dr_offset = 15;
// RX2 data-rate.
uint32 rx2_dr = 16;
// RX2 data-rate.
uint32 rx2_dr = 16;
// RX2 frequency.
uint32 rx2_frequency = 17;
// RX2 frequency.
uint32 rx2_frequency = 17;
// Enabled uplink channels.
repeated uint32 enabled_uplink_channel_indices = 18;
// Enabled uplink channels.
repeated uint32 enabled_uplink_channel_indices = 18;
// Extra user-defined uplink channels.
map<uint32, DeviceSessionChannel> extra_uplink_channels = 19;
// Extra user-defined uplink channels.
map<uint32, DeviceSessionChannel> extra_uplink_channels = 19;
// Class-B ping-slot data-rate.
uint32 class_b_ping_slot_dr = 20;
// Class-B ping-slot data-rate.
uint32 class_b_ping_slot_dr = 20;
// Class-B ping-slot frequency.
uint32 class_b_ping_slot_freq = 21;
// Class-B ping-slot frequency.
uint32 class_b_ping_slot_freq = 21;
// Class-B ping-slot nb.
uint32 class_b_ping_slot_nb = 22;
// Class-B ping-slot nb.
uint32 class_b_ping_slot_nb = 22;
// Nb. transmissions.
uint32 nb_trans = 23;
// Nb. transmissions.
uint32 nb_trans = 23;
// TXPowerIndex which the node is using. The possible values are defined
// by the lorawan/band package and are region specific. By default it is
// assumed that the node is using TXPower 0. This value is controlled by
// the ADR engine.
uint32 tx_power_index = 24;
// TXPowerIndex which the node is using. The possible values are defined
// by the lorawan/band package and are region specific. By default it is
// assumed that the node is using TXPower 0. This value is controlled by
// the ADR engine.
uint32 tx_power_index = 24;
// DR defines the (last known) data-rate at which the node is operating.
// This value is controlled by the ADR engine.
uint32 dr = 25;
// DR defines the (last known) data-rate at which the node is operating.
// This value is controlled by the ADR engine.
uint32 dr = 25;
// ADR defines if the device has ADR enabled.
bool adr = 26;
// ADR defines if the device has ADR enabled.
bool adr = 26;
// MaxSupportedTXPowerIndex defines the maximum supported tx-power index
// by the node, or 0 when not set.
uint32 max_supported_tx_power_index = 27;
// MaxSupportedTXPowerIndex defines the maximum supported tx-power index
// by the node, or 0 when not set.
uint32 max_supported_tx_power_index = 27;
// MinSupportedTXPowerIndex defines the minimum supported tx-power index
// by the node (default 0).
uint32 min_supported_tx_power_index = 28;
// MinSupportedTXPowerIndex defines the minimum supported tx-power index
// by the node (default 0).
uint32 min_supported_tx_power_index = 28;
// Pending rejoin device-session contains a device-session which has not
// yet been activated by the device (by sending a first uplink).
DeviceSession pending_rejoin_device_session = 29;
// Pending rejoin device-session contains a device-session which has not
// yet been activated by the device (by sending a first uplink).
DeviceSession pending_rejoin_device_session = 29;
// Uplink history for ADR (last 20 uplink transmissions).
repeated UplinkAdrHistory uplink_adr_history = 30;
// Uplink history for ADR (last 20 uplink transmissions).
repeated UplinkAdrHistory uplink_adr_history = 30;
// Mac-command error count.
map<uint32, uint32> mac_command_error_count = 31;
// Mac-command error count.
map<uint32, uint32> mac_command_error_count = 31;
// Last device-status request.
google.protobuf.Timestamp last_device_status_request = 32;
// Last device-status request.
google.protobuf.Timestamp last_device_status_request = 32;
// RejoinRequestEnabled defines if the rejoin-request is enabled on the
// device.
bool rejoin_request_enabled = 33;
// RejoinRequestEnabled defines if the rejoin-request is enabled on the
// device.
bool rejoin_request_enabled = 33;
// RejoinRequestMaxCountN defines the 2^(C+4) uplink message interval for
// the rejoin-request.
uint32 rejoin_request_max_count_n = 34;
// RejoinRequestMaxCountN defines the 2^(C+4) uplink message interval for
// the rejoin-request.
uint32 rejoin_request_max_count_n = 34;
// RejoinRequestMaxTimeN defines the 2^(T+10) time interval (seconds)
// for the rejoin-request.
uint32 rejoin_request_max_time_n = 35;
// RejoinRequestMaxTimeN defines the 2^(T+10) time interval (seconds)
// for the rejoin-request.
uint32 rejoin_request_max_time_n = 35;
// Rejoin counter (RJCount0).
// This counter is reset to 0 after each successful join-accept.
uint32 rejoin_count_0 = 36;
// Rejoin counter (RJCount0).
// This counter is reset to 0 after each successful join-accept.
uint32 rejoin_count_0 = 36;
// Uplink dwell time.
bool uplink_dwell_time_400ms = 37;
// Uplink dwell time.
bool uplink_dwell_time_400ms = 37;
// Downlink dwell time.
bool downlink_dwell_time_400ms = 38;
// Downlink dwell time.
bool downlink_dwell_time_400ms = 38;
// Uplink max. EIRP index.
uint32 uplink_max_eirp_index = 39;
// Uplink max. EIRP index.
uint32 uplink_max_eirp_index = 39;
// Region configuration ID.
string region_config_id = 40;
// Region configuration ID.
string region_config_id = 40;
// Relay state.
Relay relay = 41;
}
message UplinkAdrHistory {
// Uplink frame-counter.
uint32 f_cnt = 1;
// Uplink frame-counter.
uint32 f_cnt = 1;
// Max SNR (of deduplicated frames received by one or multiple gateways).
float max_snr = 2;
// Max SNR (of deduplicated frames received by one or multiple gateways).
float max_snr = 2;
// Max RSSI.
int32 max_rssi = 5;
// Max RSSI.
int32 max_rssi = 5;
// TX Power (as known by the network-server).
uint32 tx_power_index = 3;
// TX Power (as known by the network-server).
uint32 tx_power_index = 3;
// Number of receiving gateways.
uint32 gateway_count = 4;
// Number of receiving gateways.
uint32 gateway_count = 4;
}
message Relay {
// Devices provisioned on the relay.
repeated RelayDevice devices = 1;
// Filter list.
repeated RelayFilter filters = 2;
// Relay is enabled.
bool enabled = 3;
// CAD periodicity.
uint32 cad_periodicity = 4;
// Default channel index.
uint32 default_channel_index = 5;
// Second channel freq.
uint32 second_channel_freq = 6;
// Second channel DR.
uint32 second_channel_dr = 7;
// Second channel ACK offset.
uint32 second_channel_ack_offset = 8;
// End-device activation mode.
uint32 ed_activation_mode = 9;
// End-device smart-enable level.
uint32 ed_smart_enable_level = 10;
// End-device back-off.
uint32 ed_back_off = 11;
// Join-request limit reload rate.
uint32 join_req_limit_reload_rate = 12;
// Notify limit reload rate.
uint32 notify_limit_reload_rate = 13;
// Global uplink limit reload rate.
uint32 global_uplink_limit_reload_rate = 14;
// Overall limit reload rate.
uint32 overall_limit_reload_rate = 15;
// Join-request limit bucket size.
uint32 join_req_limit_bucket_size = 16;
// Notify limit bucket size.
uint32 notify_limit_bucket_size = 17;
// Global uplink limit bucket size.
uint32 global_uplink_limit_bucket_size = 18;
// Overall limit bucket size.
uint32 overall_limit_bucket_size = 19;
// End-device must communicate through relay only.
// This is stored in the device-session as we need to validate on retrieving
// the device-session.
bool ed_relay_only = 20;
// End-device WFCnt.
// This holds the last known WFCnt value. ChirpStack will periodically read
// this value from the Relay.
uint32 w_f_cnt = 21;
}
message RelayDevice {
// Index (used for filter and uplink filters).
// This must be between 0 - 15.
uint32 index = 1;
// JoinEUI (EUI64).
bytes join_eui = 2;
// DevEUI (EUI64).
bytes dev_eui = 3;
// DevAddr.
bytes dev_addr = 4;
// RootWorSKey.
bytes root_wor_s_key = 5;
// Provisioned.
bool provisioned = 6;
// Uplink limit bucket size.
uint32 uplink_limit_bucket_size = 7;
// Uplink limit reload rate.
uint32 uplink_limit_reload_rate = 8;
// Timestamp of the last WFCnt request.
// Note that ChirpStack periodically requests the WFCnt from the relay.
google.protobuf.Timestamp w_f_cnt_last_request = 9;
}
message RelayFilter {
// Index.
// This must be between 0 - 15.
uint32 index = 1;
// Action.
// * 0: No Rule
// * 1: Forward
// * 2: Filter
uint32 action = 2;
// DevEUI (EUI64).
bytes dev_eui = 3;
// JoinEUI (EUI64).
bytes join_eui = 4;
// Provisioned.
bool provisioned = 5;
}
message DeviceSessionChannel {
// Frequency Hz.
uint32 frequency = 1;
// Frequency Hz.
uint32 frequency = 1;
// Min. data-rate.
uint32 min_dr = 2;
// Min. data-rate.
uint32 min_dr = 2;
// Max. data-rate.
uint32 max_dr = 3;
// Max. data-rate.
uint32 max_dr = 3;
}
message DeviceGatewayRxInfo {
// DevEUI (EUI64).
bytes dev_eui = 1;
// DevEUI (EUI64).
bytes dev_eui = 1;
// Data-rate.
uint32 dr = 2;
// Data-rate.
uint32 dr = 2;
// Gateway RxInfo elements.
repeated DeviceGatewayRxInfoItem items = 3;
// Gateway RxInfo elements.
repeated DeviceGatewayRxInfoItem items = 3;
}
message DeviceGatewayRxInfoItem {
// Gateway ID (EUI64).
bytes gateway_id = 1;
// Gateway ID (EUI64).
bytes gateway_id = 1;
// RSSI.
int32 rssi = 2;
// RSSI.
int32 rssi = 2;
// LoRa SNR.
float lora_snr = 3;
// LoRa SNR.
float lora_snr = 3;
// Antenna.
uint32 antenna = 4;
// Antenna.
uint32 antenna = 4;
// Board.
uint32 board = 5;
// Board.
uint32 board = 5;
// Context blob.
bytes context = 6;
// Context blob.
bytes context = 6;
// Gateway is private (uplink).
bool is_private_up = 7;
// Gateway is private (uplink).
bool is_private_up = 7;
// Gateway is private (downlink).
bool is_private_down = 8;
// Gateway is private (downlink).
bool is_private_down = 8;
// Tenant ID (UUID).
bytes tenant_id = 9;
// Tenant ID (UUID).
bytes tenant_id = 9;
}
message DownlinkFrame {
// Downlink ID.
uint32 downlink_id = 1;
// Downlink ID.
uint32 downlink_id = 1;
// DevEUI.
bytes dev_eui = 2;
// DevEUI.
bytes dev_eui = 2;
// Device queue item ID.
bytes device_queue_item_id = 3;
// Device queue item ID.
bytes device_queue_item_id = 3;
// Multicast Group ID.
bytes multicast_group_id = 4;
// Multicast Group ID.
bytes multicast_group_id = 4;
// Multicast queue item ID.
bytes multicast_group_queue_item_id = 5;
// Multicast queue item ID.
bytes multicast_group_queue_item_id = 5;
// Downlink frames.
gw.DownlinkFrame downlink_frame = 6;
// Downlink frames.
gw.DownlinkFrame downlink_frame = 6;
// Encrypted FOpts (LoRaWAN 1.1).
bool encrypted_fopts = 8;
// Encrypted FOpts (LoRaWAN 1.1).
bool encrypted_fopts = 8;
// Network session encryption key (for FOpts and FRMPayload mac-commands).
bytes nwk_s_enc_key = 9;
// Network session encryption key (for FOpts and FRMPayload mac-commands).
bytes nwk_s_enc_key = 9;
// NFCntDown (for decrypting mac-commands).
uint32 n_f_cnt_down = 10;
// NFCntDown (for decrypting mac-commands).
uint32 n_f_cnt_down = 10;
// AFCntDown (for decrypting FRMPayload in case of Relay).
uint32 a_f_cnt_down = 11;
// DevEUI of relayed device.
bytes dev_eui_relayed = 12;
}
message LoraCloudGeolocBuffer {
// Uplinks in buffer.
repeated LoraCloudGeolocBufferUplink uplinks = 1;
// Uplinks in buffer.
repeated LoraCloudGeolocBufferUplink uplinks = 1;
}
message LoraCloudGeolocBufferUplink {
// RxInfo set for a single uplink.
repeated gw.UplinkRxInfo rx_info = 1;
// RxInfo set for a single uplink.
repeated gw.UplinkRxInfo rx_info = 1;
}
message PassiveRoamingDeviceSession {
// Session ID (UUID).
// Unfortunately we can not use the DevEUI as unique identifier
// as the PRStartAns DevEUI field is optional.
bytes session_id = 1;
// Session ID (UUID).
// Unfortunately we can not use the DevEUI as unique identifier
// as the PRStartAns DevEUI field is optional.
bytes session_id = 1;
// NetID of the hNS.
bytes net_id = 2;
// DevAddr of the device.
bytes dev_addr = 3;
// NetID of the hNS.
bytes net_id = 2;
// DevEUI of the device (optional).
bytes dev_eui = 4;
// DevAddr of the device.
bytes dev_addr = 3;
// LoRaWAN 1.1.
bool lorawan_1_1 = 5;
// DevEUI of the device (optional).
bytes dev_eui = 4;
// LoRaWAN 1.0 NwkSKey / LoRaWAN 1.1 FNwkSIntKey.
bytes f_nwk_s_int_key = 6;
// LoRaWAN 1.1.
bool lorawan_1_1 = 5;
// Lifetime.
google.protobuf.Timestamp lifetime = 7;
// LoRaWAN 1.0 NwkSKey / LoRaWAN 1.1 FNwkSIntKey.
bytes f_nwk_s_int_key = 6;
// Uplink frame-counter.
uint32 f_cnt_up = 8;
// Lifetime.
google.protobuf.Timestamp lifetime = 7;
// Validate MIC.
bool validate_mic = 9;
// Uplink frame-counter.
uint32 f_cnt_up = 8;
// Validate MIC.
bool validate_mic = 9;
}

View File

@ -19,3 +19,5 @@ from .tenant_pb2_grpc import *
from .user_pb2 import *
from .user_pb2_grpc import *
from .request_log_pb2 import *
from .relay_pb2 import *
from .relay_pb2_grpc import *

File diff suppressed because one or more lines are too long

View File

@ -47,7 +47,7 @@ class DeleteDeviceRequest(_message.Message):
def __init__(self, dev_eui: _Optional[str] = ...) -> None: ...
class Device(_message.Message):
__slots__ = ["application_id", "description", "dev_eui", "device_profile_id", "is_disabled", "name", "skip_fcnt_check", "tags", "variables"]
__slots__ = ["application_id", "description", "dev_eui", "device_profile_id", "is_disabled", "join_eui", "name", "skip_fcnt_check", "tags", "variables"]
class TagsEntry(_message.Message):
__slots__ = ["key", "value"]
KEY_FIELD_NUMBER: _ClassVar[int]
@ -67,6 +67,7 @@ class Device(_message.Message):
DEVICE_PROFILE_ID_FIELD_NUMBER: _ClassVar[int]
DEV_EUI_FIELD_NUMBER: _ClassVar[int]
IS_DISABLED_FIELD_NUMBER: _ClassVar[int]
JOIN_EUI_FIELD_NUMBER: _ClassVar[int]
NAME_FIELD_NUMBER: _ClassVar[int]
SKIP_FCNT_CHECK_FIELD_NUMBER: _ClassVar[int]
TAGS_FIELD_NUMBER: _ClassVar[int]
@ -76,11 +77,12 @@ class Device(_message.Message):
dev_eui: str
device_profile_id: str
is_disabled: bool
join_eui: str
name: str
skip_fcnt_check: bool
tags: _containers.ScalarMap[str, str]
variables: _containers.ScalarMap[str, str]
def __init__(self, dev_eui: _Optional[str] = ..., name: _Optional[str] = ..., description: _Optional[str] = ..., application_id: _Optional[str] = ..., device_profile_id: _Optional[str] = ..., skip_fcnt_check: bool = ..., is_disabled: bool = ..., variables: _Optional[_Mapping[str, str]] = ..., tags: _Optional[_Mapping[str, str]] = ...) -> None: ...
def __init__(self, dev_eui: _Optional[str] = ..., name: _Optional[str] = ..., description: _Optional[str] = ..., application_id: _Optional[str] = ..., device_profile_id: _Optional[str] = ..., skip_fcnt_check: bool = ..., is_disabled: bool = ..., variables: _Optional[_Mapping[str, str]] = ..., tags: _Optional[_Mapping[str, str]] = ..., join_eui: _Optional[str] = ...) -> None: ...
class DeviceActivation(_message.Message):
__slots__ = ["a_f_cnt_down", "app_s_key", "dev_addr", "dev_eui", "f_cnt_up", "f_nwk_s_int_key", "n_f_cnt_down", "nwk_s_enc_key", "s_nwk_s_int_key"]

File diff suppressed because one or more lines are too long

View File

@ -12,9 +12,25 @@ ABSOLUTE: MeasurementKind
CAYENNE_LPP: CodecRuntime
COUNTER: MeasurementKind
DESCRIPTOR: _descriptor.FileDescriptor
DISABLE_RELAY_MODE: RelayModeActivation
DYNAMIC: RelayModeActivation
ENABLE_RELAY_MODE: RelayModeActivation
END_DEVICE_CONTROLLED: RelayModeActivation
GAUGE: MeasurementKind
JS: CodecRuntime
KHZ_0: SecondChAckOffset
KHZ_1600: SecondChAckOffset
KHZ_200: SecondChAckOffset
KHZ_3200: SecondChAckOffset
KHZ_400: SecondChAckOffset
KHZ_800: SecondChAckOffset
MS_100: CadPeriodicity
MS_20: CadPeriodicity
MS_250: CadPeriodicity
MS_50: CadPeriodicity
MS_500: CadPeriodicity
NONE: CodecRuntime
SEC_1: CadPeriodicity
STRING: MeasurementKind
UNKNOWN: MeasurementKind
@ -45,7 +61,7 @@ class DeleteDeviceProfileRequest(_message.Message):
def __init__(self, id: _Optional[str] = ...) -> None: ...
class DeviceProfile(_message.Message):
__slots__ = ["abp_rx1_delay", "abp_rx1_dr_offset", "abp_rx2_dr", "abp_rx2_freq", "adr_algorithm_id", "auto_detect_measurements", "class_b_ping_slot_dr", "class_b_ping_slot_freq", "class_b_ping_slot_nb_k", "class_b_timeout", "class_c_timeout", "description", "device_status_req_interval", "flush_queue_on_activate", "id", "mac_version", "measurements", "name", "payload_codec_runtime", "payload_codec_script", "reg_params_revision", "region", "region_config_id", "supports_class_b", "supports_class_c", "supports_otaa", "tags", "tenant_id", "uplink_interval"]
__slots__ = ["abp_rx1_delay", "abp_rx1_dr_offset", "abp_rx2_dr", "abp_rx2_freq", "adr_algorithm_id", "auto_detect_measurements", "class_b_ping_slot_dr", "class_b_ping_slot_freq", "class_b_ping_slot_nb_k", "class_b_timeout", "class_c_timeout", "description", "device_status_req_interval", "flush_queue_on_activate", "id", "is_relay", "is_relay_ed", "mac_version", "measurements", "name", "payload_codec_runtime", "payload_codec_script", "reg_params_revision", "region", "region_config_id", "relay_cad_periodicity", "relay_default_channel_index", "relay_ed_activation_mode", "relay_ed_back_off", "relay_ed_relay_only", "relay_ed_smart_enable_level", "relay_ed_uplink_limit_bucket_size", "relay_ed_uplink_limit_reload_rate", "relay_enabled", "relay_global_uplink_limit_bucket_size", "relay_global_uplink_limit_reload_rate", "relay_join_req_limit_bucket_size", "relay_join_req_limit_reload_rate", "relay_notify_limit_bucket_size", "relay_notify_limit_reload_rate", "relay_overall_limit_bucket_size", "relay_overall_limit_reload_rate", "relay_second_channel_ack_offset", "relay_second_channel_dr", "relay_second_channel_freq", "supports_class_b", "supports_class_c", "supports_otaa", "tags", "tenant_id", "uplink_interval"]
class MeasurementsEntry(_message.Message):
__slots__ = ["key", "value"]
KEY_FIELD_NUMBER: _ClassVar[int]
@ -75,6 +91,8 @@ class DeviceProfile(_message.Message):
DEVICE_STATUS_REQ_INTERVAL_FIELD_NUMBER: _ClassVar[int]
FLUSH_QUEUE_ON_ACTIVATE_FIELD_NUMBER: _ClassVar[int]
ID_FIELD_NUMBER: _ClassVar[int]
IS_RELAY_ED_FIELD_NUMBER: _ClassVar[int]
IS_RELAY_FIELD_NUMBER: _ClassVar[int]
MAC_VERSION_FIELD_NUMBER: _ClassVar[int]
MEASUREMENTS_FIELD_NUMBER: _ClassVar[int]
NAME_FIELD_NUMBER: _ClassVar[int]
@ -83,6 +101,26 @@ class DeviceProfile(_message.Message):
REGION_CONFIG_ID_FIELD_NUMBER: _ClassVar[int]
REGION_FIELD_NUMBER: _ClassVar[int]
REG_PARAMS_REVISION_FIELD_NUMBER: _ClassVar[int]
RELAY_CAD_PERIODICITY_FIELD_NUMBER: _ClassVar[int]
RELAY_DEFAULT_CHANNEL_INDEX_FIELD_NUMBER: _ClassVar[int]
RELAY_ED_ACTIVATION_MODE_FIELD_NUMBER: _ClassVar[int]
RELAY_ED_BACK_OFF_FIELD_NUMBER: _ClassVar[int]
RELAY_ED_RELAY_ONLY_FIELD_NUMBER: _ClassVar[int]
RELAY_ED_SMART_ENABLE_LEVEL_FIELD_NUMBER: _ClassVar[int]
RELAY_ED_UPLINK_LIMIT_BUCKET_SIZE_FIELD_NUMBER: _ClassVar[int]
RELAY_ED_UPLINK_LIMIT_RELOAD_RATE_FIELD_NUMBER: _ClassVar[int]
RELAY_ENABLED_FIELD_NUMBER: _ClassVar[int]
RELAY_GLOBAL_UPLINK_LIMIT_BUCKET_SIZE_FIELD_NUMBER: _ClassVar[int]
RELAY_GLOBAL_UPLINK_LIMIT_RELOAD_RATE_FIELD_NUMBER: _ClassVar[int]
RELAY_JOIN_REQ_LIMIT_BUCKET_SIZE_FIELD_NUMBER: _ClassVar[int]
RELAY_JOIN_REQ_LIMIT_RELOAD_RATE_FIELD_NUMBER: _ClassVar[int]
RELAY_NOTIFY_LIMIT_BUCKET_SIZE_FIELD_NUMBER: _ClassVar[int]
RELAY_NOTIFY_LIMIT_RELOAD_RATE_FIELD_NUMBER: _ClassVar[int]
RELAY_OVERALL_LIMIT_BUCKET_SIZE_FIELD_NUMBER: _ClassVar[int]
RELAY_OVERALL_LIMIT_RELOAD_RATE_FIELD_NUMBER: _ClassVar[int]
RELAY_SECOND_CHANNEL_ACK_OFFSET_FIELD_NUMBER: _ClassVar[int]
RELAY_SECOND_CHANNEL_DR_FIELD_NUMBER: _ClassVar[int]
RELAY_SECOND_CHANNEL_FREQ_FIELD_NUMBER: _ClassVar[int]
SUPPORTS_CLASS_B_FIELD_NUMBER: _ClassVar[int]
SUPPORTS_CLASS_C_FIELD_NUMBER: _ClassVar[int]
SUPPORTS_OTAA_FIELD_NUMBER: _ClassVar[int]
@ -104,6 +142,8 @@ class DeviceProfile(_message.Message):
device_status_req_interval: int
flush_queue_on_activate: bool
id: str
is_relay: bool
is_relay_ed: bool
mac_version: _common_pb2.MacVersion
measurements: _containers.MessageMap[str, Measurement]
name: str
@ -112,13 +152,33 @@ class DeviceProfile(_message.Message):
reg_params_revision: _common_pb2.RegParamsRevision
region: _common_pb2.Region
region_config_id: str
relay_cad_periodicity: CadPeriodicity
relay_default_channel_index: int
relay_ed_activation_mode: RelayModeActivation
relay_ed_back_off: int
relay_ed_relay_only: bool
relay_ed_smart_enable_level: int
relay_ed_uplink_limit_bucket_size: int
relay_ed_uplink_limit_reload_rate: int
relay_enabled: bool
relay_global_uplink_limit_bucket_size: int
relay_global_uplink_limit_reload_rate: int
relay_join_req_limit_bucket_size: int
relay_join_req_limit_reload_rate: int
relay_notify_limit_bucket_size: int
relay_notify_limit_reload_rate: int
relay_overall_limit_bucket_size: int
relay_overall_limit_reload_rate: int
relay_second_channel_ack_offset: SecondChAckOffset
relay_second_channel_dr: int
relay_second_channel_freq: int
supports_class_b: bool
supports_class_c: bool
supports_otaa: bool
tags: _containers.ScalarMap[str, str]
tenant_id: str
uplink_interval: int
def __init__(self, id: _Optional[str] = ..., tenant_id: _Optional[str] = ..., name: _Optional[str] = ..., description: _Optional[str] = ..., region: _Optional[_Union[_common_pb2.Region, str]] = ..., mac_version: _Optional[_Union[_common_pb2.MacVersion, str]] = ..., reg_params_revision: _Optional[_Union[_common_pb2.RegParamsRevision, str]] = ..., adr_algorithm_id: _Optional[str] = ..., payload_codec_runtime: _Optional[_Union[CodecRuntime, str]] = ..., payload_codec_script: _Optional[str] = ..., flush_queue_on_activate: bool = ..., uplink_interval: _Optional[int] = ..., device_status_req_interval: _Optional[int] = ..., supports_otaa: bool = ..., supports_class_b: bool = ..., supports_class_c: bool = ..., class_b_timeout: _Optional[int] = ..., class_b_ping_slot_nb_k: _Optional[int] = ..., class_b_ping_slot_dr: _Optional[int] = ..., class_b_ping_slot_freq: _Optional[int] = ..., class_c_timeout: _Optional[int] = ..., abp_rx1_delay: _Optional[int] = ..., abp_rx1_dr_offset: _Optional[int] = ..., abp_rx2_dr: _Optional[int] = ..., abp_rx2_freq: _Optional[int] = ..., tags: _Optional[_Mapping[str, str]] = ..., measurements: _Optional[_Mapping[str, Measurement]] = ..., auto_detect_measurements: bool = ..., region_config_id: _Optional[str] = ...) -> None: ...
def __init__(self, id: _Optional[str] = ..., tenant_id: _Optional[str] = ..., name: _Optional[str] = ..., description: _Optional[str] = ..., region: _Optional[_Union[_common_pb2.Region, str]] = ..., mac_version: _Optional[_Union[_common_pb2.MacVersion, str]] = ..., reg_params_revision: _Optional[_Union[_common_pb2.RegParamsRevision, str]] = ..., adr_algorithm_id: _Optional[str] = ..., payload_codec_runtime: _Optional[_Union[CodecRuntime, str]] = ..., payload_codec_script: _Optional[str] = ..., flush_queue_on_activate: bool = ..., uplink_interval: _Optional[int] = ..., device_status_req_interval: _Optional[int] = ..., supports_otaa: bool = ..., supports_class_b: bool = ..., supports_class_c: bool = ..., class_b_timeout: _Optional[int] = ..., class_b_ping_slot_nb_k: _Optional[int] = ..., class_b_ping_slot_dr: _Optional[int] = ..., class_b_ping_slot_freq: _Optional[int] = ..., class_c_timeout: _Optional[int] = ..., abp_rx1_delay: _Optional[int] = ..., abp_rx1_dr_offset: _Optional[int] = ..., abp_rx2_dr: _Optional[int] = ..., abp_rx2_freq: _Optional[int] = ..., tags: _Optional[_Mapping[str, str]] = ..., measurements: _Optional[_Mapping[str, Measurement]] = ..., auto_detect_measurements: bool = ..., region_config_id: _Optional[str] = ..., is_relay: bool = ..., is_relay_ed: bool = ..., relay_ed_relay_only: bool = ..., relay_enabled: bool = ..., relay_cad_periodicity: _Optional[_Union[CadPeriodicity, str]] = ..., relay_default_channel_index: _Optional[int] = ..., relay_second_channel_freq: _Optional[int] = ..., relay_second_channel_dr: _Optional[int] = ..., relay_second_channel_ack_offset: _Optional[_Union[SecondChAckOffset, str]] = ..., relay_ed_activation_mode: _Optional[_Union[RelayModeActivation, str]] = ..., relay_ed_smart_enable_level: _Optional[int] = ..., relay_ed_back_off: _Optional[int] = ..., relay_ed_uplink_limit_bucket_size: _Optional[int] = ..., relay_ed_uplink_limit_reload_rate: _Optional[int] = ..., relay_join_req_limit_reload_rate: _Optional[int] = ..., relay_notify_limit_reload_rate: _Optional[int] = ..., relay_global_uplink_limit_reload_rate: _Optional[int] = ..., relay_overall_limit_reload_rate: _Optional[int] = ..., relay_join_req_limit_bucket_size: _Optional[int] = ..., relay_notify_limit_bucket_size: _Optional[int] = ..., relay_global_uplink_limit_bucket_size: _Optional[int] = ..., relay_overall_limit_bucket_size: _Optional[int] = ...) -> None: ...
class DeviceProfileListItem(_message.Message):
__slots__ = ["created_at", "id", "mac_version", "name", "reg_params_revision", "region", "supports_class_b", "supports_class_c", "supports_otaa", "updated_at"]
@ -207,3 +267,12 @@ class CodecRuntime(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
class MeasurementKind(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
__slots__ = []
class CadPeriodicity(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
__slots__ = []
class SecondChAckOffset(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
__slots__ = []
class RelayModeActivation(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
__slots__ = []

View File

@ -16,7 +16,7 @@ from chirpstack_api.common import common_pb2 as chirpstack__api_dot_common_dot_c
from chirpstack_api.gw import gw_pb2 as chirpstack__api_dot_gw_dot_gw__pb2
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\"chirpstack-api/api/frame_log.proto\x12\x03\x61pi\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\"chirpstack-api/common/common.proto\x1a\x1a\x63hirpstack-api/gw/gw.proto\"\xf7\x01\n\x0eUplinkFrameLog\x12\x13\n\x0bphy_payload\x18\x01 \x01(\x0c\x12!\n\x07tx_info\x18\x02 \x01(\x0b\x32\x10.gw.UplinkTxInfo\x12!\n\x07rx_info\x18\x03 \x03(\x0b\x32\x10.gw.UplinkRxInfo\x12\x1d\n\x06m_type\x18\x04 \x01(\x0e\x32\r.common.MType\x12\x10\n\x08\x64\x65v_addr\x18\x05 \x01(\t\x12\x0f\n\x07\x64\x65v_eui\x18\x06 \x01(\t\x12(\n\x04time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x1e\n\x16plaintext_mac_commands\x18\x08 \x01(\x08\"\x81\x02\n\x10\x44ownlinkFrameLog\x12(\n\x04time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x13\n\x0bphy_payload\x18\x02 \x01(\x0c\x12#\n\x07tx_info\x18\x03 \x01(\x0b\x32\x12.gw.DownlinkTxInfo\x12\x13\n\x0b\x64ownlink_id\x18\x04 \x01(\r\x12\x12\n\ngateway_id\x18\x05 \x01(\t\x12\x1d\n\x06m_type\x18\x06 \x01(\x0e\x32\r.common.MType\x12\x10\n\x08\x64\x65v_addr\x18\x07 \x01(\t\x12\x0f\n\x07\x64\x65v_eui\x18\x08 \x01(\t\x12\x1e\n\x16plaintext_mac_commands\x18\t \x01(\x08\x42\x65\n\x11io.chirpstack.apiB\rFrameLogProtoP\x01Z.github.com/chirpstack/chirpstack/api/go/v4/api\xaa\x02\x0e\x43hirpstack.Apib\x06proto3')
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\"chirpstack-api/api/frame_log.proto\x12\x03\x61pi\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\"chirpstack-api/common/common.proto\x1a\x1a\x63hirpstack-api/gw/gw.proto\"\x90\x02\n\x0eUplinkFrameLog\x12\x13\n\x0bphy_payload\x18\x01 \x01(\x0c\x12!\n\x07tx_info\x18\x02 \x01(\x0b\x32\x10.gw.UplinkTxInfo\x12!\n\x07rx_info\x18\x03 \x03(\x0b\x32\x10.gw.UplinkRxInfo\x12\x1d\n\x06m_type\x18\x04 \x01(\x0e\x32\r.common.MType\x12\x10\n\x08\x64\x65v_addr\x18\x05 \x01(\t\x12\x0f\n\x07\x64\x65v_eui\x18\x06 \x01(\t\x12(\n\x04time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x18\n\x10plaintext_f_opts\x18\x08 \x01(\x08\x12\x1d\n\x15plaintext_frm_payload\x18\t \x01(\x08\"\x9a\x02\n\x10\x44ownlinkFrameLog\x12(\n\x04time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x13\n\x0bphy_payload\x18\x02 \x01(\x0c\x12#\n\x07tx_info\x18\x03 \x01(\x0b\x32\x12.gw.DownlinkTxInfo\x12\x13\n\x0b\x64ownlink_id\x18\x04 \x01(\r\x12\x12\n\ngateway_id\x18\x05 \x01(\t\x12\x1d\n\x06m_type\x18\x06 \x01(\x0e\x32\r.common.MType\x12\x10\n\x08\x64\x65v_addr\x18\x07 \x01(\t\x12\x0f\n\x07\x64\x65v_eui\x18\x08 \x01(\t\x12\x18\n\x10plaintext_f_opts\x18\t \x01(\x08\x12\x1d\n\x15plaintext_frm_payload\x18\n \x01(\x08\x42\x65\n\x11io.chirpstack.apiB\rFrameLogProtoP\x01Z.github.com/chirpstack/chirpstack/api/go/v4/api\xaa\x02\x0e\x43hirpstack.Apib\x06proto3')
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals())
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'chirpstack_api.api.frame_log_pb2', globals())
@ -25,7 +25,7 @@ if _descriptor._USE_C_DESCRIPTORS == False:
DESCRIPTOR._options = None
DESCRIPTOR._serialized_options = b'\n\021io.chirpstack.apiB\rFrameLogProtoP\001Z.github.com/chirpstack/chirpstack/api/go/v4/api\252\002\016Chirpstack.Api'
_UPLINKFRAMELOG._serialized_start=141
_UPLINKFRAMELOG._serialized_end=388
_DOWNLINKFRAMELOG._serialized_start=391
_DOWNLINKFRAMELOG._serialized_end=648
_UPLINKFRAMELOG._serialized_end=413
_DOWNLINKFRAMELOG._serialized_start=416
_DOWNLINKFRAMELOG._serialized_end=698
# @@protoc_insertion_point(module_scope)

View File

@ -9,14 +9,15 @@ from typing import ClassVar as _ClassVar, Iterable as _Iterable, Mapping as _Map
DESCRIPTOR: _descriptor.FileDescriptor
class DownlinkFrameLog(_message.Message):
__slots__ = ["dev_addr", "dev_eui", "downlink_id", "gateway_id", "m_type", "phy_payload", "plaintext_mac_commands", "time", "tx_info"]
__slots__ = ["dev_addr", "dev_eui", "downlink_id", "gateway_id", "m_type", "phy_payload", "plaintext_f_opts", "plaintext_frm_payload", "time", "tx_info"]
DEV_ADDR_FIELD_NUMBER: _ClassVar[int]
DEV_EUI_FIELD_NUMBER: _ClassVar[int]
DOWNLINK_ID_FIELD_NUMBER: _ClassVar[int]
GATEWAY_ID_FIELD_NUMBER: _ClassVar[int]
M_TYPE_FIELD_NUMBER: _ClassVar[int]
PHY_PAYLOAD_FIELD_NUMBER: _ClassVar[int]
PLAINTEXT_MAC_COMMANDS_FIELD_NUMBER: _ClassVar[int]
PLAINTEXT_FRM_PAYLOAD_FIELD_NUMBER: _ClassVar[int]
PLAINTEXT_F_OPTS_FIELD_NUMBER: _ClassVar[int]
TIME_FIELD_NUMBER: _ClassVar[int]
TX_INFO_FIELD_NUMBER: _ClassVar[int]
dev_addr: str
@ -25,18 +26,20 @@ class DownlinkFrameLog(_message.Message):
gateway_id: str
m_type: _common_pb2.MType
phy_payload: bytes
plaintext_mac_commands: bool
plaintext_f_opts: bool
plaintext_frm_payload: bool
time: _timestamp_pb2.Timestamp
tx_info: _gw_pb2.DownlinkTxInfo
def __init__(self, time: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., phy_payload: _Optional[bytes] = ..., tx_info: _Optional[_Union[_gw_pb2.DownlinkTxInfo, _Mapping]] = ..., downlink_id: _Optional[int] = ..., gateway_id: _Optional[str] = ..., m_type: _Optional[_Union[_common_pb2.MType, str]] = ..., dev_addr: _Optional[str] = ..., dev_eui: _Optional[str] = ..., plaintext_mac_commands: bool = ...) -> None: ...
def __init__(self, time: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., phy_payload: _Optional[bytes] = ..., tx_info: _Optional[_Union[_gw_pb2.DownlinkTxInfo, _Mapping]] = ..., downlink_id: _Optional[int] = ..., gateway_id: _Optional[str] = ..., m_type: _Optional[_Union[_common_pb2.MType, str]] = ..., dev_addr: _Optional[str] = ..., dev_eui: _Optional[str] = ..., plaintext_f_opts: bool = ..., plaintext_frm_payload: bool = ...) -> None: ...
class UplinkFrameLog(_message.Message):
__slots__ = ["dev_addr", "dev_eui", "m_type", "phy_payload", "plaintext_mac_commands", "rx_info", "time", "tx_info"]
__slots__ = ["dev_addr", "dev_eui", "m_type", "phy_payload", "plaintext_f_opts", "plaintext_frm_payload", "rx_info", "time", "tx_info"]
DEV_ADDR_FIELD_NUMBER: _ClassVar[int]
DEV_EUI_FIELD_NUMBER: _ClassVar[int]
M_TYPE_FIELD_NUMBER: _ClassVar[int]
PHY_PAYLOAD_FIELD_NUMBER: _ClassVar[int]
PLAINTEXT_MAC_COMMANDS_FIELD_NUMBER: _ClassVar[int]
PLAINTEXT_FRM_PAYLOAD_FIELD_NUMBER: _ClassVar[int]
PLAINTEXT_F_OPTS_FIELD_NUMBER: _ClassVar[int]
RX_INFO_FIELD_NUMBER: _ClassVar[int]
TIME_FIELD_NUMBER: _ClassVar[int]
TX_INFO_FIELD_NUMBER: _ClassVar[int]
@ -44,8 +47,9 @@ class UplinkFrameLog(_message.Message):
dev_eui: str
m_type: _common_pb2.MType
phy_payload: bytes
plaintext_mac_commands: bool
plaintext_f_opts: bool
plaintext_frm_payload: bool
rx_info: _containers.RepeatedCompositeFieldContainer[_gw_pb2.UplinkRxInfo]
time: _timestamp_pb2.Timestamp
tx_info: _gw_pb2.UplinkTxInfo
def __init__(self, phy_payload: _Optional[bytes] = ..., tx_info: _Optional[_Union[_gw_pb2.UplinkTxInfo, _Mapping]] = ..., rx_info: _Optional[_Iterable[_Union[_gw_pb2.UplinkRxInfo, _Mapping]]] = ..., m_type: _Optional[_Union[_common_pb2.MType, str]] = ..., dev_addr: _Optional[str] = ..., dev_eui: _Optional[str] = ..., time: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., plaintext_mac_commands: bool = ...) -> None: ...
def __init__(self, phy_payload: _Optional[bytes] = ..., tx_info: _Optional[_Union[_gw_pb2.UplinkTxInfo, _Mapping]] = ..., rx_info: _Optional[_Iterable[_Union[_gw_pb2.UplinkRxInfo, _Mapping]]] = ..., m_type: _Optional[_Union[_common_pb2.MType, str]] = ..., dev_addr: _Optional[str] = ..., dev_eui: _Optional[str] = ..., time: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., plaintext_f_opts: bool = ..., plaintext_frm_payload: bool = ...) -> None: ...

View File

@ -0,0 +1,53 @@
# -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: chirpstack-api/api/relay.proto
"""Generated protocol buffer code."""
from google.protobuf.internal import builder as _builder
from google.protobuf import descriptor as _descriptor
from google.protobuf import descriptor_pool as _descriptor_pool
from google.protobuf import symbol_database as _symbol_database
# @@protoc_insertion_point(imports)
_sym_db = _symbol_database.Default()
from google.api import annotations_pb2 as google_dot_api_dot_annotations__pb2
from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2
from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1e\x63hirpstack-api/api/relay.proto\x12\x03\x61pi\x1a\x1cgoogle/api/annotations.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1bgoogle/protobuf/empty.proto\".\n\rRelayListItem\x12\x0f\n\x07\x64\x65v_eui\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\"J\n\x11ListRelaysRequest\x12\r\n\x05limit\x18\x01 \x01(\r\x12\x0e\n\x06offset\x18\x02 \x01(\r\x12\x16\n\x0e\x61pplication_id\x18\x03 \x01(\t\"M\n\x12ListRelaysResponse\x12\x13\n\x0btotal_count\x18\x01 \x01(\r\x12\"\n\x06result\x18\x02 \x03(\x0b\x32\x12.api.RelayListItem\"F\n\x15\x41\x64\x64RelayDeviceRequest\x12\x15\n\rrelay_dev_eui\x18\x01 \x01(\t\x12\x16\n\x0e\x64\x65vice_dev_eui\x18\x02 \x01(\t\"I\n\x18RemoveRelayDeviceRequest\x12\x15\n\rrelay_dev_eui\x18\x01 \x01(\t\x12\x16\n\x0e\x64\x65vice_dev_eui\x18\x02 \x01(\t\"O\n\x17ListRelayDevicesRequest\x12\r\n\x05limit\x18\x01 \x01(\r\x12\x0e\n\x06offset\x18\x02 \x01(\r\x12\x15\n\rrelay_dev_eui\x18\x03 \x01(\t\"d\n\x13RelayDeviceListItem\x12\x0f\n\x07\x64\x65v_eui\x18\x01 \x01(\t\x12.\n\ncreated_at\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0c\n\x04name\x18\x03 \x01(\t\"Y\n\x18ListRelayDevicesResponse\x12\x13\n\x0btotal_count\x18\x01 \x01(\r\x12(\n\x06result\x18\x02 \x03(\x0b\x32\x18.api.RelayDeviceListItem2\xc4\x03\n\x0cRelayService\x12L\n\x04List\x12\x16.api.ListRelaysRequest\x1a\x17.api.ListRelaysResponse\"\x13\x82\xd3\xe4\x93\x02\r\x12\x0b/api/relays\x12o\n\tAddDevice\x12\x1a.api.AddRelayDeviceRequest\x1a\x16.google.protobuf.Empty\".\x82\xd3\xe4\x93\x02(\"#/api/relays/{relay_dev_eui}/devices:\x01*\x12|\n\x0cRemoveDevice\x12\x1d.api.RemoveRelayDeviceRequest\x1a\x16.google.protobuf.Empty\"5\x82\xd3\xe4\x93\x02/*-/api/relays/{relay_dev_eui}/devices/{dev_eui}\x12w\n\x0bListDevices\x12\x1c.api.ListRelayDevicesRequest\x1a\x1d.api.ListRelayDevicesResponse\"+\x82\xd3\xe4\x93\x02%\x12#/api/relays/{relay_dev_eui}/devicesBb\n\x11io.chirpstack.apiB\nRelayProtoP\x01Z.github.com/chirpstack/chirpstack/api/go/v4/api\xaa\x02\x0e\x43hirpstack.Apib\x06proto3')
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals())
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'chirpstack_api.api.relay_pb2', globals())
if _descriptor._USE_C_DESCRIPTORS == False:
DESCRIPTOR._options = None
DESCRIPTOR._serialized_options = b'\n\021io.chirpstack.apiB\nRelayProtoP\001Z.github.com/chirpstack/chirpstack/api/go/v4/api\252\002\016Chirpstack.Api'
_RELAYSERVICE.methods_by_name['List']._options = None
_RELAYSERVICE.methods_by_name['List']._serialized_options = b'\202\323\344\223\002\r\022\013/api/relays'
_RELAYSERVICE.methods_by_name['AddDevice']._options = None
_RELAYSERVICE.methods_by_name['AddDevice']._serialized_options = b'\202\323\344\223\002(\"#/api/relays/{relay_dev_eui}/devices:\001*'
_RELAYSERVICE.methods_by_name['RemoveDevice']._options = None
_RELAYSERVICE.methods_by_name['RemoveDevice']._serialized_options = b'\202\323\344\223\002/*-/api/relays/{relay_dev_eui}/devices/{dev_eui}'
_RELAYSERVICE.methods_by_name['ListDevices']._options = None
_RELAYSERVICE.methods_by_name['ListDevices']._serialized_options = b'\202\323\344\223\002%\022#/api/relays/{relay_dev_eui}/devices'
_RELAYLISTITEM._serialized_start=131
_RELAYLISTITEM._serialized_end=177
_LISTRELAYSREQUEST._serialized_start=179
_LISTRELAYSREQUEST._serialized_end=253
_LISTRELAYSRESPONSE._serialized_start=255
_LISTRELAYSRESPONSE._serialized_end=332
_ADDRELAYDEVICEREQUEST._serialized_start=334
_ADDRELAYDEVICEREQUEST._serialized_end=404
_REMOVERELAYDEVICEREQUEST._serialized_start=406
_REMOVERELAYDEVICEREQUEST._serialized_end=479
_LISTRELAYDEVICESREQUEST._serialized_start=481
_LISTRELAYDEVICESREQUEST._serialized_end=560
_RELAYDEVICELISTITEM._serialized_start=562
_RELAYDEVICELISTITEM._serialized_end=662
_LISTRELAYDEVICESRESPONSE._serialized_start=664
_LISTRELAYDEVICESRESPONSE._serialized_end=753
_RELAYSERVICE._serialized_start=756
_RELAYSERVICE._serialized_end=1208
# @@protoc_insertion_point(module_scope)

View File

@ -0,0 +1,79 @@
from google.api import annotations_pb2 as _annotations_pb2
from google.protobuf import timestamp_pb2 as _timestamp_pb2
from google.protobuf import empty_pb2 as _empty_pb2
from google.protobuf.internal import containers as _containers
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from typing import ClassVar as _ClassVar, Iterable as _Iterable, Mapping as _Mapping, Optional as _Optional, Union as _Union
DESCRIPTOR: _descriptor.FileDescriptor
class AddRelayDeviceRequest(_message.Message):
__slots__ = ["device_dev_eui", "relay_dev_eui"]
DEVICE_DEV_EUI_FIELD_NUMBER: _ClassVar[int]
RELAY_DEV_EUI_FIELD_NUMBER: _ClassVar[int]
device_dev_eui: str
relay_dev_eui: str
def __init__(self, relay_dev_eui: _Optional[str] = ..., device_dev_eui: _Optional[str] = ...) -> None: ...
class ListRelayDevicesRequest(_message.Message):
__slots__ = ["limit", "offset", "relay_dev_eui"]
LIMIT_FIELD_NUMBER: _ClassVar[int]
OFFSET_FIELD_NUMBER: _ClassVar[int]
RELAY_DEV_EUI_FIELD_NUMBER: _ClassVar[int]
limit: int
offset: int
relay_dev_eui: str
def __init__(self, limit: _Optional[int] = ..., offset: _Optional[int] = ..., relay_dev_eui: _Optional[str] = ...) -> None: ...
class ListRelayDevicesResponse(_message.Message):
__slots__ = ["result", "total_count"]
RESULT_FIELD_NUMBER: _ClassVar[int]
TOTAL_COUNT_FIELD_NUMBER: _ClassVar[int]
result: _containers.RepeatedCompositeFieldContainer[RelayDeviceListItem]
total_count: int
def __init__(self, total_count: _Optional[int] = ..., result: _Optional[_Iterable[_Union[RelayDeviceListItem, _Mapping]]] = ...) -> None: ...
class ListRelaysRequest(_message.Message):
__slots__ = ["application_id", "limit", "offset"]
APPLICATION_ID_FIELD_NUMBER: _ClassVar[int]
LIMIT_FIELD_NUMBER: _ClassVar[int]
OFFSET_FIELD_NUMBER: _ClassVar[int]
application_id: str
limit: int
offset: int
def __init__(self, limit: _Optional[int] = ..., offset: _Optional[int] = ..., application_id: _Optional[str] = ...) -> None: ...
class ListRelaysResponse(_message.Message):
__slots__ = ["result", "total_count"]
RESULT_FIELD_NUMBER: _ClassVar[int]
TOTAL_COUNT_FIELD_NUMBER: _ClassVar[int]
result: _containers.RepeatedCompositeFieldContainer[RelayListItem]
total_count: int
def __init__(self, total_count: _Optional[int] = ..., result: _Optional[_Iterable[_Union[RelayListItem, _Mapping]]] = ...) -> None: ...
class RelayDeviceListItem(_message.Message):
__slots__ = ["created_at", "dev_eui", "name"]
CREATED_AT_FIELD_NUMBER: _ClassVar[int]
DEV_EUI_FIELD_NUMBER: _ClassVar[int]
NAME_FIELD_NUMBER: _ClassVar[int]
created_at: _timestamp_pb2.Timestamp
dev_eui: str
name: str
def __init__(self, dev_eui: _Optional[str] = ..., created_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., name: _Optional[str] = ...) -> None: ...
class RelayListItem(_message.Message):
__slots__ = ["dev_eui", "name"]
DEV_EUI_FIELD_NUMBER: _ClassVar[int]
NAME_FIELD_NUMBER: _ClassVar[int]
dev_eui: str
name: str
def __init__(self, dev_eui: _Optional[str] = ..., name: _Optional[str] = ...) -> None: ...
class RemoveRelayDeviceRequest(_message.Message):
__slots__ = ["device_dev_eui", "relay_dev_eui"]
DEVICE_DEV_EUI_FIELD_NUMBER: _ClassVar[int]
RELAY_DEV_EUI_FIELD_NUMBER: _ClassVar[int]
device_dev_eui: str
relay_dev_eui: str
def __init__(self, relay_dev_eui: _Optional[str] = ..., device_dev_eui: _Optional[str] = ...) -> None: ...

View File

@ -0,0 +1,173 @@
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
"""Client and server classes corresponding to protobuf-defined services."""
import grpc
from chirpstack_api.api import relay_pb2 as chirpstack__api_dot_api_dot_relay__pb2
from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2
class RelayServiceStub(object):
"""RelayService is the service providing API methos for managing relays.
"""
def __init__(self, channel):
"""Constructor.
Args:
channel: A grpc.Channel.
"""
self.List = channel.unary_unary(
'/api.RelayService/List',
request_serializer=chirpstack__api_dot_api_dot_relay__pb2.ListRelaysRequest.SerializeToString,
response_deserializer=chirpstack__api_dot_api_dot_relay__pb2.ListRelaysResponse.FromString,
)
self.AddDevice = channel.unary_unary(
'/api.RelayService/AddDevice',
request_serializer=chirpstack__api_dot_api_dot_relay__pb2.AddRelayDeviceRequest.SerializeToString,
response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
)
self.RemoveDevice = channel.unary_unary(
'/api.RelayService/RemoveDevice',
request_serializer=chirpstack__api_dot_api_dot_relay__pb2.RemoveRelayDeviceRequest.SerializeToString,
response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
)
self.ListDevices = channel.unary_unary(
'/api.RelayService/ListDevices',
request_serializer=chirpstack__api_dot_api_dot_relay__pb2.ListRelayDevicesRequest.SerializeToString,
response_deserializer=chirpstack__api_dot_api_dot_relay__pb2.ListRelayDevicesResponse.FromString,
)
class RelayServiceServicer(object):
"""RelayService is the service providing API methos for managing relays.
"""
def List(self, request, context):
"""List lists the relays for the given application id.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def AddDevice(self, request, context):
"""AddDevice adds the given device to the relay.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def RemoveDevice(self, request, context):
"""RemoveDevice removes the given device from the relay.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def ListDevices(self, request, context):
"""ListDevices lists the devices for the given relay.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def add_RelayServiceServicer_to_server(servicer, server):
rpc_method_handlers = {
'List': grpc.unary_unary_rpc_method_handler(
servicer.List,
request_deserializer=chirpstack__api_dot_api_dot_relay__pb2.ListRelaysRequest.FromString,
response_serializer=chirpstack__api_dot_api_dot_relay__pb2.ListRelaysResponse.SerializeToString,
),
'AddDevice': grpc.unary_unary_rpc_method_handler(
servicer.AddDevice,
request_deserializer=chirpstack__api_dot_api_dot_relay__pb2.AddRelayDeviceRequest.FromString,
response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
),
'RemoveDevice': grpc.unary_unary_rpc_method_handler(
servicer.RemoveDevice,
request_deserializer=chirpstack__api_dot_api_dot_relay__pb2.RemoveRelayDeviceRequest.FromString,
response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
),
'ListDevices': grpc.unary_unary_rpc_method_handler(
servicer.ListDevices,
request_deserializer=chirpstack__api_dot_api_dot_relay__pb2.ListRelayDevicesRequest.FromString,
response_serializer=chirpstack__api_dot_api_dot_relay__pb2.ListRelayDevicesResponse.SerializeToString,
),
}
generic_handler = grpc.method_handlers_generic_handler(
'api.RelayService', rpc_method_handlers)
server.add_generic_rpc_handlers((generic_handler,))
# This class is part of an EXPERIMENTAL API.
class RelayService(object):
"""RelayService is the service providing API methos for managing relays.
"""
@staticmethod
def List(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.unary_unary(request, target, '/api.RelayService/List',
chirpstack__api_dot_api_dot_relay__pb2.ListRelaysRequest.SerializeToString,
chirpstack__api_dot_api_dot_relay__pb2.ListRelaysResponse.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
@staticmethod
def AddDevice(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.unary_unary(request, target, '/api.RelayService/AddDevice',
chirpstack__api_dot_api_dot_relay__pb2.AddRelayDeviceRequest.SerializeToString,
google_dot_protobuf_dot_empty__pb2.Empty.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
@staticmethod
def RemoveDevice(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.unary_unary(request, target, '/api.RelayService/RemoveDevice',
chirpstack__api_dot_api_dot_relay__pb2.RemoveRelayDeviceRequest.SerializeToString,
google_dot_protobuf_dot_empty__pb2.Empty.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
@staticmethod
def ListDevices(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.unary_unary(request, target, '/api.RelayService/ListDevices',
chirpstack__api_dot_api_dot_relay__pb2.ListRelayDevicesRequest.SerializeToString,
chirpstack__api_dot_api_dot_relay__pb2.ListRelayDevicesResponse.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

File diff suppressed because one or more lines are too long

View File

@ -15,6 +15,7 @@ DOWNLINK_PAYLOAD_SIZE: LogCode
ERROR: LogLevel
INFO: LogLevel
OTAA: LogCode
RELAY_NEW_END_DEVICE: LogCode
UNKNOWN: LogCode
UPLINK_CODEC: LogCode
UPLINK_F_CNT_RESET: LogCode
@ -100,16 +101,18 @@ class IntegrationEvent(_message.Message):
def __init__(self, deduplication_id: _Optional[str] = ..., time: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., device_info: _Optional[_Union[DeviceInfo, _Mapping]] = ..., integration_name: _Optional[str] = ..., event_type: _Optional[str] = ..., object: _Optional[_Union[_struct_pb2.Struct, _Mapping]] = ...) -> None: ...
class JoinEvent(_message.Message):
__slots__ = ["deduplication_id", "dev_addr", "device_info", "time"]
__slots__ = ["deduplication_id", "dev_addr", "device_info", "relay_rx_info", "time"]
DEDUPLICATION_ID_FIELD_NUMBER: _ClassVar[int]
DEVICE_INFO_FIELD_NUMBER: _ClassVar[int]
DEV_ADDR_FIELD_NUMBER: _ClassVar[int]
RELAY_RX_INFO_FIELD_NUMBER: _ClassVar[int]
TIME_FIELD_NUMBER: _ClassVar[int]
deduplication_id: str
dev_addr: str
device_info: DeviceInfo
relay_rx_info: UplinkRelayRxInfo
time: _timestamp_pb2.Timestamp
def __init__(self, deduplication_id: _Optional[str] = ..., time: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., device_info: _Optional[_Union[DeviceInfo, _Mapping]] = ..., dev_addr: _Optional[str] = ...) -> None: ...
def __init__(self, deduplication_id: _Optional[str] = ..., time: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., device_info: _Optional[_Union[DeviceInfo, _Mapping]] = ..., dev_addr: _Optional[str] = ..., relay_rx_info: _Optional[_Union[UplinkRelayRxInfo, _Mapping]] = ...) -> None: ...
class LocationEvent(_message.Message):
__slots__ = ["deduplication_id", "device_info", "location", "time"]
@ -183,7 +186,7 @@ class TxAckEvent(_message.Message):
def __init__(self, downlink_id: _Optional[int] = ..., time: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., device_info: _Optional[_Union[DeviceInfo, _Mapping]] = ..., queue_item_id: _Optional[str] = ..., f_cnt_down: _Optional[int] = ..., gateway_id: _Optional[str] = ..., tx_info: _Optional[_Union[_gw_pb2.DownlinkTxInfo, _Mapping]] = ...) -> None: ...
class UplinkEvent(_message.Message):
__slots__ = ["adr", "confirmed", "data", "deduplication_id", "dev_addr", "device_info", "dr", "f_cnt", "f_port", "object", "rx_info", "time", "tx_info"]
__slots__ = ["adr", "confirmed", "data", "deduplication_id", "dev_addr", "device_info", "dr", "f_cnt", "f_port", "object", "relay_rx_info", "rx_info", "time", "tx_info"]
ADR_FIELD_NUMBER: _ClassVar[int]
CONFIRMED_FIELD_NUMBER: _ClassVar[int]
DATA_FIELD_NUMBER: _ClassVar[int]
@ -194,6 +197,7 @@ class UplinkEvent(_message.Message):
F_CNT_FIELD_NUMBER: _ClassVar[int]
F_PORT_FIELD_NUMBER: _ClassVar[int]
OBJECT_FIELD_NUMBER: _ClassVar[int]
RELAY_RX_INFO_FIELD_NUMBER: _ClassVar[int]
RX_INFO_FIELD_NUMBER: _ClassVar[int]
TIME_FIELD_NUMBER: _ClassVar[int]
TX_INFO_FIELD_NUMBER: _ClassVar[int]
@ -207,10 +211,27 @@ class UplinkEvent(_message.Message):
f_cnt: int
f_port: int
object: _struct_pb2.Struct
relay_rx_info: UplinkRelayRxInfo
rx_info: _containers.RepeatedCompositeFieldContainer[_gw_pb2.UplinkRxInfo]
time: _timestamp_pb2.Timestamp
tx_info: _gw_pb2.UplinkTxInfo
def __init__(self, deduplication_id: _Optional[str] = ..., time: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., device_info: _Optional[_Union[DeviceInfo, _Mapping]] = ..., dev_addr: _Optional[str] = ..., adr: bool = ..., dr: _Optional[int] = ..., f_cnt: _Optional[int] = ..., f_port: _Optional[int] = ..., confirmed: bool = ..., data: _Optional[bytes] = ..., object: _Optional[_Union[_struct_pb2.Struct, _Mapping]] = ..., rx_info: _Optional[_Iterable[_Union[_gw_pb2.UplinkRxInfo, _Mapping]]] = ..., tx_info: _Optional[_Union[_gw_pb2.UplinkTxInfo, _Mapping]] = ...) -> None: ...
def __init__(self, deduplication_id: _Optional[str] = ..., time: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., device_info: _Optional[_Union[DeviceInfo, _Mapping]] = ..., dev_addr: _Optional[str] = ..., adr: bool = ..., dr: _Optional[int] = ..., f_cnt: _Optional[int] = ..., f_port: _Optional[int] = ..., confirmed: bool = ..., data: _Optional[bytes] = ..., object: _Optional[_Union[_struct_pb2.Struct, _Mapping]] = ..., rx_info: _Optional[_Iterable[_Union[_gw_pb2.UplinkRxInfo, _Mapping]]] = ..., tx_info: _Optional[_Union[_gw_pb2.UplinkTxInfo, _Mapping]] = ..., relay_rx_info: _Optional[_Union[UplinkRelayRxInfo, _Mapping]] = ...) -> None: ...
class UplinkRelayRxInfo(_message.Message):
__slots__ = ["dev_eui", "dr", "frequency", "rssi", "snr", "wor_channel"]
DEV_EUI_FIELD_NUMBER: _ClassVar[int]
DR_FIELD_NUMBER: _ClassVar[int]
FREQUENCY_FIELD_NUMBER: _ClassVar[int]
RSSI_FIELD_NUMBER: _ClassVar[int]
SNR_FIELD_NUMBER: _ClassVar[int]
WOR_CHANNEL_FIELD_NUMBER: _ClassVar[int]
dev_eui: str
dr: int
frequency: int
rssi: int
snr: int
wor_channel: int
def __init__(self, dev_eui: _Optional[str] = ..., frequency: _Optional[int] = ..., dr: _Optional[int] = ..., snr: _Optional[int] = ..., rssi: _Optional[int] = ..., wor_channel: _Optional[int] = ...) -> None: ...
class LogLevel(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
__slots__ = []