SMPPEX.Pdu.field
You're seeing just the function
field
, go back to SMPPEX.Pdu module for more information.
Specs
Get Pdu mandatory or optional(TLV) field by name or by integer id. If Pdu does not have the
field or field name is unknown, nil
is returned.
Examples
iex(1)> pdu = SMPPEX.Pdu.new(4, %{short_message: "hi"}, %{0x0424 => "hello"})
iex(2)> SMPPEX.Pdu.field(pdu, :message_payload)
"hello"
iex(3)> SMPPEX.Pdu.field(pdu, 0x0424)
"hello"
iex(4)> SMPPEX.Pdu.field(pdu, :short_message)
"hi"
iex(5)> SMPPEX.Pdu.field(pdu, :unknown_name)
nil