Skip to content

Commit

Permalink
Fix gate status
Browse files Browse the repository at this point in the history
  • Loading branch information
Emanuele Gallone committed Mar 10, 2022
1 parent 0100962 commit 78a8373
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
4 changes: 0 additions & 4 deletions pkg/pfcpsim/session/ies.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ type IEMethod uint8
// Definitions for session rules

type direction int
type gateStatus int

const (
notSet direction = iota
Expand All @@ -24,8 +23,5 @@ const (
ActionBuffer uint8 = 0x4
ActionNotify uint8 = 0x8

GateOpen gateStatus = iota
GateClosed

S_TAG = 0x100 // Refer to table 8.2.56-1 in PFCP specs Release 16
)
8 changes: 4 additions & 4 deletions pkg/pfcpsim/session/qer_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ type qerBuilder struct {
dlMbr uint64
isGbrSet bool
ulGbr uint64
dlGbr uint64
gateStatus gateStatus
dlGbr uint64
gateStatus GateStatus

isIDSet bool
}
Expand Down Expand Up @@ -65,7 +65,7 @@ func (b *qerBuilder) WithDownlinkGBR(dlGbr uint64) *qerBuilder {
return b
}

func (b *qerBuilder) WithGateStatus(status gateStatus) *qerBuilder {
func (b *qerBuilder) WithGateStatus(status uint8) *qerBuilder {
b.gateStatus = status

return b
Expand All @@ -91,7 +91,7 @@ func (b *qerBuilder) Build() *ie.IE {
}

gate := ie.NewGateStatus(0, 0) //Open
if b.gateStatus == GateClosed {
if b.gateStatus == ie.GateStatusClosed {
gate = ie.NewGateStatus(1, 1)
}

Expand Down

0 comments on commit 78a8373

Please sign in to comment.