-
Notifications
You must be signed in to change notification settings - Fork 37
/
NAS_NoncurrentNativeNASKeySetIdentifier.go
51 lines (43 loc) · 1.84 KB
/
NAS_NoncurrentNativeNASKeySetIdentifier.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
package nasType
// NoncurrentNativeNASKeySetIdentifier 9.11.3.32
// Iei Row, sBit, len = [0, 0], 8 , 4
// Tsc Row, sBit, len = [0, 0], 4 , 1
// NasKeySetIdentifiler Row, sBit, len = [0, 0], 3 , 3
type NoncurrentNativeNASKeySetIdentifier struct {
Octet uint8
}
func NewNoncurrentNativeNASKeySetIdentifier(iei uint8) (noncurrentNativeNASKeySetIdentifier *NoncurrentNativeNASKeySetIdentifier) {
noncurrentNativeNASKeySetIdentifier = &NoncurrentNativeNASKeySetIdentifier{}
noncurrentNativeNASKeySetIdentifier.SetIei(iei)
return noncurrentNativeNASKeySetIdentifier
}
// NoncurrentNativeNASKeySetIdentifier 9.11.3.32
// Iei Row, sBit, len = [0, 0], 8 , 4
func (a *NoncurrentNativeNASKeySetIdentifier) GetIei() (iei uint8) {
return a.Octet & GetBitMask(8, 4) >> (4)
}
// NoncurrentNativeNASKeySetIdentifier 9.11.3.32
// Iei Row, sBit, len = [0, 0], 8 , 4
func (a *NoncurrentNativeNASKeySetIdentifier) SetIei(iei uint8) {
a.Octet = (a.Octet & 15) + ((iei & 15) << 4)
}
// NoncurrentNativeNASKeySetIdentifier 9.11.3.32
// Tsc Row, sBit, len = [0, 0], 4 , 1
func (a *NoncurrentNativeNASKeySetIdentifier) GetTsc() (tsc uint8) {
return a.Octet & GetBitMask(4, 3) >> (3)
}
// NoncurrentNativeNASKeySetIdentifier 9.11.3.32
// Tsc Row, sBit, len = [0, 0], 4 , 1
func (a *NoncurrentNativeNASKeySetIdentifier) SetTsc(tsc uint8) {
a.Octet = (a.Octet & 247) + ((tsc & 1) << 3)
}
// NoncurrentNativeNASKeySetIdentifier 9.11.3.32
// NasKeySetIdentifiler Row, sBit, len = [0, 0], 3 , 3
func (a *NoncurrentNativeNASKeySetIdentifier) GetNasKeySetIdentifiler() (nasKeySetIdentifiler uint8) {
return a.Octet & GetBitMask(3, 0)
}
// NoncurrentNativeNASKeySetIdentifier 9.11.3.32
// NasKeySetIdentifiler Row, sBit, len = [0, 0], 3 , 3
func (a *NoncurrentNativeNASKeySetIdentifier) SetNasKeySetIdentifiler(nasKeySetIdentifiler uint8) {
a.Octet = (a.Octet & 248) + (nasKeySetIdentifiler & 7)
}