Enum rusmpp::commands::pdu::Pdu

source ·
pub enum Pdu {
Show 34 variants BindTransmitter(Bind), BindTransmitterResp(BindResp), BindReceiver(Bind), BindReceiverResp(BindResp), BindTransceiver(Bind), BindTransceiverResp(BindResp), Outbind(Outbind), AlertNotification(AlertNotification), SubmitSm(SubmitSm), SubmitSmResp(SubmitSmResp), QuerySm(QuerySm), QuerySmResp(QuerySmResp), DeliverSm(DeliverSm), DeliverSmResp(SmResp), DataSm(DataSm), DataSmResp(SmResp), CancelSm(CancelSm), ReplaceSm(ReplaceSm), SubmitMulti(SubmitMulti), SubmitMultiResp(SubmitMultiResp), BroadcastSm(BroadcastSm), BroadcastSmResp(BroadcastSmResp), QueryBroadcastSm(QueryBroadcastSm), QueryBroadcastSmResp(QueryBroadcastSmResp), CancelBroadcastSm(CancelBroadcastSm), Unbind, UnbindResp, EnquireLink, EnquireLinkResp, GenericNack, CancelSmResp, ReplaceSmResp, CancelBroadcastSmResp, Other { command_id: CommandId, body: AnyOctetString, },
}

Variants§

§

BindTransmitter(Bind)

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(BindResp)

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(Bind)

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(BindResp)

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(Bind)

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(BindResp)

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)

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)

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)

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)

§

QuerySm(QuerySm)

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)

§

DeliverSm(DeliverSm)

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(SmResp)

§

DataSm(DataSm)

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(SmResp)

§

CancelSm(CancelSm)

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)

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)

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)

§

BroadcastSm(BroadcastSm)

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)

§

QueryBroadcastSm(QueryBroadcastSm)

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)

§

CancelBroadcastSm(CancelBroadcastSm)

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

Trait Implementations§

source§

impl Clone for Pdu

source§

fn clone(&self) -> Pdu

Returns a copy of the value. Read more
1.0.0 · source§

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

Performs copy-assignment from source. Read more
source§

impl Debug for Pdu

source§

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

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

impl DecodeWithKeyOptional for Pdu

§

type Key = CommandId

source§

fn decode_from<R: Read>( key: Self::Key, reader: &mut R, length: usize ) -> Result<Option<Self>, DecodeError>
where Self: Sized,

Decode a value from a reader, using a key to determine the type
source§

impl Encode for Pdu

source§

fn encode_to<W: Write>(&self, writer: &mut W) -> Result<(), EncodeError>

Encode a value to a writer
source§

fn encode_into_vec(&self) -> Result<Vec<u8>, EncodeError>

Encode a value into a vector
source§

impl HasCommandId for Pdu

source§

impl Hash for Pdu

source§

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

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

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 Length for Pdu

source§

fn length(&self) -> usize

Returns the length of the encoded data in bytes.
source§

impl Ord for Pdu

source§

fn cmp(&self, other: &Pdu) -> Ordering

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

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

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

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

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

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

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

impl PartialEq for Pdu

source§

fn eq(&self, other: &Pdu) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd for Pdu

source§

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

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

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

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

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

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

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

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

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

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl Eq for Pdu

source§

impl StructuralPartialEq for Pdu

Auto Trait Implementations§

§

impl Freeze for Pdu

§

impl RefUnwindSafe for Pdu

§

impl Send for Pdu

§

impl Sync for Pdu

§

impl Unpin for Pdu

§

impl UnwindSafe for Pdu

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

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
source§

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

source§

fn into(self) -> U

Calls U::from(self).

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

source§

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

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

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

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

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

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

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

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.
source§

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