13
13
)
14
14
15
15
16
- class LinkControl (KaitaiStruct ):
16
+ class FullLinkControl (KaitaiStruct ):
17
17
"""ETSI TS 102 361-2 V2.4.1 (2017-10), Section 7.1.1"""
18
18
19
19
class Flcos (Enum ):
@@ -61,39 +61,42 @@ def _read(self):
61
61
self .protect_flag = self ._io .read_bits_int_be (1 ) != 0
62
62
self .reserved = self ._io .read_bits_int_be (1 ) != 0
63
63
self .full_link_control_opcode = KaitaiStream .resolve_enum (
64
- LinkControl .Flcos , self ._io .read_bits_int_be (6 )
64
+ FullLinkControl .Flcos , self ._io .read_bits_int_be (6 )
65
65
)
66
66
self .feature_set_id = KaitaiStream .resolve_enum (
67
- LinkControl .FeatureSetIds , self ._io .read_bits_int_be (8 )
67
+ FullLinkControl .FeatureSetIds , self ._io .read_bits_int_be (8 )
68
68
)
69
69
self ._io .align_to_byte ()
70
70
_on = self .full_link_control_opcode
71
- if _on == LinkControl .Flcos .talker_alias_header :
72
- self .specific_data = LinkControl .TalkerAliasHeader (
71
+ if _on == FullLinkControl .Flcos .talker_alias_header :
72
+ self .specific_data = FullLinkControl .TalkerAliasHeader (
73
73
self ._io , self , self ._root
74
74
)
75
- elif _on == LinkControl .Flcos .unit_to_unit_voice :
76
- self .specific_data = LinkControl .UnitToUnitVoiceChannelUser (
75
+ elif _on == FullLinkControl .Flcos .unit_to_unit_voice :
76
+ self .specific_data = FullLinkControl .UnitToUnitVoiceChannelUser (
77
77
self ._io , self , self ._root
78
78
)
79
- elif _on == LinkControl .Flcos .group_voice :
80
- self .specific_data = LinkControl .GroupVoiceChannelUser (
79
+ elif _on == FullLinkControl .Flcos .group_voice :
80
+ self .specific_data = FullLinkControl .GroupVoiceChannelUser (
81
81
self ._io , self , self ._root
82
82
)
83
- elif _on == LinkControl .Flcos .talker_alias_block3 :
84
- self .specific_data = LinkControl .TalkerAliasContinuation (
83
+ elif _on == FullLinkControl .Flcos .talker_alias_block3 :
84
+ self .specific_data = FullLinkControl .TalkerAliasContinuation (
85
85
self ._io , self , self ._root
86
86
)
87
- elif _on == LinkControl .Flcos .talker_alias_block1 :
88
- self .specific_data = LinkControl .TalkerAliasContinuation (
87
+ elif _on == FullLinkControl .Flcos .talker_alias_block1 :
88
+ self .specific_data = FullLinkControl .TalkerAliasContinuation (
89
89
self ._io , self , self ._root
90
90
)
91
- elif _on == LinkControl .Flcos .talker_alias_block2 :
92
- self .specific_data = LinkControl .TalkerAliasContinuation (
91
+ elif _on == FullLinkControl .Flcos .talker_alias_block2 :
92
+ self .specific_data = FullLinkControl .TalkerAliasContinuation (
93
93
self ._io , self , self ._root
94
94
)
95
- elif _on == LinkControl .Flcos .gps_info :
96
- self .specific_data = LinkControl .GpsInfoLcPdu (self ._io , self , self ._root )
95
+ elif _on == FullLinkControl .Flcos .gps_info :
96
+ self .specific_data = FullLinkControl .GpsInfoLcPdu (
97
+ self ._io , self , self ._root
98
+ )
99
+ self .crc_checksum = self ._io .read_bytes (3 )
97
100
98
101
class GpsInfoLcPdu (KaitaiStruct ):
99
102
def __init__ (self , _io , _parent = None , _root = None ):
@@ -105,7 +108,7 @@ def __init__(self, _io, _parent=None, _root=None):
105
108
def _read (self ):
106
109
self .reserved = self ._io .read_bits_int_be (4 )
107
110
self .position_error = KaitaiStream .resolve_enum (
108
- LinkControl .PositionErrors , self ._io .read_bits_int_be (3 )
111
+ FullLinkControl .PositionErrors , self ._io .read_bits_int_be (3 )
109
112
)
110
113
self .longitude = self ._io .read_bits_int_be (25 )
111
114
self .latitude = self ._io .read_bits_int_be (24 )
@@ -143,7 +146,7 @@ def __init__(self, _io, _parent=None, _root=None):
143
146
144
147
def _read (self ):
145
148
self .talker_alias_data_format = KaitaiStream .resolve_enum (
146
- LinkControl .TalkerDataFormats , self ._io .read_bits_int_be (2 )
149
+ FullLinkControl .TalkerDataFormats , self ._io .read_bits_int_be (2 )
147
150
)
148
151
self .talker_alias_data_length = self ._io .read_bits_int_be (5 )
149
152
self .talker_alias_data = self ._io .read_bits_int_be (49 )
0 commit comments