1 Star 1 Fork 1

刘昭/smf

加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
snssai.go 809 Bytes
一键复制 编辑 原始数据 按行查看 历史
刘昭 提交于 2022-01-25 19:31 +08:00 . 0.1.0
package context
import "github.com/free5gc/openapi/models"
type SNssai struct {
Sst int32
Sd string
}
// Equal return true if two S-NSSAI is equal
func (s *SNssai) Equal(target *SNssai) bool {
return s.Sst == target.Sst && s.Sd == target.Sd
}
type SnssaiUPFInfo struct {
SNssai SNssai
DnnList []DnnUPFInfoItem
}
// DnnUpfInfoItem presents UPF dnn information
type DnnUPFInfoItem struct {
Dnn string
DnaiList []string
PduSessionTypes []models.PduSessionType
}
// ContainsDNAI return true if the this dnn Info contains the specify DNAI
func (d *DnnUPFInfoItem) ContainsDNAI(targetDnai string) bool {
if targetDnai == "" {
return d.DnaiList == nil || len(d.DnaiList) == 0
}
for _, dnai := range d.DnaiList {
if dnai == targetDnai {
return true
}
}
return false
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/liu-zhao234568/smf.git
git@gitee.com:liu-zhao234568/smf.git
liu-zhao234568
smf
smf
v1.0.0

搜索帮助