[−][src]Struct lorawan::maccommandcreator::NewChannelReqCreator
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
impl NewChannelReqCreator
[src]
pub fn new() -> Self
[src]
Creates a new instance of the class.
pub fn build(&self) -> &[u8]
[src]
Returns the serialized version of the class as bytes.
impl NewChannelReqCreator
[src]
pub fn set_channel_index(&mut self, channel_index: u8) -> &mut Self
[src]
Sets the channel index of the NewChannelReq to the provided value.
Argument
- channel_index - the value to be used as channel_index.
pub fn set_frequency<'a, T: Into<Frequency<'a>>>(
&mut self,
frequency: T
) -> &mut Self
[src]
&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.
pub fn set_data_rate_range<T: Into<DataRateRange>>(
&mut self,
data_rate_range: T
) -> &mut Self
[src]
&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
impl Default for NewChannelReqCreator
[src]
impl SerializableMacCommand for NewChannelReqCreator
[src]
Auto Trait Implementations
impl RefUnwindSafe for NewChannelReqCreator
[src]
impl Send for NewChannelReqCreator
[src]
impl Sync for NewChannelReqCreator
[src]
impl Unpin for NewChannelReqCreator
[src]
impl UnwindSafe for NewChannelReqCreator
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,