Exemplo n.º 1
0
    def id(self):
        id = native_bt.ctf_event_class_get_id(self._ptr)

        if utils._is_m1ull(id):
            raise bt2.Error("cannot get event class object's ID")

        return id
Exemplo n.º 2
0
    def frequency(self):
        frequency = native_bt.ctf_clock_class_get_frequency(self._ptr)

        if utils._is_m1ull(frequency):
            raise bt2.Error("cannot get clock class object's frequency")

        return frequency
Exemplo n.º 3
0
    def precision(self):
        precision = native_bt.ctf_clock_class_get_precision(self._ptr)

        if utils._is_m1ull(precision):
            raise bt2.Error("cannot get clock class object's precision")

        return precision
Exemplo n.º 4
0
    def id(self):
        id = native_bt.ctf_event_class_get_id(self._ptr)

        if utils._is_m1ull(id):
            raise bt2.Error("cannot get event class object's ID")

        return id
Exemplo n.º 5
0
    def precision(self):
        precision = native_bt.ctf_clock_get_precision(self._ptr)

        if utils._is_m1ull(precision):
            raise bt2.Error("cannot get CTF writer clock object's precision")

        return precision
Exemplo n.º 6
0
    def frequency(self):
        frequency = native_bt.ctf_clock_get_frequency(self._ptr)

        if utils._is_m1ull(frequency):
            raise bt2.Error("cannot get CTF writer clock object's frequency")

        return frequency
Exemplo n.º 7
0
    def __next__(self):
        if self._at == len(self._trace):
            raise StopIteration

        sc_ptr = native_bt.ctf_trace_get_stream_class(self._trace._ptr,
                                                      self._at)
        utils._handle_ptr(sc_ptr, "cannot get trace class object's stream class object")
        id = native_bt.ctf_stream_class_get_id(sc_ptr)
        native_bt.put(sc_ptr)

        if utils._is_m1ull(id):
            raise bt2.Error("cannot get stream class object's ID")

        self._at += 1
        return id
Exemplo n.º 8
0
    def __next__(self):
        if self._at == len(self._trace):
            raise StopIteration

        sc_ptr = native_bt.ctf_trace_get_stream_class(self._trace._ptr,
                                                      self._at)
        utils._handle_ptr(
            sc_ptr, "cannot get trace class object's stream class object")
        id = native_bt.ctf_stream_class_get_id(sc_ptr)
        native_bt.put(sc_ptr)

        if utils._is_m1ull(id):
            raise bt2.Error("cannot get stream class object's ID")

        self._at += 1
        return id