Documentation ¶
Index ¶
- func Marshal(w io.Writer, packet any) (n int64, err error)
- func Unmarshal(r io.Reader) (packet any, err error)
- type Address
- type Command
- type Deliver
- type DeliverFlags
- type DeliverReport
- type DeliverReportError
- type Direction
- type Duration
- type EnhancedDuration
- type FailureCause
- type Flags
- type MessageType
- type ParameterIndicator
- type SCAddress
- type SMPPMarshaller
- type SMPPUnmarshaler
- type StatusReport
- type Submit
- type SubmitFlags
- type SubmitReport
- type SubmitReportError
- type Time
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Address ¶
func (Address) MarshalBinary ¶
type Command ¶
type Command struct { SCAddress SCAddress `TP:"SC"` Flags Flags `DIR:"MO"` MessageReference byte `TP:"MR"` StatusReportRequest bool `TP:"SRR"` ProtocolIdentifier byte `TP:"PID"` CommandType byte `TP:"CT"` MessageNumber byte `TP:"MN"` DestinationAddress Address `TP:"DA"` CommandData []byte `TP:"CD"` }
Command see GSM 03.40, section 9.2.2.4 (45p)
type Deliver ¶
type Deliver struct { SCAddress SCAddress `TP:"SC"` Flags DeliverFlags `DIR:"MT"` OriginatingAddress Address `TP:"OA"` ProtocolIdentifier byte `TP:"PID"` DataCoding byte `TP:"DCS"` ServiceCentreTimestamp Time `TP:"SCTS"` UserData []byte `TP:"UD"` }
Deliver see GSM 03.40, section 9.2.2.1 (35p)
type DeliverFlags ¶
type DeliverFlags struct { MessageType MessageType MoreMessagesToSend bool ReplyPath bool UDHIndicator bool StatusReportIndication bool }
func (*DeliverFlags) ReadByte ¶
func (p *DeliverFlags) ReadByte() (byte, error)
func (*DeliverFlags) WriteByte ¶
func (p *DeliverFlags) WriteByte(c byte) error
type DeliverReport ¶
type DeliverReport struct { SCAddress SCAddress `TP:"SC"` Flags Flags `DIR:"MO"` ParameterIndicator ParameterIndicator `TP:"PI"` ProtocolIdentifier byte `TP:"PID"` DataCoding byte `TP:"DCS"` UserData []byte `TP:"UD"` }
DeliverReport see GSM 03.40, section 9.2.2.1a (37p)
type DeliverReportError ¶
type DeliverReportError struct { SCAddress SCAddress `TP:"SC"` Flags Flags `DIR:"MO"` FailureCause FailureCause `TP:"FCS"` }
type EnhancedDuration ¶
type FailureCause ¶
type FailureCause byte
FailureCause see GSM 03.40, section 9.2.3.22 (54p)
func (FailureCause) Error ¶
func (f FailureCause) Error() string
type Flags ¶
type Flags struct {
MessageType MessageType
}
type MessageType ¶
type MessageType byte
const ( MessageTypeDeliver MessageType = iota // 00 0 MT MessageTypeDeliverReport // 00 1 MO MessageTypeSubmitReport // 01 0 MT MessageTypeSubmit // 01 1 MO MessageTypeStatusReport // 10 0 MT MessageTypeCommand // 10 1 MO )
func (MessageType) Direction ¶
func (t MessageType) Direction() Direction
func (*MessageType) Set ¶
func (t *MessageType) Set(kind byte, dir Direction)
func (MessageType) String ¶
func (t MessageType) String() string
func (MessageType) Type ¶
func (t MessageType) Type() byte
type ParameterIndicator ¶
func (*ParameterIndicator) Has ¶
func (p *ParameterIndicator) Has(abbr string) bool
func (*ParameterIndicator) ReadByte ¶
func (p *ParameterIndicator) ReadByte() (byte, error)
func (*ParameterIndicator) Set ¶
func (p *ParameterIndicator) Set(abbr string)
func (*ParameterIndicator) WriteByte ¶
func (p *ParameterIndicator) WriteByte(c byte) error
type SMPPMarshaller ¶
type SMPPUnmarshaler ¶
type StatusReport ¶
type StatusReport struct { SCAddress SCAddress `TP:"SC"` Flags Flags `DIR:"MT"` MessageReference byte `TP:"MR"` MoreMessagesToSend bool `TP:"MMS"` RecipientAddress Address `TP:"RA"` ServiceCentreTimestamp Time `TP:"SCTS"` DischargeTime Time `TP:"DT"` Status byte `TP:"ST"` }
StatusReport see GSM 03.40, section 9.2.2.3 (43p)
type Submit ¶
type Submit struct { SCAddress SCAddress `TP:"SC"` Flags SubmitFlags `DIR:"MO"` MessageReference byte `TP:"MR"` DestinationAddress Address `TP:"DA"` ProtocolIdentifier byte `TP:"PID"` DataCoding byte `TP:"DCS"` ValidityPeriod any `TP:"VP"` UserData []byte `TP:"UD"` }
Submit see GSM 03.40, section 9.2.2.2 (39p)
type SubmitFlags ¶
type SubmitFlags struct { MessageType MessageType RejectDuplicates bool ValidityPeriodFormat byte ReplyPath bool UserDataHeaderIndicator bool StatusReportRequest bool }
func (*SubmitFlags) ReadByte ¶
func (p *SubmitFlags) ReadByte() (byte, error)
func (*SubmitFlags) WriteByte ¶
func (p *SubmitFlags) WriteByte(c byte) error
type SubmitReport ¶
type SubmitReport struct { SCAddress SCAddress `TP:"SC"` Flags SubmitFlags `DIR:"MT"` ParameterIndicator ParameterIndicator `TP:"PI"` ServiceCentreTimestamp Time `TP:"SCTS"` ProtocolIdentifier byte `TP:"PID"` DataCoding byte `TP:"DCS"` UserData []byte `TP:"UD"` }
SubmitReport see GSM 03.40, section 9.2.2.2a (41p)
type SubmitReportError ¶
type SubmitReportError DeliverReportError
Source Files ¶
Click to show internal directories.
Click to hide internal directories.