Documentation ¶
Index ¶
- Constants
- Variables
- type Bind
- func (s *Bind) Fields() map[string]Field
- func (s *Bind) GetField(f string) Field
- func (s *Bind) GetHeader() *Header
- func (s *Bind) MandatoryFieldsList() []string
- func (s *Bind) Ok() bool
- func (s *Bind) SetField(f string, v interface{}) error
- func (s *Bind) SetSeqNum(i uint32)
- func (s *Bind) SetTLVField(t, l int, v []byte) error
- func (s *Bind) TLVFields() map[uint16]*TLVField
- func (s *Bind) Writer() []byte
- type BindResp
- func (s *BindResp) Fields() map[string]Field
- func (s *BindResp) GetField(f string) Field
- func (s *BindResp) GetHeader() *Header
- func (s *BindResp) MandatoryFieldsList() []string
- func (s *BindResp) Ok() bool
- func (s *BindResp) SetField(f string, v interface{}) error
- func (s *BindResp) SetSeqNum(i uint32)
- func (s *BindResp) SetTLVField(t, l int, v []byte) error
- func (s *BindResp) TLVFields() map[uint16]*TLVField
- func (s *BindResp) Writer() []byte
- type CMDId
- type CMDStatus
- type DeliverSm
- func (d *DeliverSm) Fields() map[string]Field
- func (d *DeliverSm) GetField(f string) Field
- func (d *DeliverSm) GetHeader() *Header
- func (d *DeliverSm) MandatoryFieldsList() []string
- func (d *DeliverSm) Ok() bool
- func (d *DeliverSm) SetField(f string, v interface{}) error
- func (d *DeliverSm) SetSeqNum(i uint32)
- func (d *DeliverSm) SetTLVField(t, l int, v []byte) error
- func (d *DeliverSm) TLVFields() map[uint16]*TLVField
- func (d *DeliverSm) Writer() []byte
- type DeliverSmResp
- func (s *DeliverSmResp) Fields() map[string]Field
- func (s *DeliverSmResp) GetField(f string) Field
- func (s *DeliverSmResp) GetHeader() *Header
- func (s *DeliverSmResp) MandatoryFieldsList() []string
- func (s *DeliverSmResp) Ok() bool
- func (s *DeliverSmResp) SetField(f string, v interface{}) error
- func (s *DeliverSmResp) SetSeqNum(i uint32)
- func (s *DeliverSmResp) SetTLVField(t, l int, v []byte) error
- func (s *DeliverSmResp) TLVFields() map[uint16]*TLVField
- func (s *DeliverSmResp) Writer() []byte
- type EnquireLink
- func (s *EnquireLink) Fields() map[string]Field
- func (s *EnquireLink) GetField(f string) Field
- func (s *EnquireLink) GetHeader() *Header
- func (s *EnquireLink) MandatoryFieldsList() []string
- func (s *EnquireLink) Ok() bool
- func (s *EnquireLink) SetField(f string, v interface{}) error
- func (s *EnquireLink) SetSeqNum(i uint32)
- func (s *EnquireLink) SetTLVField(t, l int, v []byte) error
- func (s *EnquireLink) TLVFields() map[uint16]*TLVField
- func (s *EnquireLink) Writer() []byte
- type EnquireLinkResp
- func (s *EnquireLinkResp) Fields() map[string]Field
- func (s *EnquireLinkResp) GetField(f string) Field
- func (s *EnquireLinkResp) GetHeader() *Header
- func (s *EnquireLinkResp) MandatoryFieldsList() []string
- func (s *EnquireLinkResp) Ok() bool
- func (s *EnquireLinkResp) SetField(f string, v interface{}) error
- func (s *EnquireLinkResp) SetSeqNum(i uint32)
- func (s *EnquireLinkResp) SetTLVField(t, l int, v []byte) error
- func (s *EnquireLinkResp) TLVFields() map[uint16]*TLVField
- func (s *EnquireLinkResp) Writer() []byte
- type Field
- type FieldErr
- type FixedField
- type GenericNack
- func (s *GenericNack) Fields() map[string]Field
- func (s *GenericNack) GetField(f string) Field
- func (s *GenericNack) GetHeader() *Header
- func (s *GenericNack) MandatoryFieldsList() []string
- func (s *GenericNack) Ok() bool
- func (s *GenericNack) SetField(f string, v interface{}) error
- func (s *GenericNack) SetSeqNum(i uint32)
- func (s *GenericNack) SetTLVField(t, l int, v []byte) error
- func (s *GenericNack) TLVFields() map[uint16]*TLVField
- func (s *GenericNack) Writer() []byte
- type Header
- type Params
- type Pdu
- type PduCmdIdErr
- type PduReadErr
- type QuerySm
- func (s *QuerySm) Fields() map[string]Field
- func (s *QuerySm) GetField(f string) Field
- func (s *QuerySm) GetHeader() *Header
- func (s *QuerySm) MandatoryFieldsList() []string
- func (s *QuerySm) Ok() bool
- func (s *QuerySm) SetField(f string, v interface{}) error
- func (s *QuerySm) SetSeqNum(i uint32)
- func (s *QuerySm) SetTLVField(t, l int, v []byte) error
- func (s *QuerySm) TLVFields() map[uint16]*TLVField
- func (s *QuerySm) Writer() []byte
- type QuerySmResp
- func (s *QuerySmResp) Fields() map[string]Field
- func (s *QuerySmResp) GetField(f string) Field
- func (s *QuerySmResp) GetHeader() *Header
- func (s *QuerySmResp) MandatoryFieldsList() []string
- func (s *QuerySmResp) Ok() bool
- func (s *QuerySmResp) SetField(f string, v interface{}) error
- func (s *QuerySmResp) SetSeqNum(i uint32)
- func (s *QuerySmResp) SetTLVField(t, l int, v []byte) error
- func (s *QuerySmResp) TLVFields() map[uint16]*TLVField
- func (s *QuerySmResp) Writer() []byte
- type Receiver
- func (t *Receiver) Bind(system_id string, password string, params *Params) error
- func (t *Receiver) Close()
- func (t *Receiver) DeliverSmResp(seq uint32, status CMDStatus) error
- func (t *Receiver) Read() (Pdu, error)
- func (t *Receiver) SubmitSm(source_addr, destination_addr, short_message string, params *Params) (seq uint32, err error)
- func (t *Receiver) Unbind() error
- func (t *Receiver) UnbindResp(seq uint32) error
- func (t *Receiver) Write(p Pdu) error
- type SMField
- type Smpp
- func (s *Smpp) Bind(cmdId CMDId, system_id string, password string, params *Params) (Pdu, error)
- func (s *Smpp) BindResp(cmdId CMDId, seq uint32, status CMDStatus, sysId string) (Pdu, error)
- func (s *Smpp) Close()
- func (s *Smpp) Connect(host string, port int) (err error)
- func (s *Smpp) DeliverSmResp(seq uint32, status CMDStatus) (Pdu, error)
- func (s *Smpp) EnquireLink() (Pdu, error)
- func (s *Smpp) EnquireLinkResp(seq uint32) (Pdu, error)
- func (s *Smpp) GenericNack(seq uint32, status CMDStatus) (Pdu, error)
- func (s *Smpp) NewSeqNum() uint32
- func (s *Smpp) QuerySm(message_id, source_addr string, params *Params) (Pdu, error)
- func (s *Smpp) Read() (Pdu, error)
- func (s *Smpp) SubmitSm(source_addr, destination_addr, short_message string, params *Params) (Pdu, error)
- func (s *Smpp) SubmitSmResp(seq uint32, status CMDStatus, messageId string) (Pdu, error)
- func (s *Smpp) Unbind() (Pdu, error)
- func (s *Smpp) UnbindResp(seq uint32) (Pdu, error)
- func (s *Smpp) Write(p Pdu) error
- type SmppBindAuthErr
- type SmppErr
- type SubmitSm
- func (s *SubmitSm) Fields() map[string]Field
- func (s *SubmitSm) GetField(f string) Field
- func (s *SubmitSm) GetHeader() *Header
- func (s *SubmitSm) MandatoryFieldsList() []string
- func (s *SubmitSm) Ok() bool
- func (s *SubmitSm) SetField(f string, v interface{}) error
- func (s *SubmitSm) SetSeqNum(i uint32)
- func (s *SubmitSm) SetTLVField(t, l int, v []byte) error
- func (s *SubmitSm) TLVFields() map[uint16]*TLVField
- func (s *SubmitSm) Writer() []byte
- type SubmitSmResp
- func (s *SubmitSmResp) Fields() map[string]Field
- func (s *SubmitSmResp) GetField(f string) Field
- func (s *SubmitSmResp) GetHeader() *Header
- func (s *SubmitSmResp) MandatoryFieldsList() []string
- func (s *SubmitSmResp) Ok() bool
- func (s *SubmitSmResp) SetField(f string, v interface{}) error
- func (s *SubmitSmResp) SetSeqNum(i uint32)
- func (s *SubmitSmResp) SetTLVField(t, l int, v []byte) error
- func (s *SubmitSmResp) TLVFields() map[uint16]*TLVField
- func (s *SubmitSmResp) Writer() []byte
- type TLVField
- type TLVFieldErr
- type Transceiver
- func (t *Transceiver) Bind(system_id string, password string, params *Params) error
- func (t *Transceiver) Close()
- func (t *Transceiver) DeliverSmResp(seq uint32, status CMDStatus) error
- func (t *Transceiver) GenericNack(seq uint32, status CMDStatus) error
- func (t *Transceiver) Read() (Pdu, error)
- func (t *Transceiver) SubmitSm(source_addr, destination_addr, short_message string, params *Params) (seq uint32, err error)
- func (t *Transceiver) Unbind() error
- func (t *Transceiver) UnbindResp(seq uint32) error
- func (t *Transceiver) Write(p Pdu) error
- type Transmitter
- func (t *Transmitter) Bind(system_id string, password string, params *Params) error
- func (t *Transmitter) Close()
- func (t *Transmitter) DeliverSmResp(seq, status uint32) error
- func (t *Transmitter) QuerySm(message_id, source_addr string, params *Params) (seq uint32, err error)
- func (t *Transmitter) Read() (Pdu, error)
- func (t *Transmitter) SubmitSm(source_addr, destination_addr, short_message string, params *Params) (seq uint32, err error)
- func (t *Transmitter) Unbind() error
- func (t *Transmitter) UnbindResp(seq uint32) error
- func (t *Transmitter) Write(p Pdu) error
- type Unbind
- func (s *Unbind) Fields() map[string]Field
- func (s *Unbind) GetField(f string) Field
- func (s *Unbind) GetHeader() *Header
- func (s *Unbind) MandatoryFieldsList() []string
- func (s *Unbind) Ok() bool
- func (s *Unbind) SetField(f string, v interface{}) error
- func (s *Unbind) SetSeqNum(i uint32)
- func (s *Unbind) SetTLVField(t, l int, v []byte) error
- func (s *Unbind) TLVFields() map[uint16]*TLVField
- func (s *Unbind) Writer() []byte
- type UnbindResp
- func (s *UnbindResp) Fields() map[string]Field
- func (s *UnbindResp) GetField(f string) Field
- func (s *UnbindResp) GetHeader() *Header
- func (s *UnbindResp) MandatoryFieldsList() []string
- func (s *UnbindResp) Ok() bool
- func (s *UnbindResp) SetField(f string, v interface{}) error
- func (s *UnbindResp) SetSeqNum(i uint32)
- func (s *UnbindResp) SetTLVField(t, l int, v []byte) error
- func (s *UnbindResp) TLVFields() map[uint16]*TLVField
- func (s *UnbindResp) Writer() []byte
- type VariableField
Constants ¶
View Source
const ( // SMPP Protocol Version SMPP_VERSION = 0x34 // Max PDU size to minimize some attack vectors MAX_PDU_SIZE = 4096 // 4KB // Sequence number start/end SEQUENCE_NUM_START = 0x00000001 SEQUENCE_NUM_END = 0x7FFFFFFF )
View Source
const ( // FIELDS SYSTEM_ID = "system_id" PASSWORD = "password" SYSTEM_TYPE = "system_type" INTERFACE_VERSION = "interface_version" ADDR_TON = "addr_ton" ADDR_NPI = "addr_npi" ADDRESS_RANGE = "address_range" SERVICE_TYPE = "service_type" SOURCE_ADDR_TON = "source_addr_ton" SOURCE_ADDR_NPI = "source_addr_npi" SOURCE_ADDR = "source_addr" DEST_ADDR_TON = "dest_addr_ton" DEST_ADDR_NPI = "dest_addr_npi" DESTINATION_ADDR = "destination_addr" ESM_CLASS = "esm_class" PROTOCOL_ID = "protocol_id" PRIORITY_FLAG = "priority_flag" SCHEDULE_DELIVERY_TIME = "schedule_delivery_time" VALIDITY_PERIOD = "validity_period" REGISTERED_DELIVERY = "registered_delivery" REPLACE_IF_PRESENT_FLAG = "replace_if_present_flag" DATA_CODING = "data_coding" SM_DEFAULT_MSG_ID = "sm_default_msg_id" SM_LENGTH = "sm_length" SHORT_MESSAGE = "short_message" MESSAGE_ID = "message_id" FINAL_DATE = "final_date" MESSAGE_STATE = "message_state" ERROR_CODE = "error_code" )
Variables ¶
View Source
var Debug bool
Functions ¶
This section is empty.
Types ¶
type Bind ¶
type Bind struct { *Header // contains filtered or unexported fields }
func (*Bind) MandatoryFieldsList ¶
type BindResp ¶
type BindResp struct { *Header // contains filtered or unexported fields }
func (*BindResp) MandatoryFieldsList ¶
type CMDId ¶
type CMDId uint32
const ( // PDU Types GENERIC_NACK CMDId = 0x80000000 BIND_RECEIVER CMDId = 0x00000001 BIND_RECEIVER_RESP CMDId = 0x80000001 BIND_TRANSMITTER CMDId = 0x00000002 BIND_TRANSMITTER_RESP CMDId = 0x80000002 QUERY_SM CMDId = 0x00000003 QUERY_SM_RESP CMDId = 0x80000003 SUBMIT_SM CMDId = 0x00000004 SUBMIT_SM_RESP CMDId = 0x80000004 DELIVER_SM CMDId = 0x00000005 DELIVER_SM_RESP CMDId = 0x80000005 UNBIND CMDId = 0x00000006 UNBIND_RESP CMDId = 0x80000006 REPLACE_SM CMDId = 0x00000007 REPLACE_SM_RESP CMDId = 0x80000007 CANCEL_SM CMDId = 0x00000008 CANCEL_SM_RESP CMDId = 0x80000008 BIND_TRANSCEIVER CMDId = 0x00000009 BIND_TRANSCEIVER_RESP CMDId = 0x80000009 OUTBIND CMDId = 0x0000000B ENQUIRE_LINK CMDId = 0x00000015 ENQUIRE_LINK_RESP CMDId = 0x80000015 SUBMIT_MULTI CMDId = 0x00000021 SUBMIT_MULTI_RESP CMDId = 0x80000021 ALERT_NOTIFICATION CMDId = 0x00000102 DATA_SM CMDId = 0x00000103 DATA_SM_RESP CMDId = 0x80000103 )
type CMDStatus ¶
type CMDStatus uint32
const ( // ESME Error Constants ESME_ROK CMDStatus = 0x00000000 // OK! ESME_RINVMSGLEN CMDStatus = 0x00000001 // Message Length is invalid ESME_RINVCMDLEN CMDStatus = 0x00000002 // Command Length is invalid ESME_RINVCMDID CMDStatus = 0x00000003 // Invalid Command ID ESME_RINVBNDSTS CMDStatus = 0x00000004 // Incorrect BIND Status for given command ESME_RALYBND CMDStatus = 0x00000005 // ESME Already in Bound State ESME_RINVPRTFLG CMDStatus = 0x00000006 // Invalid Priority Flag ESME_RINVREGDLVFLG CMDStatus = 0x00000007 // Invalid Registered Delivery Flag ESME_RSYSERR CMDStatus = 0x00000008 // System Error ESME_RINVSRCADR CMDStatus = 0x0000000A // Invalid Source Address ESME_RINVDSTADR CMDStatus = 0x0000000B // Invalid Dest Addr ESME_RINVMSGID CMDStatus = 0x0000000C // Message ID is invalid ESME_RBINDFAIL CMDStatus = 0x0000000D // Bind Failed ESME_RINVPASWD CMDStatus = 0x0000000E // Invalid Password ESME_RINVSYSID CMDStatus = 0x0000000F // Invalid System ID ESME_RCANCELFAIL CMDStatus = 0x00000011 // Cancel SM Failed ESME_RREPLACEFAIL CMDStatus = 0x00000013 // Replace SM Failed ESME_RMSGQFUL CMDStatus = 0x00000014 // Message Queue Full ESME_RINVSERTYP CMDStatus = 0x00000015 // Invalid Service Type ESME_RINVNUMDESTS CMDStatus = 0x00000033 // Invalid number of destinations ESME_RINVDLNAME CMDStatus = 0x00000034 // Invalid Distribution List name ESME_RINVDESTFLAG CMDStatus = 0x00000040 // Destination flag is invalid ESME_RINVSUBREP CMDStatus = 0x00000042 // Invalid 'submit with replace' request ESME_RINVESMCLASS CMDStatus = 0x00000043 // Invalid esm_class field data ESME_RCNTSUBDL CMDStatus = 0x00000044 // Cannot Submit to Distribution List ESME_RSUBMITFAIL CMDStatus = 0x00000045 // submit_sm or submit_multi failed ESME_RINVSRCTON CMDStatus = 0x00000048 // Invalid Source address TON ESME_RINVSRCNPI CMDStatus = 0x00000049 // Invalid Source address NPI ESME_RINVDSTTON CMDStatus = 0x00000050 // Invalid Destination address TON ESME_RINVDSTNPI CMDStatus = 0x00000051 // Invalid Destination address NPI ESME_RINVSYSTYP CMDStatus = 0x00000053 // Invalid system_type field ESME_RINVREPFLAG CMDStatus = 0x00000054 // Invalid replace_if_present flag ESME_RINVNUMMSGS CMDStatus = 0x00000055 // Invalid number of messages ESME_RTHROTTLED CMDStatus = 0x00000058 // Throttling error ESME_RINVSCHED CMDStatus = 0x00000061 // Invalid Scheduled Delivery Time ESME_RINVEXPIRY CMDStatus = 0x00000062 // Invalid message validity period (Expiry time) ESME_RINVDFTMSGID CMDStatus = 0x00000063 // Predefined Message Invalid or Not Found ESME_RX_T_APPN CMDStatus = 0x00000064 // ESME Receiver Temporary App Error Code ESME_RX_P_APPN CMDStatus = 0x00000065 // ESME Receiver Permanent App Error Code ESME_RX_R_APPN CMDStatus = 0x00000066 // ESME Receiver Reject Message Error Code ESME_RQUERYFAIL CMDStatus = 0x00000067 // Query_sm request failed ESME_RINVOPTPARSTREAM CMDStatus = 0x000000C0 // Error in the optional part of the PDU Body ESME_ROPTPARNOTALLWD CMDStatus = 0x000000C1 // Optional Parameter not allowed ESME_RINVPARLEN CMDStatus = 0x000000C2 // Invalid Parameter Length ESME_RMISSINGOPTPARAM CMDStatus = 0x000000C3 // Expected Optional Parameter missing ESME_RINVOPTPARAMVAL CMDStatus = 0x000000C4 // Invalid Optional Parameter Value ESME_RDELIVERYFAILURE CMDStatus = 0x000000FE // Delivery Failure (used for data_sm_resp) ESME_RUNKNOWNERR CMDStatus = 0x000000FF // Unknown Error )
type DeliverSm ¶
type DeliverSm struct { *Header // contains filtered or unexported fields }
func (*DeliverSm) MandatoryFieldsList ¶
type DeliverSmResp ¶
type DeliverSmResp struct { *Header // contains filtered or unexported fields }
func NewDeliverSmResp ¶
func NewDeliverSmResp(hdr *Header, b []byte) (*DeliverSmResp, error)
func (*DeliverSmResp) Fields ¶
func (s *DeliverSmResp) Fields() map[string]Field
func (*DeliverSmResp) GetField ¶
func (s *DeliverSmResp) GetField(f string) Field
func (*DeliverSmResp) GetHeader ¶
func (s *DeliverSmResp) GetHeader() *Header
func (*DeliverSmResp) MandatoryFieldsList ¶
func (s *DeliverSmResp) MandatoryFieldsList() []string
func (*DeliverSmResp) Ok ¶
func (s *DeliverSmResp) Ok() bool
func (*DeliverSmResp) SetField ¶
func (s *DeliverSmResp) SetField(f string, v interface{}) error
func (*DeliverSmResp) SetSeqNum ¶
func (s *DeliverSmResp) SetSeqNum(i uint32)
func (*DeliverSmResp) SetTLVField ¶
func (s *DeliverSmResp) SetTLVField(t, l int, v []byte) error
func (*DeliverSmResp) TLVFields ¶
func (s *DeliverSmResp) TLVFields() map[uint16]*TLVField
func (*DeliverSmResp) Writer ¶
func (s *DeliverSmResp) Writer() []byte
type EnquireLink ¶
type EnquireLink struct { *Header // contains filtered or unexported fields }
func NewEnquireLink ¶
func NewEnquireLink(hdr *Header) (*EnquireLink, error)
func (*EnquireLink) Fields ¶
func (s *EnquireLink) Fields() map[string]Field
func (*EnquireLink) GetField ¶
func (s *EnquireLink) GetField(f string) Field
func (*EnquireLink) GetHeader ¶
func (s *EnquireLink) GetHeader() *Header
func (*EnquireLink) MandatoryFieldsList ¶
func (s *EnquireLink) MandatoryFieldsList() []string
func (*EnquireLink) Ok ¶
func (s *EnquireLink) Ok() bool
func (*EnquireLink) SetField ¶
func (s *EnquireLink) SetField(f string, v interface{}) error
func (*EnquireLink) SetSeqNum ¶
func (s *EnquireLink) SetSeqNum(i uint32)
func (*EnquireLink) SetTLVField ¶
func (s *EnquireLink) SetTLVField(t, l int, v []byte) error
func (*EnquireLink) TLVFields ¶
func (s *EnquireLink) TLVFields() map[uint16]*TLVField
func (*EnquireLink) Writer ¶
func (s *EnquireLink) Writer() []byte
type EnquireLinkResp ¶
type EnquireLinkResp struct { *Header // contains filtered or unexported fields }
func NewEnquireLinkResp ¶
func NewEnquireLinkResp(hdr *Header) (*EnquireLinkResp, error)
func (*EnquireLinkResp) Fields ¶
func (s *EnquireLinkResp) Fields() map[string]Field
func (*EnquireLinkResp) GetField ¶
func (s *EnquireLinkResp) GetField(f string) Field
func (*EnquireLinkResp) GetHeader ¶
func (s *EnquireLinkResp) GetHeader() *Header
func (*EnquireLinkResp) MandatoryFieldsList ¶
func (s *EnquireLinkResp) MandatoryFieldsList() []string
func (*EnquireLinkResp) Ok ¶
func (s *EnquireLinkResp) Ok() bool
func (*EnquireLinkResp) SetField ¶
func (s *EnquireLinkResp) SetField(f string, v interface{}) error
func (*EnquireLinkResp) SetSeqNum ¶
func (s *EnquireLinkResp) SetSeqNum(i uint32)
func (*EnquireLinkResp) SetTLVField ¶
func (s *EnquireLinkResp) SetTLVField(t, l int, v []byte) error
func (*EnquireLinkResp) TLVFields ¶
func (s *EnquireLinkResp) TLVFields() map[uint16]*TLVField
func (*EnquireLinkResp) Writer ¶
func (s *EnquireLinkResp) Writer() []byte
type Field ¶
type Field interface { Length() interface{} Value() interface{} String() string ByteArray() []byte }
func NewFixedField ¶
func NewSMField ¶
func NewVariableField ¶
type FixedField ¶
type FixedField struct {
// contains filtered or unexported fields
}
func (*FixedField) ByteArray ¶
func (f *FixedField) ByteArray() []byte
func (*FixedField) Length ¶
func (f *FixedField) Length() interface{}
func (*FixedField) String ¶
func (f *FixedField) String() string
func (*FixedField) Value ¶
func (f *FixedField) Value() interface{}
type GenericNack ¶
type GenericNack struct { *Header // contains filtered or unexported fields }
func NewGenericNack ¶
func NewGenericNack(hdr *Header) (*GenericNack, error)
func (*GenericNack) Fields ¶
func (s *GenericNack) Fields() map[string]Field
func (*GenericNack) GetField ¶
func (s *GenericNack) GetField(f string) Field
func (*GenericNack) GetHeader ¶
func (s *GenericNack) GetHeader() *Header
func (*GenericNack) MandatoryFieldsList ¶
func (s *GenericNack) MandatoryFieldsList() []string
func (*GenericNack) Ok ¶
func (s *GenericNack) Ok() bool
func (*GenericNack) SetField ¶
func (s *GenericNack) SetField(f string, v interface{}) error
func (*GenericNack) SetSeqNum ¶
func (s *GenericNack) SetSeqNum(i uint32)
func (*GenericNack) SetTLVField ¶
func (s *GenericNack) SetTLVField(t, l int, v []byte) error
func (*GenericNack) TLVFields ¶
func (s *GenericNack) TLVFields() map[uint16]*TLVField
func (*GenericNack) Writer ¶
func (s *GenericNack) Writer() []byte
type Header ¶
func ParsePduHeader ¶
type Pdu ¶
type PduCmdIdErr ¶
type PduCmdIdErr string
func (PduCmdIdErr) Error ¶
func (p PduCmdIdErr) Error() string
type PduReadErr ¶
type PduReadErr string
const (
PduLenErr PduReadErr = "Invalid PDU length"
)
func (PduReadErr) Error ¶
func (p PduReadErr) Error() string
type QuerySm ¶
type QuerySm struct { *Header // contains filtered or unexported fields }
func (*QuerySm) MandatoryFieldsList ¶
type QuerySmResp ¶
type QuerySmResp struct { *Header // contains filtered or unexported fields }
func NewQuerySmResp ¶
func NewQuerySmResp(hdr *Header, b []byte) (*QuerySmResp, error)
func (*QuerySmResp) Fields ¶
func (s *QuerySmResp) Fields() map[string]Field
func (*QuerySmResp) GetField ¶
func (s *QuerySmResp) GetField(f string) Field
func (*QuerySmResp) GetHeader ¶
func (s *QuerySmResp) GetHeader() *Header
func (*QuerySmResp) MandatoryFieldsList ¶
func (s *QuerySmResp) MandatoryFieldsList() []string
func (*QuerySmResp) Ok ¶
func (s *QuerySmResp) Ok() bool
func (*QuerySmResp) SetField ¶
func (s *QuerySmResp) SetField(f string, v interface{}) error
func (*QuerySmResp) SetSeqNum ¶
func (s *QuerySmResp) SetSeqNum(i uint32)
func (*QuerySmResp) SetTLVField ¶
func (s *QuerySmResp) SetTLVField(t, l int, v []byte) error
func (*QuerySmResp) TLVFields ¶
func (s *QuerySmResp) TLVFields() map[uint16]*TLVField
func (*QuerySmResp) Writer ¶
func (s *QuerySmResp) Writer() []byte
type Receiver ¶
type Receiver struct { Smpp Err error // Errors generated in go routines that lead to conn close // contains filtered or unexported fields }
func NewReceiver ¶
eli = EnquireLink Interval in Seconds
func (*Receiver) DeliverSmResp ¶
func (*Receiver) UnbindResp ¶
type Smpp ¶
func (*Smpp) DeliverSmResp ¶
func (*Smpp) EnquireLink ¶
func (*Smpp) SubmitSmResp ¶
type SmppBindAuthErr ¶
type SmppBindAuthErr string
func (SmppBindAuthErr) Error ¶
func (p SmppBindAuthErr) Error() string
type SmppErr ¶
type SmppErr string
const ( SmppBindRespErr SmppErr = "BIND Resp not received" SmppPduErr SmppErr = "PDU out of spec for this connection type" SmppPduSizeErr SmppErr = "PDU Len larger than MAX_PDU_SIZE" SmppPduLenErr SmppErr = "PDU Len different than read bytes" SmppELWriteErr SmppErr = "Error writing ELR PDU" SmppELRespErr SmppErr = "No enquire link response" )
type SubmitSm ¶
type SubmitSm struct { *Header // contains filtered or unexported fields }
func (*SubmitSm) MandatoryFieldsList ¶
type SubmitSmResp ¶
type SubmitSmResp struct { *Header // contains filtered or unexported fields }
func NewSubmitSmResp ¶
func NewSubmitSmResp(hdr *Header, b []byte) (*SubmitSmResp, error)
func (*SubmitSmResp) Fields ¶
func (s *SubmitSmResp) Fields() map[string]Field
func (*SubmitSmResp) GetField ¶
func (s *SubmitSmResp) GetField(f string) Field
func (*SubmitSmResp) GetHeader ¶
func (s *SubmitSmResp) GetHeader() *Header
func (*SubmitSmResp) MandatoryFieldsList ¶
func (s *SubmitSmResp) MandatoryFieldsList() []string
func (*SubmitSmResp) Ok ¶
func (s *SubmitSmResp) Ok() bool
func (*SubmitSmResp) SetField ¶
func (s *SubmitSmResp) SetField(f string, v interface{}) error
func (*SubmitSmResp) SetSeqNum ¶
func (s *SubmitSmResp) SetSeqNum(i uint32)
func (*SubmitSmResp) SetTLVField ¶
func (s *SubmitSmResp) SetTLVField(t, l int, v []byte) error
func (*SubmitSmResp) TLVFields ¶
func (s *SubmitSmResp) TLVFields() map[uint16]*TLVField
func (*SubmitSmResp) Writer ¶
func (s *SubmitSmResp) Writer() []byte
type TLVFieldErr ¶
type TLVFieldErr string
const ( TLVFieldLenErr TLVFieldErr = "Invalid TLV value lenght" TLVFieldPduErr TLVFieldErr = "PDU Type does not support TLV" )
func (TLVFieldErr) Error ¶
func (t TLVFieldErr) Error() string
type Transceiver ¶
type Transceiver struct { Smpp Err error // Errors generated in go routines that lead to conn close // contains filtered or unexported fields }
func NewTransceiver ¶
eli = EnquireLink Interval in Seconds
func (*Transceiver) Bind ¶
func (t *Transceiver) Bind(system_id string, password string, params *Params) error
func (*Transceiver) Close ¶
func (t *Transceiver) Close()
func (*Transceiver) DeliverSmResp ¶
func (t *Transceiver) DeliverSmResp(seq uint32, status CMDStatus) error
func (*Transceiver) GenericNack ¶
func (t *Transceiver) GenericNack(seq uint32, status CMDStatus) error
func (*Transceiver) Read ¶
func (t *Transceiver) Read() (Pdu, error)
func (*Transceiver) SubmitSm ¶
func (t *Transceiver) SubmitSm(source_addr, destination_addr, short_message string, params *Params) (seq uint32, err error)
func (*Transceiver) Unbind ¶
func (t *Transceiver) Unbind() error
func (*Transceiver) UnbindResp ¶
func (t *Transceiver) UnbindResp(seq uint32) error
func (*Transceiver) Write ¶
func (t *Transceiver) Write(p Pdu) error
type Transmitter ¶
type Transmitter struct { Smpp Err error // Errors generated in go routines that lead to conn close // contains filtered or unexported fields }
func NewTransmitter ¶
eli = EnquireLink Interval in Seconds
func (*Transmitter) Bind ¶
func (t *Transmitter) Bind(system_id string, password string, params *Params) error
func (*Transmitter) Close ¶
func (t *Transmitter) Close()
func (*Transmitter) DeliverSmResp ¶
func (t *Transmitter) DeliverSmResp(seq, status uint32) error
func (*Transmitter) QuerySm ¶
func (t *Transmitter) QuerySm(message_id, source_addr string, params *Params) (seq uint32, err error)
func (*Transmitter) Read ¶
func (t *Transmitter) Read() (Pdu, error)
func (*Transmitter) SubmitSm ¶
func (t *Transmitter) SubmitSm(source_addr, destination_addr, short_message string, params *Params) (seq uint32, err error)
func (*Transmitter) Unbind ¶
func (t *Transmitter) Unbind() error
func (*Transmitter) UnbindResp ¶
func (t *Transmitter) UnbindResp(seq uint32) error
func (*Transmitter) Write ¶
func (t *Transmitter) Write(p Pdu) error
type Unbind ¶
type Unbind struct { *Header // contains filtered or unexported fields }
func (*Unbind) MandatoryFieldsList ¶
type UnbindResp ¶
type UnbindResp struct { *Header // contains filtered or unexported fields }
func NewUnbindResp ¶
func NewUnbindResp(hdr *Header) (*UnbindResp, error)
func (*UnbindResp) Fields ¶
func (s *UnbindResp) Fields() map[string]Field
func (*UnbindResp) GetField ¶
func (s *UnbindResp) GetField(f string) Field
func (*UnbindResp) GetHeader ¶
func (s *UnbindResp) GetHeader() *Header
func (*UnbindResp) MandatoryFieldsList ¶
func (s *UnbindResp) MandatoryFieldsList() []string
func (*UnbindResp) Ok ¶
func (s *UnbindResp) Ok() bool
func (*UnbindResp) SetField ¶
func (s *UnbindResp) SetField(f string, v interface{}) error
func (*UnbindResp) SetSeqNum ¶
func (s *UnbindResp) SetSeqNum(i uint32)
func (*UnbindResp) SetTLVField ¶
func (s *UnbindResp) SetTLVField(t, l int, v []byte) error
func (*UnbindResp) TLVFields ¶
func (s *UnbindResp) TLVFields() map[uint16]*TLVField
func (*UnbindResp) Writer ¶
func (s *UnbindResp) Writer() []byte
type VariableField ¶
type VariableField struct {
// contains filtered or unexported fields
}
func (*VariableField) ByteArray ¶
func (v *VariableField) ByteArray() []byte
func (*VariableField) Length ¶
func (v *VariableField) Length() interface{}
func (*VariableField) String ¶
func (v *VariableField) String() string
func (*VariableField) Value ¶
func (v *VariableField) Value() interface{}
Source Files ¶
- constants.go
- pdu.go
- pdu_bind.go
- pdu_bind_resp.go
- pdu_deliver_sm.go
- pdu_deliver_sm_resp.go
- pdu_enquire_link.go
- pdu_enquire_link_resp.go
- pdu_fields.go
- pdu_generic_nack.go
- pdu_header.go
- pdu_query_sm.go
- pdu_query_sm_resp.go
- pdu_submit_sm.go
- pdu_submit_sm_resp.go
- pdu_tlv_field.go
- pdu_unbind.go
- pdu_unbind_resp.go
- receiver.go
- smpp.go
- transceiver.go
- transmitter.go
Click to show internal directories.
Click to hide internal directories.