Pdu

Enum Pdu 

Source
pub enum Pdu<'a, const N: usize> {
Show 34 variants BindTransmitter(BindTransmitter<'a>), BindTransmitterResp(BindTransmitterResp<'a>), BindReceiver(BindReceiver<'a>), BindReceiverResp(BindReceiverResp<'a>), BindTransceiver(BindTransceiver<'a>), BindTransceiverResp(BindTransceiverResp<'a>), Outbind(Outbind<'a>), AlertNotification(AlertNotification<'a>), SubmitSm(SubmitSm<'a, N>), SubmitSmResp(SubmitSmResp<'a, N>), QuerySm(QuerySm<'a>), QuerySmResp(QuerySmResp<'a>), DeliverSm(DeliverSm<'a, N>), DeliverSmResp(DeliverSmResp<'a, N>), DataSm(DataSm<'a, N>), DataSmResp(DataSmResp<'a, N>), CancelSm(CancelSm<'a>), ReplaceSm(ReplaceSm<'a>), SubmitMulti(SubmitMulti<'a, N>), SubmitMultiResp(SubmitMultiResp<'a, N>), BroadcastSm(BroadcastSm<'a, N>), BroadcastSmResp(BroadcastSmResp<'a, N>), QueryBroadcastSm(QueryBroadcastSm<'a>), QueryBroadcastSmResp(QueryBroadcastSmResp<'a, N>), CancelBroadcastSm(CancelBroadcastSm<'a, N>), Unbind, UnbindResp, EnquireLink, EnquireLinkResp, GenericNack, CancelSmResp, ReplaceSmResp, CancelBroadcastSmResp, Other { command_id: CommandId, body: AnyOctetString<'a>, },
}
Expand description

SMPP PDU.

Variants§

§

BindTransmitter(BindTransmitter<'a>)

Authentication PDU used by a transmitter ESME to bind to the Message Centre. The PDU contains identification information and an access password for the ESME.

§

BindTransmitterResp(BindTransmitterResp<'a>)

Message Centre response to a bind_transmitter PDU. This PDU indicates the success or failure of the ESME’s attempt to bind as a transmitter.

§

BindReceiver(BindReceiver<'a>)

Authentication PDU used by a receiver ESME to bind to the Message Centre. The PDU contains identification information, an access password for the ESME and may also contain routing information specifying the range of addresses serviced by the ESME.

§

BindReceiverResp(BindReceiverResp<'a>)

Message Centre response to a bind_receiver PDU. This PDU indicates the success or failure of the ESME’s attempt to bind as a receiver.

§

BindTransceiver(BindTransceiver<'a>)

Authentication PDU used by a transceiver ESME to bind to the Message Centre. The PDU contains identification information, an access password for the ESME and may also contain routing information specifying the range of addresses serviced by the ESME.

§

BindTransceiverResp(BindTransceiverResp<'a>)

Message Centre response to a bind_transceiver PDU. This PDU indicates the success or failure of the ESME’s attempt to bind as a transceiver.

§

Outbind(Outbind<'a>)

Authentication PDU used by a Message Centre to Outbind to an ESME to inform it that messages are present in the MC. The PDU contains identification, and access password for the ESME. If the ESME authenticates the request, it will respond with a bind_receiver or bind_transceiver to begin the process of binding into the MC.

§

AlertNotification(AlertNotification<'a>)

The alert_notification PDU is sent by the MC to the ESME across a Receiver or Transceiver session. It is sent when the MC has detected that a particular mobile subscriber has become available and a delivery pending flag had been previously set for that subscriber by means of the set_dpf TLV.

A typical use of this operation is to trigger a data content ‘Push’ to the subscriber from a WAP Proxy Server.

Note: There is no associated alert_notification_resp PDU.

§

SubmitSm(SubmitSm<'a, N>)

This operation is used by an ESME to submit a short message to the MC for onward transmission to a specified short message entity (SME).

§

SubmitSmResp(SubmitSmResp<'a, N>)

§

QuerySm(QuerySm<'a>)

This command is issued by the ESME to query the status of a previously submitted short message. The matching mechanism is based on the MC assigned message_id and source address. Where the original submit_sm, data_sm or submit_multi ‘source address’ was defaulted to NULL, then the source address in the query_sm command should also be set to NULL.

§

QuerySmResp(QuerySmResp<'a>)

§

DeliverSm(DeliverSm<'a, N>)

The deliver_sm is issued by the MC to send a message to an ESME. Using this command, the MC may route a short message to the ESME for delivery.

§

DeliverSmResp(DeliverSmResp<'a, N>)

§

DataSm(DataSm<'a, N>)

The data_sm operation is similar to the submit_sm in that it provides a means to submit a mobile-terminated message. However, data_sm is intended for packet-based applications such as WAP in that it features a reduced PDU body containing fields relevant to WAP or packet-based applications.

§

DataSmResp(DataSmResp<'a, N>)

§

CancelSm(CancelSm<'a>)

This command is issued by the ESME to cancel one or more previously submitted short messages that are pending delivery. The command may specify a particular message to cancel, or all messages matching a particular source, destination and service_type.

If the message_id is set to the ID of a previously submitted message, then provided the source address supplied by the ESME matches that of the stored message, that message will be cancelled.

If the message_id is NULL, all outstanding undelivered messages with matching source and destination addresses (and service_type if specified) are cancelled. Where the original submit_sm, data_sm or submit_multi ‘source address’ is defaulted to NULL, then the source address in the cancel_sm command should also be NULL.

§

ReplaceSm(ReplaceSm<'a>)

This command is issued by the ESME to replace a previously submitted short message that is pending delivery. The matching mechanism is based on the message_id and source address of the original message.

Where the original submit_sm ‘source address’ was defaulted to NULL, then the source address in the replace_sm command should also be NULL.

§

SubmitMulti(SubmitMulti<'a, N>)

The submit_multi operation is an enhanced variation of submit_sm designed to support up to 255 different destinations instead of the default single destination. It provides an efficient means of sending the same message to several different subscribers at the same time.

§

SubmitMultiResp(SubmitMultiResp<'a, N>)

§

BroadcastSm(BroadcastSm<'a, N>)

This operation is issued by the ESME to submit a message to the Message Centre for broadcast to a specified geographical area or set of geographical areas.

§

BroadcastSmResp(BroadcastSmResp<'a, N>)

§

QueryBroadcastSm(QueryBroadcastSm<'a>)

This command is issued by the ESME to query the status of a previously submitted broadcast message. The message can be queried either on the basis of the Message Center assigned reference message_id returned in the broadcast_sm_resp or by the ESME assigned message reference number user_message_reference as indicated in the broadcast_sm operation associated with that message.

Note: Where the broadcast is queried on the basis of the ESME assigned message reference user_message_reference this should be qualified within the service by the system_id and/or the system_type associated with the query_broadcast_sm operation (specified in the bind operation). If more than one message with the same user_message_reference value is present in the Message Center, the details of the most recently submitted message with the specified user_message_reference value will be returned in the query_broadcast_sm_resp.

§

QueryBroadcastSmResp(QueryBroadcastSmResp<'a, N>)

§

CancelBroadcastSm(CancelBroadcastSm<'a, N>)

This command is issued by the ESME to cancel a broadcast message which has been previously submitted to the Message Centre for broadcast via broadcast_sm and which is still pending delivery.

If the message_id is set to the ID of a previously submitted message, then provided the source address supplied by the ESME matches that of the stored message, that message will be cancelled.

If the message_id is NULL, all outstanding undelivered messages with matching source and destination addresses (and service_type if specified) are cancelled.

If the user_message_reference is set to the ESME-assigned reference of a previously submitted message, then provided the source address supplied by the ESME matches that of the stored message, that message will be cancelled.

Where the original broadcast_sm ‘source address’ was defaulted to NULL, then the source address in the cancel_broadcast_sm command should also be NULL.

§

Unbind

This PDU can be sent by the ESME or MC as a means of initiating the termination of a SMPP session.

§

UnbindResp

This PDU can be sent by the ESME or MC as a means of acknowledging the receipt of an unbind request. After sending this PDU the MC typically closes the network connection.

This PDU can be sent by the ESME or MC to test the network connection. The receiving peer is expected to acknowledge the PDU as a means of verifying the test.

§

EnquireLinkResp

This PDU is used to acknowledge an enquire_link request sent by an ESME or MC.

§

GenericNack

This PDU can be sent by an ESME or MC as a means of indicating the receipt of an invalid PDU. The receipt of a generic_nack usually indicates that the remote peer either cannot identify the PDU or has deemed it an invalid PDU due to its size or content.

§

CancelSmResp

The MC returns this PDU to indicate the success or failure of a cancel_sm PDU.

§

ReplaceSmResp

The replace_sm_resp PDU indicates the success or failure of a replace_sm PDU.

§

CancelBroadcastSmResp

The MC returns a query_broadcast_sm_resp PDU as a means of indicating the result of a broadcast query attempt. The PDU will indicate the success or failure of the attempt and for successful attempts will also include the current state of the message.

§

Other

Fields

§command_id: CommandId

Implementations§

Source§

impl<'a, const N: usize> Pdu<'a, N>

Source

pub const fn command_id(&self) -> CommandId

Trait Implementations§

Source§

impl<'a, const N: usize> Clone for Pdu<'a, N>

Source§

fn clone(&self) -> Pdu<'a, N>

Returns a duplicate of the value. Read more
1.0.0§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<'a, const N: usize> Debug for Pdu<'a, N>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl<'a, const N: usize> DecodeWithKeyOptional<'a> for Pdu<'a, N>

Source§

type Key = CommandId

Source§

fn decode( key: <Pdu<'a, N> as DecodeWithKeyOptional<'a>>::Key, src: &'a [u8], length: usize, ) -> Result<Option<(Pdu<'a, N>, usize)>, DecodeError>

Decode an optional value from a slice, using a key to determine the type.
Source§

impl<const N: usize> Encode for Pdu<'_, N>

Source§

fn encode(&self, dst: &mut [u8]) -> usize

Encode a value into a slice. Read more
Source§

impl<'a, const N: usize> From<AlertNotification<'a>> for Pdu<'a, N>

Source§

fn from(value: AlertNotification<'a>) -> Pdu<'a, N>

Converts to this type from the input type.
Source§

impl<'a, const N: usize> From<BindReceiver<'a>> for Pdu<'a, N>

Source§

fn from(value: BindReceiver<'a>) -> Pdu<'a, N>

Converts to this type from the input type.
Source§

impl<'a, const N: usize> From<BindReceiverResp<'a>> for Pdu<'a, N>

Source§

fn from(value: BindReceiverResp<'a>) -> Pdu<'a, N>

Converts to this type from the input type.
Source§

impl<'a, const N: usize> From<BindTransceiver<'a>> for Pdu<'a, N>

Source§

fn from(value: BindTransceiver<'a>) -> Pdu<'a, N>

Converts to this type from the input type.
Source§

impl<'a, const N: usize> From<BindTransceiverResp<'a>> for Pdu<'a, N>

Source§

fn from(value: BindTransceiverResp<'a>) -> Pdu<'a, N>

Converts to this type from the input type.
Source§

impl<'a, const N: usize> From<BindTransmitter<'a>> for Pdu<'a, N>

Source§

fn from(value: BindTransmitter<'a>) -> Pdu<'a, N>

Converts to this type from the input type.
Source§

impl<'a, const N: usize> From<BindTransmitterResp<'a>> for Pdu<'a, N>

Source§

fn from(value: BindTransmitterResp<'a>) -> Pdu<'a, N>

Converts to this type from the input type.
Source§

impl<'a, const N: usize> From<BroadcastSm<'a, N>> for Pdu<'a, N>

Source§

fn from(value: BroadcastSm<'a, N>) -> Pdu<'a, N>

Converts to this type from the input type.
Source§

impl<'a, const N: usize> From<BroadcastSmResp<'a, N>> for Pdu<'a, N>

Source§

fn from(value: BroadcastSmResp<'a, N>) -> Pdu<'a, N>

Converts to this type from the input type.
Source§

impl<'a, const N: usize> From<CancelBroadcastSm<'a, N>> for Pdu<'a, N>

Source§

fn from(value: CancelBroadcastSm<'a, N>) -> Pdu<'a, N>

Converts to this type from the input type.
Source§

impl<'a, const N: usize> From<CancelSm<'a>> for Pdu<'a, N>

Source§

fn from(value: CancelSm<'a>) -> Pdu<'a, N>

Converts to this type from the input type.
Source§

impl<'a, const N: usize> From<DataSm<'a, N>> for Pdu<'a, N>

Source§

fn from(value: DataSm<'a, N>) -> Pdu<'a, N>

Converts to this type from the input type.
Source§

impl<'a, const N: usize> From<DataSmResp<'a, N>> for Pdu<'a, N>

Source§

fn from(value: DataSmResp<'a, N>) -> Pdu<'a, N>

Converts to this type from the input type.
Source§

impl<'a, const N: usize> From<DeliverSm<'a, N>> for Pdu<'a, N>

Source§

fn from(value: DeliverSm<'a, N>) -> Pdu<'a, N>

Converts to this type from the input type.
Source§

impl<'a, const N: usize> From<DeliverSmResp<'a, N>> for Pdu<'a, N>

Source§

fn from(value: DeliverSmResp<'a, N>) -> Pdu<'a, N>

Converts to this type from the input type.
Source§

impl<'a, const N: usize> From<Outbind<'a>> for Pdu<'a, N>

Source§

fn from(value: Outbind<'a>) -> Pdu<'a, N>

Converts to this type from the input type.
Source§

impl<'a, const N: usize> From<QueryBroadcastSm<'a>> for Pdu<'a, N>

Source§

fn from(value: QueryBroadcastSm<'a>) -> Pdu<'a, N>

Converts to this type from the input type.
Source§

impl<'a, const N: usize> From<QueryBroadcastSmResp<'a, N>> for Pdu<'a, N>

Source§

fn from(value: QueryBroadcastSmResp<'a, N>) -> Pdu<'a, N>

Converts to this type from the input type.
Source§

impl<'a, const N: usize> From<QuerySm<'a>> for Pdu<'a, N>

Source§

fn from(value: QuerySm<'a>) -> Pdu<'a, N>

Converts to this type from the input type.
Source§

impl<'a, const N: usize> From<QuerySmResp<'a>> for Pdu<'a, N>

Source§

fn from(value: QuerySmResp<'a>) -> Pdu<'a, N>

Converts to this type from the input type.
Source§

impl<'a, const N: usize> From<ReplaceSm<'a>> for Pdu<'a, N>

Source§

fn from(value: ReplaceSm<'a>) -> Pdu<'a, N>

Converts to this type from the input type.
Source§

impl<'a, const N: usize> From<SubmitMulti<'a, N>> for Pdu<'a, N>

Source§

fn from(value: SubmitMulti<'a, N>) -> Pdu<'a, N>

Converts to this type from the input type.
Source§

impl<'a, const N: usize> From<SubmitMultiResp<'a, N>> for Pdu<'a, N>

Source§

fn from(value: SubmitMultiResp<'a, N>) -> Pdu<'a, N>

Converts to this type from the input type.
Source§

impl<'a, const N: usize> From<SubmitSm<'a, N>> for Pdu<'a, N>

Source§

fn from(value: SubmitSm<'a, N>) -> Pdu<'a, N>

Converts to this type from the input type.
Source§

impl<'a, const N: usize> From<SubmitSmResp<'a, N>> for Pdu<'a, N>

Source§

fn from(value: SubmitSmResp<'a, N>) -> Pdu<'a, N>

Converts to this type from the input type.
Source§

impl<'a, const N: usize> Hash for Pdu<'a, N>

Source§

fn hash<__H>(&self, state: &mut __H)
where __H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl<const N: usize> Length for Pdu<'_, N>

Source§

fn length(&self) -> usize

Source§

impl<'a, const N: usize> Ord for Pdu<'a, N>

Source§

fn cmp(&self, other: &Pdu<'a, N>) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
Source§

impl<'a, const N: usize> PartialEq for Pdu<'a, N>

Source§

fn eq(&self, other: &Pdu<'a, N>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<'a, const N: usize> PartialOrd for Pdu<'a, N>

Source§

fn partial_cmp(&self, other: &Pdu<'a, N>) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl<'a, const N: usize> Eq for Pdu<'a, N>

Source§

impl<'a, const N: usize> StructuralPartialEq for Pdu<'a, N>

Auto Trait Implementations§

§

impl<'a, const N: usize> Freeze for Pdu<'a, N>

§

impl<'a, const N: usize> RefUnwindSafe for Pdu<'a, N>

§

impl<'a, const N: usize> Send for Pdu<'a, N>

§

impl<'a, const N: usize> Sync for Pdu<'a, N>

§

impl<'a, const N: usize> Unpin for Pdu<'a, N>

§

impl<'a, const N: usize> UnwindSafe for Pdu<'a, N>

Blanket Implementations§

§

impl<T> Any for T
where T: 'static + ?Sized,

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<T> Borrow<T> for T
where T: ?Sized,

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

impl<T> BorrowMut<T> for T
where T: ?Sized,

§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> CloneToUninit for T
where T: Clone,

§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
§

impl<T, U> Into<U> for T
where U: From<T>,

§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
§

impl<T, U> TryFrom<U> for T
where 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>

Performs the conversion.
§

impl<T, U> TryInto<U> for T
where 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>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more