[−][src]Struct huawei_modem::pdu::Pdu
An SMS-SUBMIT PDU.
NB: For simple usage, ignore 99% of the stuff in this module and just use
Pdu::make_simple_message
!
Fields
sca: Option<PduAddress>
Service centre address, if provided here.
If you haven't set the service center address for all messages (see the set_smsc_addr
function in cmd::sms
), you'll need to provide it in SMS-SUBMIT PDUs using the set_sca
method.
first_octet: PduFirstOctet
First octet (contains some extra fields).
message_id: u8
Message ID.
This is set to 0 in make_simple_message
. Presumably, you might ostensibly be able to use
it to store outgoing messages in modem memory and then address them later?
destination: PduAddress
Destination address (i.e. mesage recipient).
dcs: DataCodingScheme
Message data coding scheme.
validity_period: u8
Validity period (used for message expiry).
FIXME: as yet undocumented.
user_data: Vec<u8>
User data.
user_data_len: u8
User data length.
Methods
impl Pdu
[src]
pub fn set_sca(&mut self, sca: PduAddress)
[src]
Set the SMS service centre address.
pub fn make_simple_message(recipient: PduAddress, msg: GsmMessageData) -> Self
[src]
Simple helper function to send a message to someone, prefilling in all the annoying fields for you.
impl Pdu
[src]
pub fn as_bytes(&self) -> (Vec<u8>, usize)
[src]
Convert to wire-format bytes, with a TPDU length value.
Trait Implementations
impl PartialEq<Pdu> for Pdu
[src]
impl Clone for Pdu
[src]
fn clone(&self) -> Pdu
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Eq for Pdu
[src]
impl Debug for Pdu
[src]
Auto Trait Implementations
Blanket Implementations
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> From for T
[src]
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,