-
Notifications
You must be signed in to change notification settings - Fork 38
/
NAS_UpdateType5GS.go
64 lines (54 loc) · 1.52 KB
/
NAS_UpdateType5GS.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
package nasType
// UpdateType5GS 9.11.3.9A
// NGRanRcu Row, sBit, len = [0, 0], 2 , 1
// SMSRequested Row, sBit, len = [0, 0], 1 , 1
type UpdateType5GS struct {
Iei uint8
Len uint8
Octet uint8
}
func NewUpdateType5GS(iei uint8) (updateType5GS *UpdateType5GS) {
updateType5GS = &UpdateType5GS{}
updateType5GS.SetIei(iei)
return updateType5GS
}
// UpdateType5GS 9.11.3.9A
// Iei Row, sBit, len = [], 8, 8
func (a *UpdateType5GS) GetIei() (iei uint8) {
return a.Iei
}
// UpdateType5GS 9.11.3.9A
// Iei Row, sBit, len = [], 8, 8
func (a *UpdateType5GS) SetIei(iei uint8) {
a.Iei = iei
}
// UpdateType5GS 9.11.3.9A
// Len Row, sBit, len = [], 8, 8
func (a *UpdateType5GS) GetLen() (len uint8) {
return a.Len
}
// UpdateType5GS 9.11.3.9A
// Len Row, sBit, len = [], 8, 8
func (a *UpdateType5GS) SetLen(len uint8) {
a.Len = len
}
// UpdateType5GS 9.11.3.9A
// NGRanRcu Row, sBit, len = [0, 0], 2 , 1
func (a *UpdateType5GS) GetNGRanRcu() (nGRanRcu uint8) {
return a.Octet & GetBitMask(2, 1) >> (1)
}
// UpdateType5GS 9.11.3.9A
// NGRanRcu Row, sBit, len = [0, 0], 2 , 1
func (a *UpdateType5GS) SetNGRanRcu(nGRanRcu uint8) {
a.Octet = (a.Octet & 253) + ((nGRanRcu & 1) << 1)
}
// UpdateType5GS 9.11.3.9A
// SMSRequested Row, sBit, len = [0, 0], 1 , 1
func (a *UpdateType5GS) GetSMSRequested() (sMSRequested uint8) {
return a.Octet & GetBitMask(1, 0)
}
// UpdateType5GS 9.11.3.9A
// SMSRequested Row, sBit, len = [0, 0], 1 , 1
func (a *UpdateType5GS) SetSMSRequested(sMSRequested uint8) {
a.Octet = (a.Octet & 254) + (sMSRequested & 1)
}