func (f *SubsequentVolumeThresholdFields) SetDLVOLFlag() {
	f.Flags |= 0x04
}
SetDLVOLFlag sets DLVOL flag in SubsequentVolumeThreshold.
package ie
import (
	"encoding/binary"
	"io"
)
func NewSubsequentVolumeThreshold(flags uint8, tvol, uvol, dvol uint64) *IE {
	fields := NewSubsequentVolumeThresholdFields(flags, tvol, uvol, dvol)
	b, err := fields.Marshal()
	if err != nil {
		return nil
	}
	return New(SubsequentVolumeThreshold, b)
}
func (i *IE) SubsequentVolumeThreshold() (*SubsequentVolumeThresholdFields, error) {
	switch i.Type {
	case SubsequentVolumeThreshold:
		fields, err := ParseSubsequentVolumeThresholdFields(i.Payload)
		if err != nil {
			return nil, err
		}
		return fields, nil
	case CreateURR:
		ies, err := i.CreateURR()
		if err != nil {
			return nil, err
		}
		for _, x := range ies {
			if x.Type == SubsequentVolumeThreshold {
				return x.SubsequentVolumeThreshold()
			}
		}
		return nil, ErrIENotFound
	case UpdateURR:
		ies, err := i.UpdateURR()
		if err != nil {
			return nil, err
		}
		for _, x := range ies {
			if x.Type == SubsequentVolumeThreshold {
				return x.SubsequentVolumeThreshold()
			}
		}
		return nil, ErrIENotFound
	case AdditionalMonitoringTime:
		ies, err := i.AdditionalMonitoringTime()
		if err != nil {
			return nil, err
		}
		for _, x := range ies {
			if x.Type == SubsequentVolumeThreshold {
				return x.SubsequentVolumeThreshold()
			}
		}
		return nil, ErrIENotFound
	default:
		return nil, &InvalidTypeError{Type: i.Type}
	}
}
type SubsequentVolumeThresholdFields struct {
	Flags          uint8
	TotalVolume    uint64
	UplinkVolume   uint64
	DownlinkVolume uint64
}
func NewSubsequentVolumeThresholdFields(flags uint8, tvol, uvol, dvol uint64) *SubsequentVolumeThresholdFields {
	f := &SubsequentVolumeThresholdFields{Flags: flags}
	if f.HasTOVOL() {
		f.TotalVolume = tvol
	}
	if f.HasULVOL() {
		f.UplinkVolume = uvol
	}
	if f.HasDLVOL() {
		f.DownlinkVolume = dvol
	}
	return f
}
func (f *SubsequentVolumeThresholdFields) HasDLVOL() bool {
	return has3rdBit(f.Flags)
}