return field
-class ByteOrder:
- NATIVE = native_bt.BYTE_ORDER_NATIVE
- LITTLE_ENDIAN = native_bt.BYTE_ORDER_LITTLE_ENDIAN
- BIG_ENDIAN = native_bt.BYTE_ORDER_BIG_ENDIAN
- NETWORK = native_bt.BYTE_ORDER_NETWORK
-
-
-class Encoding:
- NONE = native_bt.STRING_ENCODING_NONE
- UTF8 = native_bt.STRING_ENCODING_UTF8
- ASCII = native_bt.STRING_ENCODING_ASCII
-
-
-class Base:
- BINARY = native_bt.INTEGER_BASE_BINARY
- OCTAL = native_bt.INTEGER_BASE_OCTAL
- DECIMAL = native_bt.INTEGER_BASE_DECIMAL
- HEXADECIMAL = native_bt.INTEGER_BASE_HEXADECIMAL
-
-
class _AlignmentProp:
@property
def alignment(self):
_TYPE_ID_TO_OBJ = {
- native_bt.FIELD_TYPE_ID_INTEGER: IntegerFieldType,
- native_bt.FIELD_TYPE_ID_FLOAT: FloatingPointNumberFieldType,
- native_bt.FIELD_TYPE_ID_ENUM: EnumerationFieldType,
- native_bt.FIELD_TYPE_ID_STRING: StringFieldType,
- native_bt.FIELD_TYPE_ID_STRUCT: StructureFieldType,
- native_bt.FIELD_TYPE_ID_ARRAY: ArrayFieldType,
- native_bt.FIELD_TYPE_ID_SEQUENCE: SequenceFieldType,
- native_bt.FIELD_TYPE_ID_VARIANT: VariantFieldType,
}
class EventNotification(_CopyableNotification):
- _TYPE = native_bt.NOTIFICATION_TYPE_EVENT
+ _TYPE = native_bt.MESSAGE_TYPE_EVENT
def __init__(self, event, cc_prio_map=None):
utils._check_type(event, bt2.event._Event)
class PacketBeginningNotification(_CopyableNotification):
- _TYPE = native_bt.NOTIFICATION_TYPE_PACKET_BEGIN
+ _TYPE = native_bt.MESSAGE_TYPE_PACKET_BEGINNING
def __init__(self, packet):
utils._check_type(packet, bt2.packet._Packet)
class PacketEndNotification(_CopyableNotification):
- _TYPE = native_bt.NOTIFICATION_TYPE_PACKET_END
+ _TYPE = native_bt.MESSAGE_TYPE_PACKET_END
def __init__(self, packet):
utils._check_type(packet, bt2.packet._Packet)
class StreamBeginningNotification(_CopyableNotification):
- _TYPE = native_bt.NOTIFICATION_TYPE_STREAM_BEGIN
+ _TYPE = native_bt.MESSAGE_TYPE_STREAM_BEGINNING
def __init__(self, stream):
utils._check_type(stream, bt2.stream._Stream)
class StreamEndNotification(_CopyableNotification):
- _TYPE = native_bt.NOTIFICATION_TYPE_STREAM_END
+ _TYPE = native_bt.MESSAGE_TYPE_STREAM_END
def __init__(self, stream):
utils._check_type(stream, bt2.stream._Stream)
class InactivityNotification(_CopyableNotification):
- _TYPE = native_bt.NOTIFICATION_TYPE_INACTIVITY
+ _TYPE = native_bt.MESSAGE_TYPE_MESSAGE_ITERATOR_INACTIVITY
def __init__(self, cc_prio_map=None):
if cc_prio_map is not None:
class _DiscardedPacketsNotification(_DiscardedElementsNotification):
- _TYPE = native_bt.NOTIFICATION_TYPE_DISCARDED_PACKETS
+ _TYPE = native_bt.MESSAGE_TYPE_DISCARDED_PACKETS
@property
def count(self):
class _DiscardedEventsNotification(_DiscardedElementsNotification):
- _TYPE = native_bt.NOTIFICATION_TYPE_DISCARDED_EVENTS
+ _TYPE = native_bt.MESSAGE_TYPE_DISCARDED_EVENTS
@property
def count(self):
_NOTIF_TYPE_TO_CLS = {
- native_bt.NOTIFICATION_TYPE_EVENT: EventNotification,
- native_bt.NOTIFICATION_TYPE_PACKET_BEGIN: PacketBeginningNotification,
- native_bt.NOTIFICATION_TYPE_PACKET_END: PacketEndNotification,
- native_bt.NOTIFICATION_TYPE_STREAM_BEGIN: StreamBeginningNotification,
- native_bt.NOTIFICATION_TYPE_STREAM_END: StreamEndNotification,
- native_bt.NOTIFICATION_TYPE_INACTIVITY: InactivityNotification,
- native_bt.NOTIFICATION_TYPE_DISCARDED_PACKETS: _DiscardedPacketsNotification,
- native_bt.NOTIFICATION_TYPE_DISCARDED_EVENTS: _DiscardedEventsNotification,
+ native_bt.MESSAGE_TYPE_EVENT: EventNotification,
+ native_bt.MESSAGE_TYPE_PACKET_BEGINNING: PacketBeginningNotification,
+ native_bt.MESSAGE_TYPE_PACKET_END: PacketEndNotification,
+ native_bt.MESSAGE_TYPE_STREAM_BEGINNING: StreamBeginningNotification,
+ native_bt.MESSAGE_TYPE_STREAM_END: StreamEndNotification,
+ native_bt.MESSAGE_TYPE_MESSAGE_ITERATOR_INACTIVITY: InactivityNotification,
+ native_bt.MESSAGE_TYPE_DISCARDED_PACKETS: _DiscardedPacketsNotification,
+ native_bt.MESSAGE_TYPE_DISCARDED_EVENTS: _DiscardedEventsNotification,
}