SMPPEX.Pdu.set_optional_field

You're seeing just the function set_optional_field, go back to SMPPEX.Pdu module for more information.
Link to this function

set_optional_field(pdu, name, value)

View Source

Specs

set_optional_field(t(), integer() | atom(), any()) :: t()

Sets Pdu optional field. New Pdu is returned.

Examples

iex(1)> pdu = SMPPEX.Pdu.new(4)
iex(2)> pdu1 = SMPPEX.Pdu.set_optional_field(pdu, :message_payload, "hello")
iex(3)> SMPPEX.Pdu.optional_field(pdu1, 0x0424)
"hello"