func (pdu *codec) TLVFields() pdutlv.Map {
	return pdu.t
}
Fields implement the PDU interface.
package pdu
import (
	"bytes"
	"fmt"
	"io"
	"sync/atomic"
	"github.com/fiorix/go-smpp/smpp/pdu/pdufield"
	"github.com/fiorix/go-smpp/smpp/pdu/pdutlv"
)
var nextSeq uint32
type codec struct {
	h *Header
	l pdufield.List
	f pdufield.Map
	t pdutlv.Map
}
func (pdu *codec) init() {
	if pdu.l == nil {
		pdu.l = pdufield.List{}
	}
	pdu.f = make(pdufield.Map)
	pdu.t = make(pdutlv.Map)
	if pdu.h.Seq == 0 {  
		pdu.h.Seq = atomic.AddUint32(&nextSeq, 1)
	}
}
func (pdu *codec) setup(f pdufield.Map, t pdutlv.Map) {
	pdu.f, pdu.t = f, t
}
func (pdu *codec) Header() *Header {
	return pdu.h
}
func (pdu *codec) Len() int {
	l := HeaderLen
	for _, f := range pdu.f {
		l += f.Len()
	}
	for _, t := range pdu.t {
		l += t.Len()
	}
	return l
}
func (pdu *codec) FieldList() pdufield.List {
	return pdu.l
}
func (pdu *codec) Fields() pdufield.Map {
	return pdu.f
}