Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package libnas
- import (
- "log"
- "reflect"
- )
- type TEpsQoS struct {
- QCI byte
- MBRUp, MBRDn, GBRUp, GBRDn uint64
- }
- func (qos *TEpsQoS) Value() (res []byte) {
- res = append(res, qos.QCI)
- if qos.MBRUp == 0 && qos.MBRDn == 0 && qos.GBRUp == 0 && qos.GBRDn == 0 {
- return
- }
- // todo implement of MBR&GBR coding here
- return
- }
- func (qos *TEpsQoS) Set(a any) {
- if z, ok := a.([]byte); !ok {
- log.Printf("TEpsQos accepting only slices as input for unmarshal but %s found", reflect.TypeOf(a).String())
- } else {
- qos.QCI = z[0]
- // todo implement decoding MBR&GBR here
- }
- return
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement