func (i *IE) PPI() (uint8, error) {
	if i.Type != DownlinkDataServiceInformation {
		return 0, &InvalidTypeError{Type: i.Type}
	}
	if len(i.Payload) < 2 {
		return 0, io.ErrUnexpectedEOF
	}
	return i.Payload[1], nil
}
PPI returns PPI in uint8 if the type of IE matches.
package ie
import (
	"io"
)
func NewDownlinkDataServiceInformation(hasPPI, hasQFI bool, ppi, qfi uint8) *IE {
	payload := make([]byte, 1)
	if hasPPI {
		payload[0] |= 0x01
		payload = append(payload, ppi)
	}
	if hasQFI {
		payload[0] |= 0x02
		payload = append(payload, qfi)
	}
	return New(DownlinkDataServiceInformation, payload)
}
func (i *IE) DownlinkDataServiceInformation() ([]byte, error) {
	switch i.Type {
	case DownlinkDataServiceInformation:
		return i.Payload, nil
	case DownlinkDataReport:
		ies, err := i.DownlinkDataReport()
		if err != nil {
			return nil, err
		}
		for _, x := range ies {
			if x.Type == DownlinkDataServiceInformation {
				return x.DownlinkDataServiceInformation()
			}
		}
		return nil, ErrIENotFound
	default:
		return nil, &InvalidTypeError{Type: i.Type}
	}
}
func (i *IE) HasPPI() bool {
	if i.Type != DownlinkDataServiceInformation {
		return false
	}
	if len(i.Payload) < 1 {
		return false
	}
	return has1stBit(i.Payload[0])
}
func (i *IE) HasQFI() bool {
	if i.Type != DownlinkDataServiceInformation {
		return false
	}
	if len(i.Payload) < 1 {
		return false
	}
	return has2ndBit(i.Payload[0])
}