Packages
smppex
2.1.0
3.3.0
3.2.4
3.2.3
3.2.2
3.2.1
3.2.0
retired
3.1.0
retired
3.0.6
3.0.5
3.0.4
3.0.3
3.0.2
3.0.1
3.0.0
2.4.0
2.3.3
2.3.2
2.3.1
2.3.0
2.2.9
2.2.8
2.2.7
2.2.6
2.2.5
2.2.4
2.2.3
2.2.2
2.2.1
2.2.0
2.1.0
2.0.1
2.0.0
1.0.1
0.3.2
0.3.1
0.3.0
0.2.1
0.2.0
0.1.12
0.1.11
0.1.10
0.1.9
0.1.8
0.1.7
0.1.6
0.1.5
0.1.4
0.1.3
0.1.2
0.1.1
0.1.0
0.0.5
0.0.4
0.0.3
0.0.2
0.0.1
SMPP 3.4 protocol and framework implemented in Elixir
Current section
Files
Jump to
Current section
Files
lib/smppex/protocol/command_names.ex
defmodule SMPPEX.Protocol.CommandNames do
@moduledoc false
command_ids = [
{:generic_nack, 0x80000000},
{:bind_receiver, 0x00000001},
{:bind_receiver_resp, 0x80000001},
{:bind_transmitter, 0x00000002},
{:bind_transmitter_resp, 0x80000002},
{:query_sm, 0x00000003},
{:query_sm_resp, 0x80000003},
{:submit_sm, 0x00000004},
{:submit_sm_resp, 0x80000004},
{:deliver_sm, 0x00000005},
{:deliver_sm_resp, 0x80000005},
{:unbind, 0x00000006},
{:unbind_resp, 0x80000006},
{:replace_sm, 0x00000007},
{:replace_sm_resp, 0x80000007},
{:cancel_sm, 0x00000008},
{:cancel_sm_resp, 0x80000008},
{:bind_transceiver, 0x00000009},
{:bind_transceiver_resp, 0x80000009},
{:outbind, 0x0000000B},
{:enquire_link, 0x00000015},
{:enquire_link_resp, 0x80000015},
{:submit_multi, 0x00000021},
{:submit_multi_resp, 0x80000021},
{:alert_notification, 0x00000102},
{:data_sm, 0x00000103},
{:data_sm_resp, 0x80000103}
]
@spec name_by_id(integer) :: :unknown | {:ok, atom}
@spec id_by_name(atom) :: :unknown | {:ok, non_neg_integer}
for {name, id} <- command_ids do
def name_by_id(unquote(id)) do
{:ok, unquote(name)}
end
def id_by_name(unquote(name)) do
{:ok, unquote(id)}
end
end
def name_by_id(_) do
:unknown
end
def id_by_name(_) do
:unknown
end
end