syntax = "proto3";
package ns;
option go_package = "github.com/brocaar/chirpstack-api/ns";
enum RatePolicy {
// Drop
DROP = 0;
// Mark
MARK = 1;
}
message ServiceProfile {
// Service-profile ID.
bytes id = 1;
// Token bucket filling rate, including ACKs (packet/h).
uint32 ul_rate = 2;
// Token bucket burst size.
uint32 ul_bucket_size = 3;
// Drop or mark when exceeding ULRate.
RatePolicy ul_rate_policy = 4;
// Token bucket filling rate, including ACKs (packet/h).
uint32 dl_rate = 5;
// Token bucket burst size.
uint32 dl_bucket_size = 6;
// Drop or mark when exceeding DLRate.
RatePolicy dl_rate_policy = 7;
// GW metadata (RSSI, SNR, GW geoloc., etc.) are added to the packet sent to AS.
bool add_gw_metadata = 8;
// Frequency to initiate an End-Device status request (request/day).
uint32 dev_status_req_freq = 9;
// Report End-Device battery level to AS.
bool report_dev_status_battery = 10;
// Report End-Device margin to AS.
bool report_dev_status_margin = 11;
// Minimum allowed data rate. Used for ADR.
uint32 dr_min = 12;
// Maximum allowed data rate. Used for ADR.
uint32 dr_max = 13;
// Channel mask. sNS does not have to obey (i.e., informative).
bytes channel_mask = 14;
// Passive Roaming allowed.
bool pr_allowed = 15;
// Handover Roaming allowed.
bool hr_allowed = 16;
// Roaming Activation allowed.
bool ra_allowed = 17;
// Enable network geolocation service.
bool nwk_geo_loc = 18;
// Target Packet Error Rate.
uint32 target_per = 19;
// Minimum number of receiving GWs (informative).
uint32 min_gw_diversity = 20;
}
message DeviceProfile {
// Device-profile ID.
bytes id = 1;
// End-Device supports Class B.
bool supports_class_b = 2;
// Maximum delay for the End-Device to answer a MAC request or a confirmed DL frame (mandatory if class B mode supported).
uint32 class_b_timeout = 3;
// Mandatory if class B mode supported.
uint32 ping_slot_period = 4;
// Mandatory if class B mode supported.
uint32 ping_slot_dr = 5;
// Mandatory if class B mode supported.
uint32 ping_slot_freq = 6;
// End-Device supports Class C.
bool supports_class_c = 7;
// Maximum delay for the End-Device to answer a MAC request or a confirmed DL frame (mandatory if class C mode supported).
uint32 class_c_timeout = 8;
// Version of the LoRaWAN supported by the End-Device.
string mac_version = 9;
// Revision of the Regional Parameters document supported by the End-Device.
string reg_params_revision = 10;
// Class A RX1 delay (mandatory for ABP).
uint32 rx_delay_1 = 11;
// RX1 data rate offset (mandatory for ABP).
uint32 rx_dr_offset_1 = 12;
// RX2 data rate (mandatory for ABP).
uint32 rx_datarate_2 = 13;
// RX2 channel frequency (mandatory for ABP).
uint32 rx_freq_2 = 14;
// List of factory-preset frequencies (mandatory for ABP).
repeated uint32 factory_preset_freqs = 15;
// Maximum EIRP supported by the End-Device.
uint32 max_eirp = 16;
// Maximum duty cycle supported by the End-Device.
uint32 max_duty_cycle = 17;
// End-Device supports Join (OTAA) or not (ABP).
bool supports_join = 18;
// RF region name.
string rf_region = 19;
// End-Device uses 32bit FCnt (mandatory for LoRaWAN 1.0 End-Device).
bool supports_32bit_f_cnt = 20;
}
message RoutingProfile {
// ID of the routing profile.
bytes id = 1;
// Application-server ID.
string as_id = 2;
// CA certificate for connecting to the AS.
string ca_cert = 3;
// TLS certificate for connecting to the AS.
string tls_cert = 4;
// TLS key for connecting to the AS.
// Note: when retrieving the routing-profile, the tls_key is not returned
// for security reasons. When updating the routing-profile, an empty tls_key
// does not clear the certificate, unless the tls_cert is also left blank.
string tls_key = 5;
}