Commit | Line | Data |
---|---|---|
81447b5b PP |
1 | # The MIT License (MIT) |
2 | # | |
3 | # Copyright (c) 2017 Philippe Proulx <pproulx@efficios.com> | |
4 | # | |
5 | # Permission is hereby granted, free of charge, to any person obtaining a copy | |
6 | # of this software and associated documentation files (the "Software"), to deal | |
7 | # in the Software without restriction, including without limitation the rights | |
8 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
9 | # copies of the Software, and to permit persons to whom the Software is | |
10 | # furnished to do so, subject to the following conditions: | |
11 | # | |
12 | # The above copyright notice and this permission notice shall be included in | |
13 | # all copies or substantial portions of the Software. | |
14 | # | |
15 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | |
16 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | |
17 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | |
18 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | |
19 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | |
20 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | |
21 | # THE SOFTWARE. | |
22 | ||
23 | from bt2 import native_bt, object, utils | |
f192fc47 | 24 | import bt2.clock_snapshot |
8ae92ae2 | 25 | import collections |
81447b5b PP |
26 | import bt2.packet |
27 | import bt2.stream | |
28 | import bt2.event | |
f6a5e476 | 29 | import copy |
81447b5b PP |
30 | import bt2 |
31 | ||
32 | ||
33 | def _create_from_ptr(ptr): | |
fa4c33e3 | 34 | msg_type = native_bt.message_get_type(ptr) |
81447b5b PP |
35 | cls = None |
36 | ||
fa4c33e3 SM |
37 | if msg_type not in _MESSAGE_TYPE_TO_CLS: |
38 | raise bt2.Error('unknown message type: {}'.format(msg_type)) | |
81447b5b | 39 | |
fa4c33e3 | 40 | return _MESSAGE_TYPE_TO_CLS[msg_type]._create_from_ptr(ptr) |
81447b5b PP |
41 | |
42 | ||
fa4c33e3 SM |
43 | def _msg_types_from_msg_classes(message_types): |
44 | if message_types is None: | |
45 | msg_types = None | |
26c5273a | 46 | else: |
fa4c33e3 SM |
47 | for msg_cls in message_types: |
48 | if msg_cls not in _MESSAGE_TYPE_TO_CLS.values(): | |
49 | raise ValueError("'{}' is not a message class".format(msg_cls)) | |
26c5273a | 50 | |
fa4c33e3 | 51 | msg_types = [msg_cls._TYPE for msg_cls in message_types] |
26c5273a | 52 | |
fa4c33e3 | 53 | return msg_types |
26c5273a PP |
54 | |
55 | ||
c3044a97 | 56 | class _Message(object._SharedObject): |
27d97a3f SM |
57 | _get_ref = staticmethod(native_bt.message_get_ref) |
58 | _put_ref = staticmethod(native_bt.message_put_ref) | |
81447b5b PP |
59 | |
60 | ||
fa4c33e3 | 61 | class _CopyableMessage(_Message): |
f6a5e476 PP |
62 | def __copy__(self): |
63 | return self._copy(lambda obj: obj) | |
64 | ||
65 | def __deepcopy__(self, memo): | |
66 | cpy = self._copy(copy.deepcopy) | |
67 | memo[id(self)] = cpy | |
68 | return cpy | |
69 | ||
70 | ||
27d97a3f | 71 | class _EventMessage(_CopyableMessage): |
5f66202c | 72 | _TYPE = native_bt.MESSAGE_TYPE_EVENT |
f6a5e476 | 73 | |
27d97a3f SM |
74 | @property |
75 | def event(self): | |
76 | event_ptr = native_bt.message_event_borrow_event(self._ptr) | |
77 | assert event_ptr is not None | |
78 | return bt2.event._Event._create_from_ptr_and_get_ref( | |
79 | event_ptr, self._ptr, self._get_ref, self._put_ref) | |
81447b5b | 80 | |
27d97a3f SM |
81 | @property |
82 | def default_clock_snapshot(self): | |
83 | if self.event.event_class.stream_class.default_clock_class is None: | |
84 | return None | |
81447b5b | 85 | |
27d97a3f | 86 | snapshot_ptr = native_bt.message_event_borrow_default_clock_snapshot_const(self._ptr) |
81447b5b | 87 | |
27d97a3f SM |
88 | return bt2.clock_snapshot._ClockSnapshot._create_from_ptr_and_get_ref( |
89 | snapshot_ptr, self._ptr, self._get_ref, self._put_ref) | |
81447b5b | 90 | |
f6a5e476 PP |
91 | @property |
92 | def clock_class_priority_map(self): | |
fa4c33e3 | 93 | cc_prio_map_ptr = native_bt.message_event_get_clock_class_priority_map(self._ptr) |
f6a5e476 PP |
94 | assert(cc_prio_map_ptr) |
95 | return bt2.clock_class_priority_map.ClockClassPriorityMap._create_from_ptr(cc_prio_map_ptr) | |
96 | ||
97 | def __eq__(self, other): | |
98 | if type(other) is not type(self): | |
99 | return False | |
100 | ||
101 | if self.addr == other.addr: | |
102 | return True | |
103 | ||
104 | self_props = ( | |
105 | self.event, | |
106 | self.clock_class_priority_map, | |
107 | ) | |
108 | other_props = ( | |
109 | other.event, | |
110 | other.clock_class_priority_map, | |
111 | ) | |
112 | return self_props == other_props | |
113 | ||
114 | def _copy(self, copy_func): | |
115 | # We can always use references here because those properties are | |
fa4c33e3 SM |
116 | # frozen anyway if they are part of a message. Since the |
117 | # user cannot modify them after copying the message, it's | |
f6a5e476 | 118 | # useless to copy/deep-copy them. |
fa4c33e3 | 119 | return EventMessage(self.event, self.clock_class_priority_map) |
f6a5e476 PP |
120 | |
121 | ||
27d97a3f | 122 | class _PacketBeginningMessage(_CopyableMessage): |
5f66202c | 123 | _TYPE = native_bt.MESSAGE_TYPE_PACKET_BEGINNING |
81447b5b | 124 | |
81447b5b PP |
125 | @property |
126 | def packet(self): | |
fa4c33e3 | 127 | packet_ptr = native_bt.message_packet_begin_get_packet(self._ptr) |
f6a5e476 | 128 | assert(packet_ptr) |
81447b5b PP |
129 | return bt2.packet._Packet._create_from_ptr(packet_ptr) |
130 | ||
f6a5e476 PP |
131 | def __eq__(self, other): |
132 | if type(other) is not type(self): | |
133 | return False | |
134 | ||
135 | if self.addr == other.addr: | |
136 | return True | |
137 | ||
138 | return self.packet == other.packet | |
139 | ||
140 | def _copy(self, copy_func): | |
141 | # We can always use references here because those properties are | |
fa4c33e3 SM |
142 | # frozen anyway if they are part of a message. Since the |
143 | # user cannot modify them after copying the message, it's | |
f6a5e476 | 144 | # useless to copy/deep-copy them. |
fa4c33e3 | 145 | return PacketBeginningMessage(self.packet) |
f6a5e476 PP |
146 | |
147 | ||
fa4c33e3 | 148 | class PacketEndMessage(_CopyableMessage): |
5f66202c | 149 | _TYPE = native_bt.MESSAGE_TYPE_PACKET_END |
81447b5b | 150 | |
81447b5b PP |
151 | def __init__(self, packet): |
152 | utils._check_type(packet, bt2.packet._Packet) | |
fa4c33e3 | 153 | ptr = native_bt.message_packet_end_create(packet._ptr) |
81447b5b PP |
154 | |
155 | if ptr is None: | |
fa4c33e3 | 156 | raise bt2.CreationError('cannot create packet end message object') |
81447b5b PP |
157 | |
158 | super().__init__(ptr) | |
159 | ||
160 | @property | |
161 | def packet(self): | |
fa4c33e3 | 162 | packet_ptr = native_bt.message_packet_end_get_packet(self._ptr) |
f6a5e476 | 163 | assert(packet_ptr) |
81447b5b PP |
164 | return bt2.packet._Packet._create_from_ptr(packet_ptr) |
165 | ||
f6a5e476 PP |
166 | def __eq__(self, other): |
167 | if type(other) is not type(self): | |
168 | return False | |
169 | ||
170 | if self.addr == other.addr: | |
171 | return True | |
172 | ||
173 | return self.packet == other.packet | |
174 | ||
175 | def _copy(self, copy_func): | |
176 | # We can always use references here because those properties are | |
fa4c33e3 SM |
177 | # frozen anyway if they are part of a message. Since the |
178 | # user cannot modify them after copying the message, it's | |
f6a5e476 | 179 | # useless to copy/deep-copy them. |
fa4c33e3 | 180 | return PacketEndMessage(self.packet) |
f6a5e476 PP |
181 | |
182 | ||
27d97a3f | 183 | class _StreamBeginningMessage(_CopyableMessage): |
5f66202c | 184 | _TYPE = native_bt.MESSAGE_TYPE_STREAM_BEGINNING |
81447b5b | 185 | |
81447b5b PP |
186 | @property |
187 | def stream(self): | |
fa4c33e3 | 188 | stream_ptr = native_bt.message_stream_begin_get_stream(self._ptr) |
f6a5e476 | 189 | assert(stream_ptr) |
81447b5b PP |
190 | return bt2.stream._create_from_ptr(stream_ptr) |
191 | ||
f6a5e476 PP |
192 | def __eq__(self, other): |
193 | if type(other) is not type(self): | |
194 | return False | |
195 | ||
196 | if self.addr == other.addr: | |
197 | return True | |
198 | ||
199 | return self.stream == other.stream | |
200 | ||
201 | def _copy(self, copy_func): | |
202 | # We can always use references here because those properties are | |
fa4c33e3 SM |
203 | # frozen anyway if they are part of a message. Since the |
204 | # user cannot modify them after copying the message, it's | |
f6a5e476 | 205 | # useless to copy/deep-copy them. |
fa4c33e3 | 206 | return StreamBeginningMessage(self.stream) |
f6a5e476 PP |
207 | |
208 | ||
fa4c33e3 | 209 | class StreamEndMessage(_CopyableMessage): |
5f66202c | 210 | _TYPE = native_bt.MESSAGE_TYPE_STREAM_END |
81447b5b | 211 | |
f6a5e476 PP |
212 | def __init__(self, stream): |
213 | utils._check_type(stream, bt2.stream._Stream) | |
fa4c33e3 | 214 | ptr = native_bt.message_stream_end_create(stream._ptr) |
81447b5b PP |
215 | |
216 | if ptr is None: | |
fa4c33e3 | 217 | raise bt2.CreationError('cannot create stream end message object') |
81447b5b PP |
218 | |
219 | super().__init__(ptr) | |
220 | ||
221 | @property | |
f6a5e476 | 222 | def stream(self): |
fa4c33e3 | 223 | stream_ptr = native_bt.message_stream_end_get_stream(self._ptr) |
f6a5e476 PP |
224 | assert(stream_ptr) |
225 | return bt2.stream._create_from_ptr(stream_ptr) | |
226 | ||
227 | def __eq__(self, other): | |
228 | if type(other) is not type(self): | |
229 | return False | |
230 | ||
231 | if self.addr == other.addr: | |
232 | return True | |
233 | ||
234 | return self.stream == other.stream | |
235 | ||
236 | def _copy(self, copy_func): | |
237 | # We can always use references here because those properties are | |
fa4c33e3 SM |
238 | # frozen anyway if they are part of a message. Since the |
239 | # user cannot modify them after copying the message, it's | |
f6a5e476 | 240 | # useless to copy/deep-copy them. |
fa4c33e3 | 241 | return StreamEndMessage(self.stream) |
f6a5e476 PP |
242 | |
243 | ||
f192fc47 SM |
244 | class _InactivityMessageClockSnapshotsIterator(collections.abc.Iterator): |
245 | def __init__(self, msg_clock_snapshots): | |
246 | self._msg_clock_snapshots = msg_clock_snapshots | |
247 | self._clock_classes = list(msg_clock_snapshots._msg.clock_class_priority_map) | |
8ae92ae2 PP |
248 | self._at = 0 |
249 | ||
250 | def __next__(self): | |
251 | if self._at == len(self._clock_classes): | |
252 | raise StopIteration | |
253 | ||
254 | self._at += 1 | |
255 | return self._clock_classes[at] | |
256 | ||
257 | ||
f192fc47 | 258 | class _InactivityMessageClockSnapshots(collections.abc.Mapping): |
fa4c33e3 SM |
259 | def __init__(self, msg): |
260 | self._msg = msg | |
8ae92ae2 PP |
261 | |
262 | def __getitem__(self, clock_class): | |
263 | utils._check_type(clock_class, bt2.ClockClass) | |
f192fc47 | 264 | clock_snapshot_ptr = native_bt.message_inactivity_get_clock_snapshot(self._msg._ptr, |
8ae92ae2 PP |
265 | clock_class._ptr) |
266 | ||
f192fc47 | 267 | if clock_snapshot_ptr is None: |
8ae92ae2 PP |
268 | return |
269 | ||
f192fc47 SM |
270 | clock_snapshot = bt2.clock_snapshot._create_clock_snapshot_from_ptr(clock_snapshot_ptr) |
271 | return clock_snapshot | |
8ae92ae2 | 272 | |
f192fc47 SM |
273 | def add(self, clock_snapshot): |
274 | utils._check_type(clock_snapshot, bt2.clock_snapshot._ClockSnapshot) | |
275 | ret = native_bt.message_inactivity_set_clock_snapshot(self._msg._ptr, | |
276 | clock_snapshot._ptr) | |
fa4c33e3 | 277 | utils._handle_ret(ret, "cannot set inactivity message object's clock value") |
8ae92ae2 PP |
278 | |
279 | def __len__(self): | |
fa4c33e3 | 280 | return len(self._msg.clock_class_priority_map) |
8ae92ae2 PP |
281 | |
282 | def __iter__(self): | |
f192fc47 | 283 | return _InactivityMessageClockSnapshotsIterator(self) |
8ae92ae2 PP |
284 | |
285 | ||
fa4c33e3 | 286 | class InactivityMessage(_CopyableMessage): |
5f66202c | 287 | _TYPE = native_bt.MESSAGE_TYPE_MESSAGE_ITERATOR_INACTIVITY |
81447b5b | 288 | |
f6a5e476 PP |
289 | def __init__(self, cc_prio_map=None): |
290 | if cc_prio_map is not None: | |
291 | utils._check_type(cc_prio_map, bt2.clock_class_priority_map.ClockClassPriorityMap) | |
292 | cc_prio_map_ptr = cc_prio_map._ptr | |
293 | else: | |
294 | cc_prio_map_ptr = None | |
81447b5b | 295 | |
fa4c33e3 | 296 | ptr = native_bt.message_inactivity_create(cc_prio_map_ptr) |
81447b5b PP |
297 | |
298 | if ptr is None: | |
fa4c33e3 | 299 | raise bt2.CreationError('cannot create inactivity message object') |
81447b5b PP |
300 | |
301 | super().__init__(ptr) | |
302 | ||
303 | @property | |
f6a5e476 | 304 | def clock_class_priority_map(self): |
fa4c33e3 | 305 | cc_prio_map_ptr = native_bt.message_inactivity_get_clock_class_priority_map(self._ptr) |
f6a5e476 PP |
306 | assert(cc_prio_map_ptr) |
307 | return bt2.clock_class_priority_map.ClockClassPriorityMap._create_from_ptr(cc_prio_map_ptr) | |
308 | ||
8ae92ae2 | 309 | @property |
f192fc47 SM |
310 | def clock_snapshots(self): |
311 | return _InactivityMessageClockSnapshots(self) | |
f6a5e476 | 312 | |
f192fc47 SM |
313 | def _get_clock_snapshots(self): |
314 | clock_snapshots = {} | |
f6a5e476 | 315 | |
f192fc47 SM |
316 | for clock_class, clock_snapshot in self.clock_snapshots.items(): |
317 | if clock_snapshot is None: | |
f6a5e476 PP |
318 | continue |
319 | ||
f192fc47 | 320 | clock_snapshots[clock_class] = clock_snapshot |
f6a5e476 | 321 | |
f192fc47 | 322 | return clock_snapshots |
f6a5e476 PP |
323 | |
324 | def __eq__(self, other): | |
325 | if type(other) is not type(self): | |
326 | return False | |
327 | ||
328 | if self.addr == other.addr: | |
329 | return True | |
330 | ||
331 | self_props = ( | |
332 | self.clock_class_priority_map, | |
f192fc47 | 333 | self._get_clock_snapshots(), |
f6a5e476 PP |
334 | ) |
335 | other_props = ( | |
336 | other.clock_class_priority_map, | |
f192fc47 | 337 | other._get_clock_snapshots(), |
f6a5e476 PP |
338 | ) |
339 | return self_props == other_props | |
340 | ||
341 | def __copy__(self): | |
fa4c33e3 | 342 | cpy = InactivityMessage(self.clock_class_priority_map) |
f6a5e476 | 343 | |
f192fc47 SM |
344 | for clock_class, clock_snapshot in self.clock_snapshots.items(): |
345 | if clock_snapshot is None: | |
f6a5e476 PP |
346 | continue |
347 | ||
f192fc47 | 348 | cpy.clock_snapshots.add(clock_snapshot) |
f6a5e476 PP |
349 | |
350 | return cpy | |
351 | ||
352 | def __deepcopy__(self, memo): | |
353 | cc_prio_map_cpy = copy.deepcopy(self.clock_class_priority_map) | |
fa4c33e3 | 354 | cpy = InactivityMessage(cc_prio_map_cpy) |
f6a5e476 PP |
355 | |
356 | # copy clock values | |
357 | for orig_clock_class in self.clock_class_priority_map: | |
f192fc47 | 358 | orig_clock_snapshot = self.clock_snapshot(orig_clock_class) |
f6a5e476 | 359 | |
f192fc47 | 360 | if orig_clock_snapshot is None: |
f6a5e476 PP |
361 | continue |
362 | ||
363 | # find equivalent, copied clock class in CC priority map copy | |
364 | for cpy_clock_class in cc_prio_map_cpy: | |
365 | if cpy_clock_class == orig_clock_class: | |
366 | break | |
367 | ||
368 | # create copy of clock value from copied clock class | |
f192fc47 | 369 | clock_snapshot_cpy = cpy_clock_class(orig_clock_snapshot.cycles) |
f6a5e476 | 370 | |
fa4c33e3 | 371 | # set copied clock value in message copy |
f192fc47 | 372 | cpy.clock_snapshots.add(clock_snapshot_cpy) |
f6a5e476 PP |
373 | |
374 | memo[id(self)] = cpy | |
375 | return cpy | |
376 | ||
377 | ||
fa4c33e3 | 378 | class _DiscardedElementsMessage(_Message): |
f6a5e476 PP |
379 | def __eq__(self, other): |
380 | if type(other) is not type(self): | |
381 | return False | |
382 | ||
383 | if self.addr == other.addr: | |
384 | return True | |
385 | ||
386 | self_props = ( | |
387 | self.count, | |
388 | self.stream, | |
f192fc47 SM |
389 | self.beginning_clock_snapshot, |
390 | self.end_clock_snapshot, | |
f6a5e476 PP |
391 | ) |
392 | other_props = ( | |
393 | other.count, | |
394 | other.stream, | |
f192fc47 SM |
395 | other.beginning_clock_snapshot, |
396 | other.end_clock_snapshot, | |
f6a5e476 PP |
397 | ) |
398 | return self_props == other_props | |
399 | ||
400 | ||
fa4c33e3 | 401 | class _DiscardedPacketsMessage(_DiscardedElementsMessage): |
5f66202c | 402 | _TYPE = native_bt.MESSAGE_TYPE_DISCARDED_PACKETS |
f6a5e476 PP |
403 | |
404 | @property | |
405 | def count(self): | |
fa4c33e3 | 406 | count = native_bt.message_discarded_packets_get_count(self._ptr) |
f6a5e476 PP |
407 | assert(count >= 0) |
408 | return count | |
409 | ||
410 | @property | |
411 | def stream(self): | |
fa4c33e3 | 412 | stream_ptr = native_bt.message_discarded_packets_get_stream(self._ptr) |
f6a5e476 PP |
413 | assert(stream_ptr) |
414 | return bt2.stream._create_from_ptr(stream_ptr) | |
415 | ||
416 | @property | |
f192fc47 SM |
417 | def beginning_clock_snapshot(self): |
418 | clock_snapshot_ptr = native_bt.message_discarded_packets_get_begin_clock_snapshot(self._ptr) | |
f6a5e476 | 419 | |
f192fc47 | 420 | if clock_snapshot_ptr is None: |
f6a5e476 PP |
421 | return |
422 | ||
f192fc47 SM |
423 | clock_snapshot = bt2.clock_snapshot._create_clock_snapshot_from_ptr(clock_snapshot_ptr) |
424 | return clock_snapshot | |
f6a5e476 PP |
425 | |
426 | @property | |
f192fc47 SM |
427 | def end_clock_snapshot(self): |
428 | clock_snapshot_ptr = native_bt.message_discarded_packets_get_end_clock_snapshot(self._ptr) | |
f6a5e476 | 429 | |
f192fc47 | 430 | if clock_snapshot_ptr is None: |
f6a5e476 PP |
431 | return |
432 | ||
f192fc47 SM |
433 | clock_snapshot = bt2.clock_snapshot._create_clock_snapshot_from_ptr(clock_snapshot_ptr) |
434 | return clock_snapshot | |
f6a5e476 PP |
435 | |
436 | ||
fa4c33e3 | 437 | class _DiscardedEventsMessage(_DiscardedElementsMessage): |
5f66202c | 438 | _TYPE = native_bt.MESSAGE_TYPE_DISCARDED_EVENTS |
f6a5e476 PP |
439 | |
440 | @property | |
441 | def count(self): | |
fa4c33e3 | 442 | count = native_bt.message_discarded_events_get_count(self._ptr) |
f6a5e476 PP |
443 | assert(count >= 0) |
444 | return count | |
445 | ||
446 | @property | |
447 | def stream(self): | |
fa4c33e3 | 448 | stream_ptr = native_bt.message_discarded_events_get_stream(self._ptr) |
f6a5e476 PP |
449 | assert(stream_ptr) |
450 | return bt2.stream._create_from_ptr(stream_ptr) | |
451 | ||
452 | @property | |
f192fc47 SM |
453 | def beginning_clock_snapshot(self): |
454 | clock_snapshot_ptr = native_bt.message_discarded_events_get_begin_clock_snapshot(self._ptr) | |
f6a5e476 | 455 | |
f192fc47 | 456 | if clock_snapshot_ptr is None: |
f6a5e476 PP |
457 | return |
458 | ||
f192fc47 SM |
459 | clock_snapshot = bt2.clock_snapshot._create_clock_snapshot_from_ptr(clock_snapshot_ptr) |
460 | return clock_snapshot | |
f6a5e476 PP |
461 | |
462 | @property | |
f192fc47 SM |
463 | def end_clock_snapshot(self): |
464 | clock_snapshot_ptr = native_bt.message_discarded_events_get_end_clock_snapshot(self._ptr) | |
f6a5e476 | 465 | |
f192fc47 | 466 | if clock_snapshot_ptr is None: |
f6a5e476 PP |
467 | return |
468 | ||
f192fc47 SM |
469 | clock_snapshot = bt2.clock_snapshot._create_clock_snapshot_from_ptr(clock_snapshot_ptr) |
470 | return clock_snapshot | |
81447b5b PP |
471 | |
472 | ||
fa4c33e3 | 473 | _MESSAGE_TYPE_TO_CLS = { |
27d97a3f SM |
474 | native_bt.MESSAGE_TYPE_EVENT: _EventMessage, |
475 | native_bt.MESSAGE_TYPE_PACKET_BEGINNING: _PacketBeginningMessage, | |
fa4c33e3 | 476 | native_bt.MESSAGE_TYPE_PACKET_END: PacketEndMessage, |
27d97a3f | 477 | native_bt.MESSAGE_TYPE_STREAM_BEGINNING: _StreamBeginningMessage, |
fa4c33e3 SM |
478 | native_bt.MESSAGE_TYPE_STREAM_END: StreamEndMessage, |
479 | native_bt.MESSAGE_TYPE_MESSAGE_ITERATOR_INACTIVITY: InactivityMessage, | |
480 | native_bt.MESSAGE_TYPE_DISCARDED_PACKETS: _DiscardedPacketsMessage, | |
481 | native_bt.MESSAGE_TYPE_DISCARDED_EVENTS: _DiscardedEventsMessage, | |
81447b5b | 482 | } |