pub struct DeviceProfile {Show 54 fields
pub id: String,
pub tenant_id: String,
pub name: String,
pub description: String,
pub region: i32,
pub mac_version: i32,
pub reg_params_revision: i32,
pub adr_algorithm_id: String,
pub payload_codec_runtime: i32,
pub payload_codec_script: String,
pub flush_queue_on_activate: bool,
pub uplink_interval: u32,
pub device_status_req_interval: u32,
pub supports_otaa: bool,
pub supports_class_b: bool,
pub supports_class_c: bool,
pub class_b_timeout: u32,
pub class_b_ping_slot_periodicity: u32,
pub class_b_ping_slot_dr: u32,
pub class_b_ping_slot_freq: u32,
pub class_c_timeout: u32,
pub abp_rx1_delay: u32,
pub abp_rx1_dr_offset: u32,
pub abp_rx2_dr: u32,
pub abp_rx2_freq: u32,
pub tags: HashMap<String, String>,
pub measurements: HashMap<String, Measurement>,
pub auto_detect_measurements: bool,
pub region_config_id: String,
pub is_relay: bool,
pub is_relay_ed: bool,
pub relay_ed_relay_only: bool,
pub relay_enabled: bool,
pub relay_cad_periodicity: i32,
pub relay_default_channel_index: u32,
pub relay_second_channel_freq: u32,
pub relay_second_channel_dr: u32,
pub relay_second_channel_ack_offset: i32,
pub relay_ed_activation_mode: i32,
pub relay_ed_smart_enable_level: u32,
pub relay_ed_back_off: u32,
pub relay_ed_uplink_limit_bucket_size: u32,
pub relay_ed_uplink_limit_reload_rate: u32,
pub relay_join_req_limit_reload_rate: u32,
pub relay_notify_limit_reload_rate: u32,
pub relay_global_uplink_limit_reload_rate: u32,
pub relay_overall_limit_reload_rate: u32,
pub relay_join_req_limit_bucket_size: u32,
pub relay_notify_limit_bucket_size: u32,
pub relay_global_uplink_limit_bucket_size: u32,
pub relay_overall_limit_bucket_size: u32,
pub allow_roaming: bool,
pub rx1_delay: u32,
pub app_layer_params: Option<AppLayerParams>,
}Fields§
§id: StringDevice-profile ID (UUID). Note: on create this will be automatically generated.
tenant_id: StringTenant ID (UUID).
name: StringName.
description: StringDescription.
region: i32Region.
mac_version: i32LoRaWAN mac-version.
reg_params_revision: i32Regional parameters revision.
adr_algorithm_id: StringADR algorithm ID.
payload_codec_runtime: i32Payload codec runtime.
payload_codec_script: StringPayload codec script.
flush_queue_on_activate: boolFlush queue on device activation.
uplink_interval: u32Uplink interval (seconds). This defines the expected uplink interval which the device uses for communication. If the uplink interval has expired and no uplink has been received, the device is considered inactive.
device_status_req_interval: u32Device-status request interval (times / day). This defines the times per day that ChirpStack will request the device-status from the device.
supports_otaa: boolSupports OTAA.
supports_class_b: boolSupports Class B.
supports_class_c: boolSupports Class-C.
class_b_timeout: u32Class-B timeout (seconds). This is the maximum time ChirpStack will wait to receive an acknowledgement from the device (if requested).
class_b_ping_slot_periodicity: u32Class-B ping-slot periodicity. Valid options are: 0 - 7.
Number of ping-slots per beacon-period: pingNb = 2^(7-periodicity)
Periodicity: 0 = 128 ping-slots per beacon period = ~ every 1 sec Periodicity: 7 = 1 ping-slot per beacon period = ~ every 128 sec
class_b_ping_slot_dr: u32Class-B ping-slot DR.
class_b_ping_slot_freq: u32Class-B ping-slot freq (Hz).
class_c_timeout: u32Class-C timeout (seconds). This is the maximum time ChirpStack will wait to receive an acknowledgement from the device (if requested).
abp_rx1_delay: u32RX1 delay (for ABP).
abp_rx1_dr_offset: u32RX1 DR offset (for ABP).
abp_rx2_dr: u32RX2 DR (for ABP).
abp_rx2_freq: u32RX2 frequency (for ABP, Hz).
Tags (user defined). These tags can be used to add additional information the the device-profile. These tags are exposed in all the integration events of devices using this device-profile.
measurements: HashMap<String, Measurement>Measurements. If defined, ChirpStack will visualize these metrics in the web-interface.
auto_detect_measurements: boolAuto-detect measurements. If set to true, measurements will be automatically added based on the keys of the decoded payload. In cases where the decoded payload contains random keys in the data, you want to set this to false.
region_config_id: StringRegion 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.
is_relay: boolDevice 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.
is_relay_ed: boolDevice 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.
relay_ed_relay_only: boolEnd-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.
relay_enabled: boolRelay must be enabled.
relay_cad_periodicity: i32Relay CAD periodicity.
relay_default_channel_index: u32Relay default channel index. Valid values are 0 and 1, please refer to the RP002 specification for the meaning of these values.
relay_second_channel_freq: u32Relay second channel frequency (Hz).
relay_second_channel_dr: u32Relay second channel DR.
relay_second_channel_ack_offset: i32Relay second channel ACK offset.
relay_ed_activation_mode: i32Relay end-device activation mode.
relay_ed_smart_enable_level: u32Relay end-device smart-enable level.
relay_ed_back_off: u32Relay 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
relay_ed_uplink_limit_bucket_size: u32Relay 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
relay_ed_uplink_limit_reload_rate: u32Relay end-device uplink limit reload rate.
Valid values:
- 0 - 62 = X tokens every hour
- 63 = no limitation
relay_join_req_limit_reload_rate: u32Relay join-request limit reload rate.
Valid values:
- 0 - 126 = X tokens every hour
- 127 = no limitation
relay_notify_limit_reload_rate: u32Relay notify limit reload rate.
Valid values:
- 0 - 126 = X tokens every hour
- 127 = no limitation
relay_global_uplink_limit_reload_rate: u32Relay global uplink limit reload rate.
Valid values:
- 0 - 126 = X tokens every hour
- 127 = no limitation
relay_overall_limit_reload_rate: u32Relay overall limit reload rate.
Valid values:
- 0 - 126 = X tokens every hour
- 127 = no limitation
relay_join_req_limit_bucket_size: u32Relay 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
relay_notify_limit_bucket_size: u32Relay 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
relay_global_uplink_limit_bucket_size: u32Relay 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
relay_overall_limit_bucket_size: u32Relay 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
allow_roaming: boolAllow roaming.
If set to true, it means that the device is allowed to use roaming.
rx1_delay: u32RX1 Delay.
This makes it possible to override the system RX1 Delay. Please note that this values only has effect in case it is higher than the system value. In other words, it can be used to increase the RX1 Delay but not to decrease it. Valid options are 1 - 15 (0 = always use system RX1 Delay).
app_layer_params: Option<AppLayerParams>Application Layer parameters.
Implementations§
Source§impl DeviceProfile
impl DeviceProfile
Sourcepub fn region(&self) -> Region
pub fn region(&self) -> Region
Returns the enum value of region, or the default if the field is set to an invalid enum value.
Sourcepub fn set_region(&mut self, value: Region)
pub fn set_region(&mut self, value: Region)
Sets region to the provided enum value.
Sourcepub fn mac_version(&self) -> MacVersion
pub fn mac_version(&self) -> MacVersion
Returns the enum value of mac_version, or the default if the field is set to an invalid enum value.
Sourcepub fn set_mac_version(&mut self, value: MacVersion)
pub fn set_mac_version(&mut self, value: MacVersion)
Sets mac_version to the provided enum value.
Sourcepub fn reg_params_revision(&self) -> RegParamsRevision
pub fn reg_params_revision(&self) -> RegParamsRevision
Returns the enum value of reg_params_revision, or the default if the field is set to an invalid enum value.
Sourcepub fn set_reg_params_revision(&mut self, value: RegParamsRevision)
pub fn set_reg_params_revision(&mut self, value: RegParamsRevision)
Sets reg_params_revision to the provided enum value.
Sourcepub fn payload_codec_runtime(&self) -> CodecRuntime
pub fn payload_codec_runtime(&self) -> CodecRuntime
Returns the enum value of payload_codec_runtime, or the default if the field is set to an invalid enum value.
Sourcepub fn set_payload_codec_runtime(&mut self, value: CodecRuntime)
pub fn set_payload_codec_runtime(&mut self, value: CodecRuntime)
Sets payload_codec_runtime to the provided enum value.
Sourcepub fn relay_cad_periodicity(&self) -> CadPeriodicity
pub fn relay_cad_periodicity(&self) -> CadPeriodicity
Returns the enum value of relay_cad_periodicity, or the default if the field is set to an invalid enum value.
Sourcepub fn set_relay_cad_periodicity(&mut self, value: CadPeriodicity)
pub fn set_relay_cad_periodicity(&mut self, value: CadPeriodicity)
Sets relay_cad_periodicity to the provided enum value.
Sourcepub fn relay_second_channel_ack_offset(&self) -> SecondChAckOffset
pub fn relay_second_channel_ack_offset(&self) -> SecondChAckOffset
Returns the enum value of relay_second_channel_ack_offset, or the default if the field is set to an invalid enum value.
Sourcepub fn set_relay_second_channel_ack_offset(&mut self, value: SecondChAckOffset)
pub fn set_relay_second_channel_ack_offset(&mut self, value: SecondChAckOffset)
Sets relay_second_channel_ack_offset to the provided enum value.
Sourcepub fn relay_ed_activation_mode(&self) -> RelayModeActivation
pub fn relay_ed_activation_mode(&self) -> RelayModeActivation
Returns the enum value of relay_ed_activation_mode, or the default if the field is set to an invalid enum value.
Sourcepub fn set_relay_ed_activation_mode(&mut self, value: RelayModeActivation)
pub fn set_relay_ed_activation_mode(&mut self, value: RelayModeActivation)
Sets relay_ed_activation_mode to the provided enum value.
Trait Implementations§
Source§impl Clone for DeviceProfile
impl Clone for DeviceProfile
Source§fn clone(&self) -> DeviceProfile
fn clone(&self) -> DeviceProfile
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for DeviceProfile
impl Debug for DeviceProfile
Source§impl Default for DeviceProfile
impl Default for DeviceProfile
Source§impl Message for DeviceProfile
impl Message for DeviceProfile
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self.Source§impl PartialEq for DeviceProfile
impl PartialEq for DeviceProfile
impl StructuralPartialEq for DeviceProfile
Auto Trait Implementations§
impl Freeze for DeviceProfile
impl RefUnwindSafe for DeviceProfile
impl Send for DeviceProfile
impl Sync for DeviceProfile
impl Unpin for DeviceProfile
impl UnwindSafe for DeviceProfile
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request