Copyright © 2003 - 2004 Enrique Marcote Peña
Version: 1.0, {24 May 2003} 11:56:47.
Authors: Enrique Marcote Peña (mpquique_at_users.sourceforge.net) [web site: http://oserl.sourceforge.net/].
SMPP Operation PDU definitions.
esme_pack/1 | Packs an SMPP PDU dictionary into the corresponding byte stream. |
esme_unpack/1 | Unpacks a binary SMPP PDU into the corresponding PDU dictionary. |
from_list/1 | Converts the Pdu to a list representation. |
get_param/2 | Gets the value of a parameter from a PDU dictionary given the parameter name. |
merge_params/2 | Merge two parameter lists. |
new/3 | Creates a new PDU dictionary of type PdyType with the given InitParams and the default values defined for this PDU. |
new/4 | Creates a new PDU dictionary of type PdyType with the given InitParams and the default values defined for this PDU. |
pack/1 | Packs any SMPP PDU dictionary into the corresponding byte stream. |
request_failure_code/1 | Returns the error status code associated to a request failure (Most of the requests have a generic failure code, otherwise ?ESME_RUNKNOWNERR is returned). |
set_param/3 | Sets the value of a parameter on a PDU dictionary given the parameter name, the new PDU dictionary is returned. |
smsc_pack/1 | Packs an SMPP PDU dictionary into the corresponding byte stream. |
smsc_unpack/1 | Unpacks a binary SMPP PDU into the corresponding PDU dictionary. |
to_list/1 | Converts the Pdu to a list representation. |
unpack/1 | Unpacks a binary SMPP PDU into the corresponding PDU dictionary. |
esme_pack(Pdu) -> Result
Packs an SMPP PDU dictionary into the corresponding byte stream.
This function is optimized for ESME implementations, thus only handles operations issued by an ESME, any other PDU generates an ?ESME_RINVCMDID error code.
See also: pdu_syntax:pack/2.
esme_unpack(BinaryPdu) -> Result
Unpacks a binary SMPP PDU into the corresponding PDU dictionary.
This function is optimized for ESME implementation, thus only capable of unpacking PDUs issued by a SMSC, any other PDU produces an ?ESME_RINVCMDID error code.
See also: pdu_syntax:unpack/2.
from_list(List) -> Pdu
Converts the Pdu to a list representation.
Notice that command_length is automatically added by packing functions, thus should not be included on the List.
% @see dict:from_list/1get_param(ParamName, Pdu) -> ParamValue
Gets the value of a parameter from a PDU dictionary given the parameter name. If the parameter is not defined on the PDU the atom undefined is returned.
merge_params(ParamList1, ParamList2) -> NewParamList
Merge two parameter lists. If an parameter appears on both lists, the value from the first list will be taken.
new(CommandId, SequenceNumber, InitParams) -> Pdu
Creates a new PDU dictionary of type PdyType with the given InitParams and the default values defined for this PDU.
The command_status is set to ESME_ROK.
See also: new/4.
new(CommandId, CommandStatus, SequenceNumber, InitParams) -> Pdu
Creates a new PDU dictionary of type PdyType with the given InitParams and the default values defined for this PDU.
The command_status is set to CommandStatus.
See also: new/3.
pack(Pdu) -> Result
Packs any SMPP PDU dictionary into the corresponding byte stream. This function handles any operation.
Before using this function consider esme_pack/1 or smsc_pack/1. This generic packing function should only be used on special occasions (implementing a Routing Entity).
See also: esme_pack/1, smsc_pack/1, pdu_syntax:pack/2.
request_failure_code(CommandId) -> CommandStatus
Returns the error status code associated to a request failure (Most of the requests have a generic failure code, otherwise ?ESME_RUNKNOWNERR is returned).
set_param(ParamName, ParamValue, Pdu) -> NewPdu
Sets the value of a parameter on a PDU dictionary given the parameter name, the new PDU dictionary is returned.
smsc_pack(Pdu) -> Result
Packs an SMPP PDU dictionary into the corresponding byte stream.
This function is optimized for SMSC implementations, thus only handles operations issued by an SMSC, any other PDU generates an ?ESME_RINVCMDID error code.
See also: pdu_syntax:pack/2.
smsc_unpack(BinaryPdu) -> Result
Equivalent to unpack(BinaryPdu, ESME_ISSUED_OPERATIONS).
Unpacks a binary SMPP PDU into the corresponding PDU dictionary.
This function is optimized for SMSC implementation, thus only capable of unpacking PDUs issued by an ESME, any other PDU produces an ?ESME_RINVCMDID error code.
See also: unpack/2.
to_list(Pdu) -> List
Converts the Pdu to a list representation.
Notice that command_length won't be included on the resulting List.
% @see dict:to_list/1unpack(BinaryPdu) -> Result
Unpacks a binary SMPP PDU into the corresponding PDU dictionary. This function handles any operation.
Before using this function consider esme_unpack/1 or smsc_unpack/1. This generic unpacking function should only be used on very special occasions (such us implementing a Routing Entity).
See also: esme_unpack/1, smsc_unpack/1, pdu_syntax:unpack/2.