CircuitPython/bleio.py

changeset 6
81a2208f13e4
child 7
e336d6afc5a6
equal deleted inserted replaced
5:f88ec514175f 6:81a2208f13e4
1 # -*- coding: utf-8 -*-
2
3 # Copyright (c) 2019 Detlev Offenbach <detlev@die-offenbachs.de>
4 #
5
6 """
7 Module containing stubs for API generation of the 'bleio' module.
8 """
9
10 adapter = object
11
12 class Address():
13 PUBLIC = 0
14 RANDOM_STATIC = 0
15 RANDOM_PRIVATE_RESOLVABLE = 0
16 RANDOM_PRIVATE_NON_RESOLVABLE = 0
17
18 def __init__(self, address, address_type):
19 pass
20
21 @property
22 def address_bytes(self):
23 pass
24
25 @property
26 def type(self):
27 pass
28
29 class Adapter():
30 @property
31 def enabled(self):
32 pass
33
34 @property
35 def address(self):
36 pass
37
38 @property
39 def default_name(self):
40 pass
41
42 class Attribute():
43 NO_ACCESS = 0
44 OPEN = 0
45 ENCRYPT_NO_MITM = 0
46 ENCRYPT_WITH_MITM = 0
47 LESC_ENCRYPT_WITH_MITM = 0
48 SIGNED_NO_MITM = 0
49 SIGNED_WITH_MITM = 0
50
51 class Central():
52 def __init__(self):
53 pass
54
55 def connect(self, address, timeout, *, service_uuids_whitelist=None):
56 pass
57
58 def disconnect(self):
59 pass
60
61 def discover_remote_services(self, service_uuids_whitelist=None):
62 pass
63
64 @property
65 def connected(self):
66 pass
67
68 class Characteristic():
69 BROADCAST = 0
70 INDICATE = 0
71 NOTIFY = 0
72 READ = 0
73 WRITE = 0
74 WRITE_NO_RESPONSE = 0
75
76 def __init__(self, uuid, *, properties=0, read_perm=Attribute.OPEN,
77 write_perm=Attribute.OPEN, max_length=20,
78 fixed_length=False, descriptors=None):
79 pass
80
81 @property
82 def properties(self):
83 pass
84
85 @property
86 def uuid(self):
87 pass
88
89 @property
90 def value(self):
91 pass
92
93 @property
94 def descriptors(self):
95 pass
96
97 def service(self, read_only):
98 pass
99
100 def set_cccd(self, *, notify=False, indicate=False):
101 pass
102
103 class CharacteristicBuffer():
104 def __init__(self, characteristic, *, timeout=1, buffer_size=64):
105 pass
106
107 def read(self, nbytes=None):
108 pass
109
110 def readinto(self, buf):
111 pass
112
113 def readline(self):
114 pass
115
116 @property
117 def in_waiting(self):
118 pass
119
120 def reset_input_buffer(self):
121 pass
122
123 def deinit(self):
124 pass
125
126 class Descriptor():
127 def __init__(self, uuid, *, read_perm=Attribute.OPEN,
128 write_perm=Attribute.OPEN):
129 pass
130
131 def characteristic(self, read_only):
132 pass
133
134 @property
135 def uuid(self):
136 pass
137
138 @property
139 def value(self):
140 pass
141
142 class Peripheral():
143 def __init__(self, services=(), *, name=None):
144 pass
145
146 def connected(self, read_only):
147 pass
148
149 @property
150 def services(self):
151 pass
152
153 @property
154 def name(self):
155 pass
156
157 def start_advertising(self, data, *, scan_response=None, connectable=True,
158 interval=1):
159 pass
160
161 def stop_advertising(self):
162 pass
163
164 def disconnect(self):
165 pass
166
167 def discover_remote_services(self, service_uuids_whitelist=None):
168 pass
169
170 def pair(self):
171 pass
172
173 class ScanEntry():
174 @property
175 def address(self):
176 pass
177
178 @property
179 def advertisement_bytes(self):
180 pass
181
182 @property
183 def rssi(self):
184 pass
185
186 class Scanner():
187 def __init__(self):
188 pass
189
190 def scan(self, timeout, *, interval=0.1, window=0.1):
191 pass
192
193 class Service():
194 def __init__(self, uuid, characteristics, *, secondary=False):
195 pass
196
197 @property
198 def remotes(self):
199 pass
200
201 @property
202 def secondarys(self):
203 pass
204
205 @property
206 def uuids(self):
207 pass
208
209 class UUID():
210 def __init__(self, value):
211 pass
212
213 @property
214 def uuid16(self):
215 pass
216
217 @property
218 def uuid128(self):
219 pass
220
221 @property
222 def size(self):
223 pass

eric ide

mercurial