Struct lorawan::maccommandcreator::NewChannelReqCreator
source · pub struct NewChannelReqCreator { /* private fields */ }
Expand description
NewChannelReqCreator serves for creating NewChannelReq MacCommand.
Examples
let mut creator = lorawan::maccommandcreator::NewChannelReqCreator::new();
let res = creator
.set_channel_index(0x0f)
.set_frequency(&[0x12, 0x34, 0x56])
.set_data_rate_range(0x53)
.build();
Implementations§
source§impl NewChannelReqCreator
impl NewChannelReqCreator
sourcepub fn set_channel_index(&mut self, channel_index: u8) -> &mut Self
pub fn set_channel_index(&mut self, channel_index: u8) -> &mut Self
Sets the channel index of the NewChannelReq to the provided value.
Argument
- channel_index - the value to be used as channel_index.
sourcepub fn set_frequency<'a, T: Into<Frequency<'a>>>(
&mut self,
frequency: T
) -> &mut Self
pub fn set_frequency<'a, T: Into<Frequency<'a>>>( &mut self, frequency: T ) -> &mut Self
Sets the frequency of the NewChannelReq to the provided value.
Argument
- frequency - instance of maccommands::Frequency or anything that can be converted into it.
sourcepub fn set_data_rate_range<T: Into<DataRateRange>>(
&mut self,
data_rate_range: T
) -> &mut Self
pub fn set_data_rate_range<T: Into<DataRateRange>>( &mut self, data_rate_range: T ) -> &mut Self
Sets the data rate range of the NewChannelReq to the provided value.
Argument
- data_rate_range - instance of maccommands::DataRateRange or anything that can be converted into it.
Trait Implementations§
source§impl Debug for NewChannelReqCreator
impl Debug for NewChannelReqCreator
source§impl Default for NewChannelReqCreator
impl Default for NewChannelReqCreator
Auto Trait Implementations§
impl RefUnwindSafe for NewChannelReqCreator
impl Send for NewChannelReqCreator
impl Sync for NewChannelReqCreator
impl Unpin for NewChannelReqCreator
impl UnwindSafe for NewChannelReqCreator
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
Mutably borrows from an owned value. Read more