Exemplo n.º 1
0
    def _bt_port_connected_from_native(self, self_port_ptr, self_port_type,
                                       other_port_ptr):
        port = bt2_port._create_self_from_ptr_and_get_ref(
            self_port_ptr, self_port_type)

        if self_port_type == native_bt.PORT_TYPE_OUTPUT:
            other_port_type = native_bt.PORT_TYPE_INPUT
        else:
            other_port_type = native_bt.PORT_TYPE_OUTPUT

        other_port = bt2_port._create_from_const_ptr_and_get_ref(
            other_port_ptr, other_port_type)
        self._user_port_connected(port, other_port)
Exemplo n.º 2
0
 def _bt_init_from_native(self, config_ptr, self_output_port_ptr):
     self_output_port = bt2_port._create_self_from_ptr_and_get_ref(
         self_output_port_ptr, native_bt.PORT_TYPE_OUTPUT)
     config = _MessageIteratorConfiguration(config_ptr)
     self.__init__(config, self_output_port)
Exemplo n.º 3
0
 def _port(self):
     port_ptr = native_bt.self_message_iterator_borrow_port(self._bt_ptr)
     assert port_ptr is not None
     return bt2_port._create_self_from_ptr_and_get_ref(
         port_ptr, native_bt.PORT_TYPE_OUTPUT)
Exemplo n.º 4
0
 def _bt_init_from_native(self, self_output_port_ptr):
     self_output_port = bt2_port._create_self_from_ptr_and_get_ref(
         self_output_port_ptr, native_bt.PORT_TYPE_OUTPUT)
     self.__init__(self_output_port)