Versions in this module Expand all Collapse all v0 v0.1.0 Mar 3, 2021 Changes in this version + const CommandAlertNotification + const CommandBindReceiver + const CommandBindReceiverResp + const CommandBindTransceiver + const CommandBindTransceiverResp + const CommandBindTransmitter + const CommandBindTransmitterResp + const CommandCancelSm + const CommandCancelSmResp + const CommandDataSm + const CommandDataSmResp + const CommandDeliverSm + const CommandDeliverSmResp + const CommandEnquireLink + const CommandEnquireLinkResp + const CommandGenericNack + const CommandOutbind + const CommandQuerySm + const CommandQuerySmResp + const CommandReplaceSm + const CommandReplaceSmResp + const CommandSubmitMulti + const CommandSubmitMultiResp + const CommandSubmitSm + const CommandSubmitSmResp + const CommandUnbind + const CommandUnbindResp + func CommandName(commandID CommandIDType) string + func LengthOfNextPDU(stream []byte) uint32 + type BindInfo struct + Type BindType + type BindType uint + const ReceiverBind + const TransceiverBind + const TransmitterBind + type CommandIDType uint32 + func CommandIDFromString(commandName string) (CommandIDType, bool) + type ESME struct + func (esme *ESME) BindToPeer(peer *Peer, bind BindInfo) error + func (esme *ESME) ConnectToPeer(remoteAddr net.IP, remotePort uint16) (peer *Peer, err error) + func (esme *ESME) SendMessageToPeer(peer *Peer, pdu *PDU) error + func (esme *ESME) StartListenLoop() + type JSONDocument struct + Messages []JSONMessage + func UnmarshallJSON(data []byte) (*JSONDocument, error) + type JSONMandatoryParameterMap struct + AddrNpi uint8 + AddrTon uint8 + AddressRange string + DataCoding uint8 + DestinationAddr string + DestinationAddrNpi uint8 + DestinationAddrTon uint8 + EsmClass uint8 + InterfaceVersion uint8 + MessageID string + Password string + PriorityFlag uint8 + ProtocolID uint8 + RegisteredDelivery uint8 + ReplaceIfPresentFlag uint8 + ScheduleDeliveryTime string + ServiceType string + ShortMessage string + SmDefaultMsgID uint8 + SmLength uint8 + SourceAddr string + SourceAddrNpi uint8 + SourceAddrTon uint8 + SystemID string + SystemType string + ValidityPeriod string + type JSONMessage struct + CommandID uint32 + CommandStatus uint32 + EncodedLength uint32 + MandatoryParameters JSONMandatoryParameterMap + OptionalParameters JSONOptionalParameterMap + SequenceNumber uint32 + type JSONOptionalParameterMap struct + AdditionalStatusInfoText uint32 + AlertOnMessageDelivery uint32 + CallbackNum uint32 + CallbackNumAtag uint32 + CallbackNumPresInd uint32 + DeliveryFailureReason uint32 + DestAddrSubunit uint32 + DestBearerType uint32 + DestNetworkType uint32 + DestSubaddress uint32 + DestTelematicsID uint32 + DestinationPort uint32 + DisplayTime uint32 + DpfResult uint32 + ItsReplyType uint32 + ItsSessionInfo uint32 + LanguageIndicator uint32 + MessagePayload uint32 + MessageState uint32 + MoreMessagesToSend uint32 + MsAvailabilityStatus uint32 + MsMsgWaitFacilities uint32 + MsValidity uint32 + NetworkErrorCode uint32 + NumberOfMessages uint32 + PayloadType uint32 + PrivacyIndicator uint32 + QosTimeToLive uint32 + ReceiptedMessageID uint32 + SCInterfaceVersion uint32 + SarMsgRefNum uint32 + SarSegmentSeqnum uint32 + SarTotalSegments uint32 + SetDpf uint32 + SmsSignal uint32 + SourceAddrSubunit uint32 + SourceBearerType uint32 + SourceNetworkType uint32 + SourcePort uint32 + SourceSubaddress uint32 + SourceTelematicsID uint32 + UserMessageReference uint32 + UserResponseCode uint32 + UssdServiceOp uint32 + type NetworkStreamReader struct + func NewNetworkStreamReader(fromConnection net.Conn) *NetworkStreamReader + func (reader *NetworkStreamReader) AttachedConnectionIsClosed() bool + func (reader *NetworkStreamReader) ExtractNextPDUs() ([]*PDU, error) + func (reader *NetworkStreamReader) Read() ([]*PDU, error) + type PDU struct + CommandID CommandIDType + CommandLength uint32 + CommandStatus uint32 + MandatoryParameters []*Parameter + OptionalParameters []*Parameter + SequenceNumber uint32 + func ConvertJSONToPDUs(jsonMessages []*JSONMessage) ([]*PDU, error) + func DecodePDU(stream []byte) (*PDU, error) + func NewPDU(id CommandIDType, status uint32, sequence uint32, mandatoryParams []*Parameter, ...) *PDU + func (pdu *PDU) CommandName() string + func (pdu *PDU) ComputeLength() uint32 + func (pdu *PDU) Encode() ([]byte, error) + func (pdu *PDU) IsRequest() bool + type PDUDefinition struct + MandatoryParameters []string + MinLength uint32 + Type CommandIDType + type Parameter struct + EncodeLength uint32 + Type ParameterType + Value interface{} + func NewCOctetStringParameter(value string) *Parameter + func NewFLParameter(value interface{}) *Parameter + func NewOctetStringFromString(value string) *Parameter + func NewTLVParameter(tag uint16, value interface{}) *Parameter + func (param *Parameter) Encode() []byte + type ParameterDefinition struct + MaxLength uint16 + Name string + TagID uint16 + Type ParameterType + type ParameterType uint32 + const TypeCOctetString + const TypeOctetString + const TypeTLV + const TypeUint16 + const TypeUint32 + const TypeUint8 + type Peer struct + func NewPeerWithConnection(c *net.TCPConn) *Peer + type TLV struct + Tag uint16 + VLength uint16 + Value interface{}