Lines Matching refs:self

33     def __init__(self, device, psm, l2cap_stream):  argument
34 self._device = device
35 self._psm = psm
36 self._le_l2cap_stream = l2cap_stream
37 self._our_le_l2cap_view = FilteringEventStream(self._le_l2cap_stream,
38 … L2capMatchers.PacketPayloadWithMatchingPsm(self._psm))
40 def get_event_queue(self): argument
41 return self._our_le_l2cap_view.get_event_queue()
43 def send(self, payload): argument
44 self._device.l2cap.SendDynamicChannelPacket(
45 l2cap_facade_pb2.DynamicChannelPacket(psm=self._psm, payload=payload))
47 def close_channel(self): argument
48 self._device.l2cap.CloseChannel(l2cap_facade_pb2.CloseChannelRequest(psm=self._psm))
50 def set_traffic_paused(self, paused): argument
51self._device.l2cap.SetTrafficPaused(l2cap_facade_pb2.SetTrafficPausedRequest(psm=self._psm, paused…
60 def __init__(self, grpc_response_future, device, psm, l2cap_stream): argument
61 self._grpc_response_future = grpc_response_future
62 self._device = device
63 self._psm = psm
64 self._l2cap_stream = l2cap_stream
66 def get_channel(self): argument
67 return PyL2capChannel(self._device, self._psm, self._l2cap_stream)
72 def __init__(self, device, cert_address): argument
73 self._device = device
74 self._cert_address = cert_address
75 self._l2cap_stream = EventStream(self._device.l2cap.FetchL2capData(empty_proto.Empty()))
77 def close(self): argument
78 safeClose(self._l2cap_stream)
80 …def register_dynamic_channel(self, psm=0x33, mode=l2cap_facade_pb2.RetransmissionFlowControlMode.B… argument
81 self._device.l2cap.SetDynamicChannel(
83 return PyL2capChannel(self._device, psm, self._l2cap_stream)
85 …def connect_dynamic_channel_to_cert(self, psm=0x33, mode=l2cap_facade_pb2.RetransmissionFlowContro… argument
90 self.register_dynamic_channel(psm, mode)
91 response_future = self._device.l2cap.OpenChannel.future(
92 l2cap_facade_pb2.OpenChannelRequest(psm=psm, remote=self._cert_address, mode=mode))
94 …return _ClassicConnectionResponseFutureWrapper(response_future, self._device, psm, self._l2cap_str…
96 def get_channel_queue_buffer_size(self): argument
97 return self._device.l2cap.GetChannelQueueDepth(empty_proto.Empty()).size
102 def __init__(self, device, cid, l2cap_stream): argument
103 self._device = device
104 self._cid = cid
105 self._le_l2cap_stream = l2cap_stream
106 self._our_le_l2cap_view = FilteringEventStream(self._le_l2cap_stream,
107 … L2capMatchers.PacketPayloadWithMatchingCid(self._cid))
109 def get_event_queue(self): argument
110 return self._our_le_l2cap_view.get_event_queue()
112 def send(self, payload): argument
113 self._device.l2cap_le.SendFixedChannelPacket(
114 l2cap_le_facade_pb2.FixedChannelPacket(cid=self._cid, payload=payload))
116 def close_channel(self): argument
117 self._device.l2cap_le.SetFixedChannel(
118 l2cap_le_facade_pb2.SetEnableFixedChannelRequest(cid=self._cid, enable=False))
123 def __init__(self, device, cert_address, psm, l2cap_stream): argument
124 self._device = device
125 self._cert_address = cert_address
126 self._psm = psm
127 self._le_l2cap_stream = l2cap_stream
128 self._our_le_l2cap_view = FilteringEventStream(self._le_l2cap_stream,
129 … L2capMatchers.PacketPayloadWithMatchingPsm(self._psm))
131 def get_event_queue(self): argument
132 return self._our_le_l2cap_view.get_event_queue()
134 def send(self, payload): argument
135 self._device.l2cap_le.SendDynamicChannelPacket(
136 l2cap_le_facade_pb2.DynamicChannelPacket(psm=self._psm, payload=payload))
138 def close_channel(self): argument
139 self._device.l2cap_le.CloseDynamicChannel(
140 … l2cap_le_facade_pb2.CloseDynamicChannelRequest(remote=self._cert_address, psm=self._psm))
149 def __init__(self, grpc_response_future, device, cert_address, psm, le_l2cap_stream): argument
150 self._grpc_response_future = grpc_response_future
151 self._device = device
152 self._cert_address = cert_address
153 self._psm = psm
154 self._le_l2cap_stream = le_l2cap_stream
156 def get_status(self): argument
157 …return l2cap_packets.LeCreditBasedConnectionResponseResult(self._grpc_response_future.result().sta…
159 def get_channel(self): argument
160 …assertThat(self.get_status()).isEqualTo(l2cap_packets.LeCreditBasedConnectionResponseResult.SUCCES…
161 … return PyLeL2capDynamicChannel(self._device, self._cert_address, self._psm, self._le_l2cap_stream)
166 def __init__(self, device): argument
167 self._device = device
168self._le_l2cap_stream = EventStream(self._device.l2cap_le.FetchL2capData(empty_proto.Empty()))
170 def close(self): argument
171 safeClose(self._le_l2cap_stream)
173 def enable_fixed_channel(self, cid=4): argument
174self._device.l2cap_le.SetFixedChannel(l2cap_le_facade_pb2.SetEnableFixedChannelRequest(cid=cid, en…
176 def get_fixed_channel(self, cid=4): argument
177 return PyLeL2capFixedChannel(self._device, cid, self._le_l2cap_stream)
179 def register_coc(self, cert_address, psm=0x33, security_level=SecurityLevel.NO_SECURITY): argument
180 self._device.l2cap_le.SetDynamicChannel(
182 return PyLeL2capDynamicChannel(self._device, cert_address, psm, self._le_l2cap_stream)
184 def connect_coc_to_cert(self, cert_address, psm=0x33): argument
188 self.register_coc(cert_address, psm)
189 response_future = self._device.l2cap_le.OpenDynamicChannel.future(
192 …return _CreditBasedConnectionResponseFutureWrapper(response_future, self._device, cert_address, ps…
193 self._le_l2cap_stream)
195 def update_connection_parameter(self, argument
202 self._device.l2cap_le.SendConnectionParameterUpdate(