Versions in this module Expand all Collapse all v0 v0.1.6 Apr 3, 2023 Changes in this version + func MapTagIDToTagName(tagId TagID) string type Options + func (o *Options) HumanReadable() string v0.1.5 Dec 10, 2021 v0.1.4 Dec 8, 2021 v0.1.3 Oct 8, 2020 v0.1.2 Oct 7, 2020 v0.1.1 Sep 26, 2020 v0.1.0 Sep 26, 2020 Changes in this version + const AddrNpiFld + const AddrTonFld + const AddressRangeFld + const AllSMEAck + const ConAbtEsmType + const DataCodingFld + const DatagramEsmMode + const DefaultEsmMode + const DefaultEsmType + const DelAckEsmType + const DelRecEsmType + const DestAddrNpiFld + const DestAddrTonFld + const DestFlagFld + const DestinationAddrFld + const DlNameFld + const ErrorCodeFld + const EsmClassFld + const EsmeAddrFld + const EsmeAddrNpiFld + const EsmeAddrTonFld + const FailDeliveryReceipt + const FinalDateFld + const ForwardEsmMode + const IDNEsmType + const InterfaceVersionFld + const ManualSMEAck + const MaxPDUSize + const MessageIDFld + const MessageStateFld + const NoDeliveryReceipt + const NoEsmFeat + const NoInterNotification + const NoSMEAck + const NoUnsuccessFld + const NotApplicableEsmMode + const NumberOfDestsFld + const PasswordFld + const PriorityFlagFld + const ProtocolIDFld + const RegisteredDeliveryFld + const RepPathEsmFeat + const ReplaceIfPresentFlagFld + const ScheduleDeliveryTimeFld + const ServiceTypeFld + const ShortMessageFld + const SmDefaultMsgIDFld + const SmLengthFld + const SourceAddrFld + const SourceAddrNpiFld + const SourceAddrTonFld + const StoreAndForwardEsmMode + const SystemIDFld + const SystemTypeFld + const UDHIEsmFeat + const UDHIRepPathEsmFeat + const UsrAckEsmType + const ValidityPeriodFld + const YesDeliveryReceipt + const YesInterNotification + const YesSMEAck + var DelStatMap = map[uint8]DelStat + func IsRequest(id CommandID) bool + func SeparateUDH(c []byte) ([]byte, []byte, error) + func SystemID(p PDU) string + type AlertNotification struct + func (p *AlertNotification) UnmarshalBinary(body []byte) error + func (p AlertNotification) CommandID() CommandID + func (p AlertNotification) MarshalBinary() ([]byte, error) + type BindRx struct + AddrNpi int + AddrTon int + AddressRange string + InterfaceVersion int + Password string + SystemID string + SystemType string + func (p *BindRx) UnmarshalBinary(body []byte) error + func (p BindRx) CommandID() CommandID + func (p BindRx) MarshalBinary() ([]byte, error) + func (p BindRx) Response(sysID string) *BindRxResp + type BindRxResp struct + Options *Options + SystemID string + func (p *BindRxResp) UnmarshalBinary(body []byte) error + func (p BindRxResp) CommandID() CommandID + func (p BindRxResp) MarshalBinary() ([]byte, error) + type BindTRx struct + AddrNpi int + AddrTon int + AddressRange string + InterfaceVersion int + Password string + SystemID string + SystemType string + func (p *BindTRx) UnmarshalBinary(body []byte) error + func (p BindTRx) CommandID() CommandID + func (p BindTRx) MarshalBinary() ([]byte, error) + func (p BindTRx) Response(sysID string) *BindTRxResp + type BindTRxResp struct + Options *Options + SystemID string + func (p *BindTRxResp) UnmarshalBinary(body []byte) error + func (p BindTRxResp) CommandID() CommandID + func (p BindTRxResp) MarshalBinary() ([]byte, error) + type BindTx struct + AddrNpi int + AddrTon int + AddressRange string + InterfaceVersion int + Password string + SystemID string + SystemType string + func (p *BindTx) UnmarshalBinary(body []byte) error + func (p BindTx) CommandID() CommandID + func (p BindTx) MarshalBinary() ([]byte, error) + func (p BindTx) Response(sysID string) *BindTxResp + type BindTxResp struct + Options *Options + SystemID string + func (p *BindTxResp) UnmarshalBinary(body []byte) error + func (p BindTxResp) CommandID() CommandID + func (p BindTxResp) MarshalBinary() ([]byte, error) + type CancelSm struct + func (p *CancelSm) UnmarshalBinary(body []byte) error + func (p CancelSm) CommandID() CommandID + func (p CancelSm) MarshalBinary() ([]byte, error) + type CancelSmResp struct + func (p *CancelSmResp) UnmarshalBinary(body []byte) error + func (p CancelSmResp) CommandID() CommandID + func (p CancelSmResp) MarshalBinary() ([]byte, error) + type CommandID uint32 + const AlertNotificationID + const BindReceiverID + const BindReceiverRespID + const BindTransceiverID + const BindTransceiverRespID + const BindTransmitterID + const BindTransmitterRespID + const CancelSmID + const CancelSmRespID + const DataSmID + const DataSmRespID + const DeliverSmID + const DeliverSmRespID + const EnquireLinkID + const EnquireLinkRespID + const GenericNackID + const OutbindID + const QuerySmID + const QuerySmRespID + const ReplaceSmID + const ReplaceSmRespID + const SubmitMultiID + const SubmitMultiRespID + const SubmitSmID + const SubmitSmRespID + const UnbindID + const UnbindRespID + func (i CommandID) String() string + type DataSm struct + func (p *DataSm) UnmarshalBinary(body []byte) error + func (p DataSm) CommandID() CommandID + func (p DataSm) MarshalBinary() ([]byte, error) + type DataSmResp struct + func (p *DataSmResp) UnmarshalBinary(body []byte) error + func (p DataSmResp) CommandID() CommandID + func (p DataSmResp) MarshalBinary() ([]byte, error) + type Decoder struct + func NewDecoder(r io.Reader) *Decoder + func (d *Decoder) Decode() (Header, PDU, error) + type DelStat string + const DelStatAccepted + const DelStatDeleted + const DelStatDelivered + const DelStatEnRoute + const DelStatExpired + const DelStatRejected + const DelStatUndeliverable + const DelStatUnknown + type DeliverSm struct + DataCoding int + DestAddrNpi int + DestAddrTon int + DestinationAddr string + EsmClass EsmClass + Options *Options + PriorityFlag int + ProtocolID int + RegisteredDelivery RegisteredDelivery + ReplaceIfPresentFlag int + ScheduleDeliveryTime time.Time + ServiceType string + ShortMessage string + SmDefaultMsgID int + SourceAddr string + SourceAddrNpi int + SourceAddrTon int + ValidityPeriod time.Time + func (p *DeliverSm) UnmarshalBinary(body []byte) error + func (p DeliverSm) CommandID() CommandID + func (p DeliverSm) MarshalBinary() ([]byte, error) + func (p DeliverSm) Response(msgID string) *DeliverSmResp + type DeliverSmResp struct + MessageID string + func (p *DeliverSmResp) UnmarshalBinary(body []byte) error + func (p DeliverSmResp) CommandID() CommandID + func (p DeliverSmResp) MarshalBinary() ([]byte, error) + type DeliveryReceipt struct + Dlvrd string + DoneDate time.Time + Err string + Id string + Stat DelStat + Sub string + SubmitDate time.Time + Text string + func ParseDeliveryReceipt(sm string) (*DeliveryReceipt, error) + func (dr *DeliveryReceipt) String() string + type Encoder struct + func NewEncoder(w io.Writer, seq Sequencer) *Encoder + func (en *Encoder) Encode(p PDU, opts ...EncoderOption) (uint32, error) + type EncoderOption func(*encoderOpts) + func EncodeSeq(seq uint32) EncoderOption + func EncodeStatus(status Status) EncoderOption + type EnquireLink struct + func (p EnquireLink) CommandID() CommandID + func (p EnquireLink) MarshalBinary() ([]byte, error) + func (p EnquireLink) Response() *EnquireLinkResp + func (p EnquireLink) UnmarshalBinary(body []byte) error + type EnquireLinkResp struct + func (p EnquireLinkResp) CommandID() CommandID + func (p EnquireLinkResp) MarshalBinary() ([]byte, error) + func (p EnquireLinkResp) UnmarshalBinary(body []byte) error + type EsmClass struct + Feature int + Mode int + Type int + func ParseEsmClass(b byte) EsmClass + func (ec EsmClass) Byte() byte + type GenericNack struct + func (p GenericNack) CommandID() CommandID + func (p GenericNack) MarshalBinary() ([]byte, error) + func (p GenericNack) UnmarshalBinary(body []byte) error + type Header interface + CommandID func() CommandID + Length func() uint32 + Sequence func() uint32 + Status func() Status + type Options struct + func NewOptions() *Options + func (o *Options) Get(tag TagID) ([]byte, bool) + func (o *Options) GetCString(tag TagID) (string, bool) + func (o *Options) GetDouble(tag TagID) (int, bool) + func (o *Options) GetSingle(tag TagID) (int, bool) + func (o *Options) GetString(tag TagID) (string, bool) + func (o *Options) MarshalBinary() ([]byte, error) + func (o *Options) MessagePayload() string + func (o *Options) MessageState() int + func (o *Options) ReceiptedMessageID() string + func (o *Options) SarMsgRefNum() int + func (o *Options) SarSegmentSeqnum() int + func (o *Options) SarTotalSegments() int + func (o *Options) ScInterfaceVersion() int + func (o *Options) Set(tag TagID, val []byte) *Options + func (o *Options) SetCString(tag TagID, val string) *Options + func (o *Options) SetDouble(tag TagID, val int) *Options + func (o *Options) SetMessagePayload(val string) *Options + func (o *Options) SetMessageState(val int) *Options + func (o *Options) SetReceiptedMessageID(val string) *Options + func (o *Options) SetSarMsgRefNum(val int) *Options + func (o *Options) SetSarSegmentSeqnum(val int) *Options + func (o *Options) SetSarTotalSegments(val int) *Options + func (o *Options) SetScInterfaceVersion(val int) *Options + func (o *Options) SetSingle(tag TagID, val int) *Options + func (o *Options) SetString(tag TagID, val string) *Options + func (o *Options) SetUserMessageReference(val int) *Options + func (o *Options) UnmarshalBinary(buf []byte) error + func (o *Options) UserMessageReference() int + type Outbind struct + func (p *Outbind) UnmarshalBinary(body []byte) error + func (p Outbind) CommandID() CommandID + func (p Outbind) MarshalBinary() ([]byte, error) + type PDU interface + CommandID func() CommandID + func NewPDU(commandID CommandID) PDU + type QuerySm struct + MessageID string + SourceAddr string + SourceAddrNpi int + SourceAddrTon int + func (p *QuerySm) UnmarshalBinary(body []byte) error + func (p QuerySm) CommandID() CommandID + func (p QuerySm) MarshalBinary() ([]byte, error) + func (p QuerySm) Response(date time.Time, state, err int) *QuerySmResp + type QuerySmResp struct + ErrorCode int + FinalDate time.Time + MessageID string + MessageState int + func (p *QuerySmResp) UnmarshalBinary(body []byte) error + func (p QuerySmResp) CommandID() CommandID + func (p QuerySmResp) MarshalBinary() ([]byte, error) + type RegisteredDelivery struct + InterNotification int + Receipt int + SMEAck int + func ParseRegisteredDelivery(b byte) RegisteredDelivery + func (rd RegisteredDelivery) Byte() byte + type ReplaceSm struct + func (p *ReplaceSm) UnmarshalBinary(body []byte) error + func (p ReplaceSm) CommandID() CommandID + func (p ReplaceSm) MarshalBinary() ([]byte, error) + type ReplaceSmResp struct + func (p *ReplaceSmResp) UnmarshalBinary(body []byte) error + func (p ReplaceSmResp) CommandID() CommandID + func (p ReplaceSmResp) MarshalBinary() ([]byte, error) + type Sequencer interface + Next func() uint32 + func NewSequencer(n uint32) Sequencer + type Status uint32 + const StatusAlyBnd + const StatusBindFail + const StatusCancelFail + const StatusCntSubDL + const StatusDeliveryFailure + const StatusInvBnd + const StatusInvCmdID + const StatusInvCmdLen + const StatusInvDLName + const StatusInvDestFlag + const StatusInvDftMsgID + const StatusInvDstAdr + const StatusInvDstNPI + const StatusInvDstTON + const StatusInvEsmClass + const StatusInvExpiry + const StatusInvMsgID + const StatusInvMsgLen + const StatusInvNumDe + const StatusInvNumMsgs + const StatusInvOptParStream + const StatusInvOptParamVal + const StatusInvParLen + const StatusInvPaswd + const StatusInvPrtFlg + const StatusInvRegDlvFlg + const StatusInvRepFlag + const StatusInvSched + const StatusInvSerTyp + const StatusInvSrcAdr + const StatusInvSrcNPI + const StatusInvSrcTON + const StatusInvSubRep + const StatusInvSysID + const StatusInvSysTyp + const StatusMissingOptParam + const StatusMsgQFul + const StatusOK + const StatusOptParNotAllwd + const StatusPermAppErr + const StatusQueryFail + const StatusRejeAppErr + const StatusReplaceFail + const StatusSubmitFail + const StatusSysErr + const StatusTempAppErr + const StatusThrottled + const StatusUnknownErr + func (i Status) String() string + type SubmitMulti struct + func (p *SubmitMulti) UnmarshalBinary(body []byte) error + func (p SubmitMulti) CommandID() CommandID + func (p SubmitMulti) MarshalBinary() ([]byte, error) + type SubmitMultiResp struct + func (p *SubmitMultiResp) UnmarshalBinary(body []byte) error + func (p SubmitMultiResp) CommandID() CommandID + func (p SubmitMultiResp) MarshalBinary() ([]byte, error) + type SubmitSm struct + DataCoding int + DestAddrNpi int + DestAddrTon int + DestinationAddr string + EsmClass EsmClass + Options *Options + PriorityFlag int + ProtocolID int + RegisteredDelivery RegisteredDelivery + ReplaceIfPresentFlag int + ScheduleDeliveryTime time.Time + ServiceType string + ShortMessage string + SmDefaultMsgID int + SourceAddr string + SourceAddrNpi int + SourceAddrTon int + ValidityPeriod time.Time + func (p *SubmitSm) UnmarshalBinary(body []byte) error + func (p SubmitSm) CommandID() CommandID + func (p SubmitSm) MarshalBinary() ([]byte, error) + func (p SubmitSm) Response(msgID string) *SubmitSmResp + type SubmitSmResp struct + MessageID string + Options *Options + func (p *SubmitSmResp) UnmarshalBinary(body []byte) error + func (p SubmitSmResp) CommandID() CommandID + func (p SubmitSmResp) MarshalBinary() ([]byte, error) + type TagID uint16 + const TagAdditionalStatusInfoTe + const TagAlertOnMessageDeliv + const TagCallbackNum + const TagCallbackNumA + const TagCallbackNumPresInd + const TagDeliveryFailureReason + const TagDestAddrSubUnit + const TagDestBearerType + const TagDestNetworkType + const TagDestSubaddress + const TagDestTelematicsID + const TagDestinationPort + const TagDisplayTime + const TagDpfResult + const TagItsReplyType + const TagItsSessionInfo + const TagLanguageIndicator + const TagMessagePayload + const TagMessageState + const TagMoreMessagesToSend + const TagMsAvailabilityStatus + const TagMsMsgWaitFacilities + const TagMsValidity + const TagNetworkErrorCode + const TagNumberOfMessages + const TagPayloadType + const TagPrivacyIndicator + const TagQosTimeToLive + const TagReceiptedMessageID + const TagSarMsgRefNum + const TagSarSegmentSeqnum + const TagSarTotalSegments + const TagScInterfaceVersion + const TagSetDPF + const TagSmsSignal + const TagSourceAddrSubunit + const TagSourceBearerType + const TagSourceNetworkType + const TagSourcePort + const TagSourceSubaddress + const TagSourceTelematicsID + const TagUserMessageReference + const TagUserResponseCode + const TagUssdServiceOp + func (i TagID) String() string + type Unbind struct + func (p Unbind) CommandID() CommandID + func (p Unbind) MarshalBinary() ([]byte, error) + func (p Unbind) Response() *UnbindResp + func (p Unbind) UnmarshalBinary(body []byte) error + type UnbindResp struct + func (p UnbindResp) CommandID() CommandID + func (p UnbindResp) MarshalBinary() ([]byte, error) + func (p UnbindResp) UnmarshalBinary(body []byte) error