-
Notifications
You must be signed in to change notification settings - Fork 38
/
NAS_RegistrationResult5GS.go
64 lines (54 loc) · 1.83 KB
/
NAS_RegistrationResult5GS.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
// RegistrationResult5GS 9.11.3.6
// SMSAllowed Row, sBit, len = [0, 0], 4 , 1
// RegistrationResultValue5GS Row, sBit, len = [0, 0], 3 , 3
type RegistrationResult5GS struct {
Iei uint8
Len uint8
Octet uint8
}
func NewRegistrationResult5GS(iei uint8) (registrationResult5GS *RegistrationResult5GS) {
registrationResult5GS = &RegistrationResult5GS{}
registrationResult5GS.SetIei(iei)
return registrationResult5GS
}
// RegistrationResult5GS 9.11.3.6
// Iei Row, sBit, len = [], 8, 8
func (a *RegistrationResult5GS) GetIei() (iei uint8) {
return a.Iei
}
// RegistrationResult5GS 9.11.3.6
// Iei Row, sBit, len = [], 8, 8
func (a *RegistrationResult5GS) SetIei(iei uint8) {
a.Iei = iei
}
// RegistrationResult5GS 9.11.3.6
// Len Row, sBit, len = [], 8, 8
func (a *RegistrationResult5GS) GetLen() (len uint8) {
return a.Len
}
// RegistrationResult5GS 9.11.3.6
// Len Row, sBit, len = [], 8, 8
func (a *RegistrationResult5GS) SetLen(len uint8) {
a.Len = len
}
// RegistrationResult5GS 9.11.3.6
// SMSAllowed Row, sBit, len = [0, 0], 4 , 1
func (a *RegistrationResult5GS) GetSMSAllowed() (sMSAllowed uint8) {
return a.Octet & GetBitMask(4, 3) >> (3)
}
// RegistrationResult5GS 9.11.3.6
// SMSAllowed Row, sBit, len = [0, 0], 4 , 1
func (a *RegistrationResult5GS) SetSMSAllowed(sMSAllowed uint8) {
a.Octet = (a.Octet & 247) + ((sMSAllowed & 1) << 3)
}
// RegistrationResult5GS 9.11.3.6
// RegistrationResultValue5GS Row, sBit, len = [0, 0], 3 , 3
func (a *RegistrationResult5GS) GetRegistrationResultValue5GS() (registrationResultValue5GS uint8) {
return a.Octet & GetBitMask(3, 0)
}
// RegistrationResult5GS 9.11.3.6
// RegistrationResultValue5GS Row, sBit, len = [0, 0], 3 , 3
func (a *RegistrationResult5GS) SetRegistrationResultValue5GS(registrationResultValue5GS uint8) {
a.Octet = (a.Octet & 248) + (registrationResultValue5GS & 7)
}