sms

package
v0.0.0-...-ac3d764 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 16, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EncodePDUs

func EncodePDUs(cfg MessageConfig) ([][]byte, error)

func PackSeptets

func PackSeptets(septets, header []byte) ([]byte, int)

func UnpackSeptets

func UnpackSeptets(data []byte, startBit, count int) []byte

Types

type Assembler

type Assembler struct {
	// contains filtered or unexported fields
}

func (*Assembler) Add

func (a *Assembler) Add(part Part) (Message, bool)

type GSM7

type GSM7 string

GSM7 is text represented with unpacked GSM 7-bit default-alphabet septets.

func (GSM7) MarshalBinary

func (t GSM7) MarshalBinary() ([]byte, error)

MarshalBinary encodes text as unpacked GSM 7-bit default-alphabet septets.

func (GSM7) MarshalText

func (t GSM7) MarshalText() ([]byte, error)

MarshalText returns the UTF-8 textual form after validating GSM7 support.

func (GSM7) String

func (t GSM7) String() string

func (*GSM7) UnmarshalBinary

func (t *GSM7) UnmarshalBinary(septets []byte) error

UnmarshalBinary decodes unpacked GSM 7-bit default-alphabet septets.

func (*GSM7) UnmarshalText

func (t *GSM7) UnmarshalText(data []byte) error

UnmarshalText decodes UTF-8 text and validates that GSM7 can represent it.

type Message

type Message = contract.Message

func Assemble

func Assemble(parts []Part) []Message

Assemble combines complete multipart groups and returns single-part messages unchanged. Incomplete groups are omitted.

func CloneMessage

func CloneMessage(message Message) Message

type MessageConfig

type MessageConfig = contract.MessageConfig

type Part

type Part struct {
	Message   Message
	Reference uint16
	Total     uint8
	Index     uint8
}

func (*Part) UnmarshalBinary

func (p *Part) UnmarshalBinary(pdu []byte) error

type UCS2

type UCS2 string

UCS2 is text represented with big-endian UCS-2 code units.

func (UCS2) MarshalBinary

func (t UCS2) MarshalBinary() ([]byte, error)

MarshalBinary encodes text as big-endian UCS-2 code units.

func (UCS2) MarshalText

func (t UCS2) MarshalText() ([]byte, error)

MarshalText returns the UTF-8 textual form after validating UCS-2 support.

func (UCS2) String

func (t UCS2) String() string

func (*UCS2) UnmarshalBinary

func (t *UCS2) UnmarshalBinary(data []byte) error

UnmarshalBinary decodes big-endian UCS-2 code units.

func (*UCS2) UnmarshalText

func (t *UCS2) UnmarshalText(data []byte) error

UnmarshalText decodes UTF-8 text and validates that UCS-2 can represent it.

type UCS2LE

type UCS2LE string

UCS2LE is text represented with little-endian UCS-2 code units.

func (UCS2LE) MarshalBinary

func (t UCS2LE) MarshalBinary() ([]byte, error)

MarshalBinary encodes text as little-endian UCS-2 code units.

func (UCS2LE) MarshalText

func (t UCS2LE) MarshalText() ([]byte, error)

MarshalText returns the UTF-8 textual form after validating UCS-2 support.

func (UCS2LE) String

func (t UCS2LE) String() string

func (*UCS2LE) UnmarshalBinary

func (t *UCS2LE) UnmarshalBinary(data []byte) error

UnmarshalBinary decodes little-endian UCS-2 code units.

func (*UCS2LE) UnmarshalText

func (t *UCS2LE) UnmarshalText(data []byte) error

UnmarshalText decodes UTF-8 text and validates that UCS-2 can represent it.

type UTF16

type UTF16 string

UTF16 is text represented with big-endian UTF-16 code units.

func (UTF16) MarshalBinary

func (t UTF16) MarshalBinary() ([]byte, error)

MarshalBinary encodes text as big-endian UTF-16 code units.

func (UTF16) MarshalText

func (t UTF16) MarshalText() ([]byte, error)

MarshalText returns the UTF-8 textual form after validating UTF-16 support.

func (UTF16) String

func (t UTF16) String() string

func (*UTF16) UnmarshalBinary

func (t *UTF16) UnmarshalBinary(data []byte) error

UnmarshalBinary decodes big-endian UTF-16 code units.

func (*UTF16) UnmarshalText

func (t *UTF16) UnmarshalText(data []byte) error

UnmarshalText decodes UTF-8 text and validates that UTF-16 can represent it.

type UTF16LE

type UTF16LE string

UTF16LE is text represented with little-endian UTF-16 code units.

func (UTF16LE) MarshalBinary

func (t UTF16LE) MarshalBinary() ([]byte, error)

MarshalBinary encodes text as little-endian UTF-16 code units.

func (UTF16LE) MarshalText

func (t UTF16LE) MarshalText() ([]byte, error)

MarshalText returns the UTF-8 textual form after validating UTF-16 support.

func (UTF16LE) String

func (t UTF16LE) String() string

func (*UTF16LE) UnmarshalBinary

func (t *UTF16LE) UnmarshalBinary(data []byte) error

UnmarshalBinary decodes little-endian UTF-16 code units.

func (*UTF16LE) UnmarshalText

func (t *UTF16LE) UnmarshalText(data []byte) error

UnmarshalText decodes UTF-8 text and validates that UTF-16 can represent it.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL