pub struct DeviceProfileTemplate {Show 29 fields
pub id: String,
pub name: String,
pub description: String,
pub vendor: String,
pub firmware: 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,
}Fields§
§id: StringDevice-profile template ID.
name: StringName.
description: StringDescription.
vendor: StringVendor.
firmware: StringFirmware.
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. When 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 (only for Class-B). 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).
User defined tags.
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.
Implementations§
Source§impl DeviceProfileTemplate
impl DeviceProfileTemplate
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.
Trait Implementations§
Source§impl Clone for DeviceProfileTemplate
impl Clone for DeviceProfileTemplate
Source§fn clone(&self) -> DeviceProfileTemplate
fn clone(&self) -> DeviceProfileTemplate
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for DeviceProfileTemplate
impl Debug for DeviceProfileTemplate
Source§impl Default for DeviceProfileTemplate
impl Default for DeviceProfileTemplate
Source§impl Message for DeviceProfileTemplate
impl Message for DeviceProfileTemplate
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 DeviceProfileTemplate
impl PartialEq for DeviceProfileTemplate
impl StructuralPartialEq for DeviceProfileTemplate
Auto Trait Implementations§
impl Freeze for DeviceProfileTemplate
impl RefUnwindSafe for DeviceProfileTemplate
impl Send for DeviceProfileTemplate
impl Sync for DeviceProfileTemplate
impl Unpin for DeviceProfileTemplate
impl UnwindSafe for DeviceProfileTemplate
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