SMPPEX.Pdu.MessageState (smppex v3.0.4) View Source

Module for operating with deliver_sm message states.

Link to this section Summary

Functions

Converts atom representing message state to integer value.

Converts integer message state value to string representation.

Link to this section Types

Specs

state() :: integer()

Specs

state_name() :: atom()

Link to this section Functions

Link to this function

code_by_name(state_name)

View Source

Specs

code_by_name(state_name()) :: state()

Converts atom representing message state to integer value.

Example

iex(1)> SMPPEX.Pdu.MessageState.code_by_name(:DELIVERED)
2

Specs

format(state()) :: String.t()

Converts integer message state value to string representation.

Example

iex(1)> SMPPEX.Pdu.MessageState.format(2)
"DELIVERED"
iex(2)> SMPPEX.Pdu.MessageState.format(12345)
"12345"