Пример #1
0
    def id(self):
        id = native_bt.stream_class_get_id(self._ptr)

        if id < 0:
            return

        return id
Пример #2
0
    def __iter__(self):
        for idx in range(len(self)):
            sc_ptr = self._borrow_stream_class_ptr_by_index(self._ptr, idx)
            assert sc_ptr is not None

            id = native_bt.stream_class_get_id(sc_ptr)
            assert id >= 0

            yield id
Пример #3
0
    def __next__(self):
        if self._at == len(self._trace):
            raise StopIteration

        sc_ptr = native_bt.trace_get_stream_class_by_index(self._trace._ptr,
                                                           self._at)
        assert(sc_ptr)
        id = native_bt.stream_class_get_id(sc_ptr)
        native_bt.put(sc_ptr)
        assert(id >= 0)
        self._at += 1
        return id
Пример #4
0
    def __next__(self):
        if self._at == len(self._trace_class):
            raise StopIteration

        borrow_stream_class_fn = (
            native_bt.trace_class_borrow_stream_class_by_index_const)
        sc_ptr = borrow_stream_class_fn(self._trace_class._ptr, self._at)
        assert sc_ptr
        id = native_bt.stream_class_get_id(sc_ptr)
        assert id >= 0
        self._at += 1
        return id
Пример #5
0
    def __next__(self):
        if self._at == len(self._trace):
            raise StopIteration

        sc_ptr = native_bt.trace_get_stream_class_by_index(self._trace._ptr,
                                                           self._at)
        assert(sc_ptr)
        id = native_bt.stream_class_get_id(sc_ptr)
        native_bt.put(sc_ptr)
        assert(id >= 0)
        self._at += 1
        return id