#[repr(u32)]pub enum CommandId {
Show 34 variants
BindReceiver = 1,
BindTransmitter = 2,
QuerySm = 3,
SubmitSm = 4,
DeliverSm = 5,
Unbind = 6,
ReplaceSm = 7,
CancelSm = 8,
BindTransceiver = 9,
Outbind = 11,
EnquireLink = 21,
SubmitMulti = 33,
AlertNotification = 258,
DataSm = 259,
BroadcastSm = 273,
QueryBroadcastSm = 274,
CancelBroadcastSm = 275,
GenericNack = 2_147_483_648,
BindReceiverResp = 2_147_483_649,
BindTransmitterResp = 2_147_483_650,
QuerySmResp = 2_147_483_651,
SubmitSmResp = 2_147_483_652,
DeliverSmResp = 2_147_483_653,
UnbindResp = 2_147_483_654,
ReplaceSmResp = 2_147_483_655,
CancelSmResp = 2_147_483_656,
BindTransceiverResp = 2_147_483_657,
EnquireLinkResp = 2_147_483_669,
SubmitMultiResp = 2_147_483_681,
DataSmResp = 2_147_483_907,
BroadcastSmResp = 2_147_483_921,
QueryBroadcastSmResp = 2_147_483_922,
CancelBroadcastSmResp = 2_147_483_923,
Other(u32),
}Expand description
Identifies the SMPP operation e.g. submit_sm, bind_transmitter etc.
The CommandId is encoded as a 4-octet integer value.
CommandIds for request PDUs are allocated from a range of numbers; 0x00000000 to
0x000001FF.
CommandIds for response PDUs are allocated from a range of numbers; 0x80000000 to
0x800001FF.
The relationship between the CommandId for a request PDU and its associated response
PDU is that bit 31 is cleared for the request and set for the response. For example,
replace_sm has a CommandId = 0x00000007 and its’ response PDU replace_sm_resp has
a CommandId = 0x80000007.
XXX: test impl is skipped because we have no default impl for CommandId
Variants§
BindReceiver = 1
BindTransmitter = 2
QuerySm = 3
SubmitSm = 4
DeliverSm = 5
Unbind = 6
ReplaceSm = 7
CancelSm = 8
BindTransceiver = 9
Outbind = 11
EnquireLink = 21
SubmitMulti = 33
AlertNotification = 258
DataSm = 259
BroadcastSm = 273
QueryBroadcastSm = 274
CancelBroadcastSm = 275
GenericNack = 2_147_483_648
BindReceiverResp = 2_147_483_649
BindTransmitterResp = 2_147_483_650
QuerySmResp = 2_147_483_651
SubmitSmResp = 2_147_483_652
DeliverSmResp = 2_147_483_653
UnbindResp = 2_147_483_654
ReplaceSmResp = 2_147_483_655
CancelSmResp = 2_147_483_656
BindTransceiverResp = 2_147_483_657
EnquireLinkResp = 2_147_483_669
SubmitMultiResp = 2_147_483_681
DataSmResp = 2_147_483_907
BroadcastSmResp = 2_147_483_921
QueryBroadcastSmResp = 2_147_483_922
CancelBroadcastSmResp = 2_147_483_923
Other(u32)
Implementations§
Source§impl CommandId
impl CommandId
Sourcepub fn is_operation(self) -> bool
pub fn is_operation(self) -> bool
Returns true if this CommandId represents a request PDU.
Sourcepub fn is_response(self) -> bool
pub fn is_response(self) -> bool
Returns true if this CommandId represents a response PDU.
Sourcepub fn matching_request(self) -> CommandId
pub fn matching_request(self) -> CommandId
Returns the matching request CommandId
Note that this function should be used only on response Ids.
Sourcepub fn matching_response(self) -> CommandId
pub fn matching_response(self) -> CommandId
Returns the matching response CommandId
Note that this function should be used only on request Ids.
If the command does not have a response, then it will return CommandId::Other.
Trait Implementations§
Source§impl<'arbitrary> Arbitrary<'arbitrary> for CommandId
impl<'arbitrary> Arbitrary<'arbitrary> for CommandId
Source§fn arbitrary(u: &mut Unstructured<'arbitrary>) -> Result<Self>
fn arbitrary(u: &mut Unstructured<'arbitrary>) -> Result<Self>
Self from the given unstructured data. Read moreSource§fn arbitrary_take_rest(u: Unstructured<'arbitrary>) -> Result<Self>
fn arbitrary_take_rest(u: Unstructured<'arbitrary>) -> Result<Self>
Self from the entirety of the given
unstructured data. Read moreSource§fn size_hint(depth: usize) -> (usize, Option<usize>)
fn size_hint(depth: usize) -> (usize, Option<usize>)
Unstructured this type
needs to construct itself. Read moreSource§fn try_size_hint(
depth: usize,
) -> Result<(usize, Option<usize>), MaxRecursionReached>
fn try_size_hint( depth: usize, ) -> Result<(usize, Option<usize>), MaxRecursionReached>
Unstructured this type
needs to construct itself. Read moreSource§impl<'de> Deserialize<'de> for CommandId
impl<'de> Deserialize<'de> for CommandId
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Ord for CommandId
impl Ord for CommandId
Source§impl PartialOrd for CommandId
impl PartialOrd for CommandId
impl Copy for CommandId
impl Eq for CommandId
impl StructuralPartialEq for CommandId
Auto Trait Implementations§
impl Freeze for CommandId
impl RefUnwindSafe for CommandId
impl Send for CommandId
impl Sync for CommandId
impl Unpin for CommandId
impl UnwindSafe for CommandId
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
clone_to_uninit)