func (dsl *DestSmeList) Bytes() []byte {
	var ret []byte
	for i := range dsl.Data {
		ret = append(ret, dsl.Data[i].Bytes()...)
	}
	return ret
}
Bytes implements the Data interface.
package pdufield
import (
	"encoding/binary"
	"io"
	"strconv"
)
type Name string
const (
	AddrNPI              Name = "addr_npi"
	AddrTON              Name = "addr_ton"
	AddressRange         Name = "address_range"
	DataCoding           Name = "data_coding"
	DestAddrNPI          Name = "dest_addr_npi"
	DestAddrTON          Name = "dest_addr_ton"
	DestinationAddr      Name = "destination_addr"
	DestinationList      Name = "dest_addresses"
	ESMClass             Name = "esm_class"
	ErrorCode            Name = "error_code"
	FinalDate            Name = "final_date"
	InterfaceVersion     Name = "interface_version"
	MessageID            Name = "message_id"
	MessageState         Name = "message_state"
	NumberDests          Name = "number_of_dests"
	NoUnsuccess          Name = "no_unsuccess"
	Password             Name = "password"
	PriorityFlag         Name = "priority_flag"
	ProtocolID           Name = "protocol_id"
	RegisteredDelivery   Name = "registered_delivery"
	ReplaceIfPresentFlag Name = "replace_if_present_flag"
	SMDefaultMsgID       Name = "sm_default_msg_id"
	SMLength             Name = "sm_length"
	ScheduleDeliveryTime Name = "schedule_delivery_time"
	ServiceType          Name = "service_type"
	ShortMessage         Name = "short_message"
	SourceAddr           Name = "source_addr"
	SourceAddrNPI        Name = "source_addr_npi"
	SourceAddrTON        Name = "source_addr_ton"
	SystemID             Name = "system_id"
	SystemType           Name = "system_type"
	UDHLength            Name = "gsm_sms_ud.udh.len"
	GSMUserData          Name = "gsm_sms_ud.udh"
	UnsuccessSme         Name = "unsuccess_sme"
	ValidityPeriod       Name = "validity_period"
)
type Fixed struct {
	Data uint8
}
func (f *Fixed) Len() int {
	return 1
}
func (f *Fixed) Raw() interface{} {
	return f.Data
}
func (f *Fixed) String() string {
	return strconv.Itoa(int(f.Data))
}
func (f *Fixed) Bytes() []byte {
	return []byte{f.Data}
}
func (f *Fixed) SerializeTo(w io.Writer) error {
	_, err := w.Write(f.Bytes())
	return err
}
type Variable struct {
	Data []byte
}
func (v *Variable) Len() int {
	return len(v.Bytes())
}
func (v *Variable) Raw() interface{} {
	return v.Data
}
func (v *Variable) String() string {
	if l := len(v.Data); l > 0 && v.Data[l-1] == 0x00 {
		return string(v.Data[:l-1])
	}
	return string(v.Data)
}
func (v *Variable) Bytes() []byte {
	if len(v.Data) > 0 && v.Data[len(v.Data)-1] == 0x00 {
		return v.Data
	}
	return append(v.Data, 0x00)
}
func (v *Variable) SerializeTo(w io.Writer) error {
	_, err := w.Write(v.Bytes())
	return err
}
type SM struct {
	Data []byte
}
func (sm *SM) Len() int {
	return len(sm.Data)
}
func (sm *SM) Raw() interface{} {
	return sm.Data
}
func (sm *SM) String() string {
	return string(sm.Data)
}
func (sm *SM) Bytes() []byte {
	return sm.Data
}
func (sm *SM) SerializeTo(w io.Writer) error {
	_, err := w.Write(sm.Bytes())
	return err
}
type DeliverySetting uint8
const (
	NoDeliveryReceipt      DeliverySetting = 0x00
	FinalDeliveryReceipt   DeliverySetting = 0x01
	FailureDeliveryReceipt DeliverySetting = 0x02
)
type DestSme struct {
	Flag     Fixed
	Ton      Fixed
	Npi      Fixed
	DestAddr Variable
}
func (ds *DestSme) Len() int {
	return ds.Flag.Len() + ds.Ton.Len() + ds.Npi.Len() + ds.DestAddr.Len()
}
func (ds *DestSme) Raw() interface{} {
	return ds.Bytes()
}
func (ds *DestSme) String() string {
	return ds.Flag.String() + "," + ds.Ton.String() + "," + ds.Npi.String() + "," + ds.DestAddr.String()
}
func (ds *DestSme) Bytes() []byte {
	var ret []byte
	ret = append(ret, ds.Flag.Bytes()...)
	ret = append(ret, ds.Ton.Bytes()...)
	ret = append(ret, ds.Npi.Bytes()...)
	ret = append(ret, ds.DestAddr.Bytes()...)
	return ret
}
func (ds *DestSme) SerializeTo(w io.Writer) error {
	_, err := w.Write(ds.Bytes())
	return err
}
type DestSmeList struct {
	Data []DestSme
}
func (dsl *DestSmeList) Len() int {
	var ret int
	for i := range dsl.Data {
		ret = ret + dsl.Data[i].Len()
	}
	return ret
}
func (dsl *DestSmeList) Raw() interface{} {
	return dsl.Bytes()
}
func (dsl *DestSmeList) String() string {
	var ret string
	for i := range dsl.Data {
		ret = ret + dsl.Data[i].String() + ";"
	}
	return ret
}