CircuitPython/bleio.py

changeset 7
e336d6afc5a6
parent 6
81a2208f13e4
equal deleted inserted replaced
6:81a2208f13e4 7:e336d6afc5a6
12 class Address(): 12 class Address():
13 PUBLIC = 0 13 PUBLIC = 0
14 RANDOM_STATIC = 0 14 RANDOM_STATIC = 0
15 RANDOM_PRIVATE_RESOLVABLE = 0 15 RANDOM_PRIVATE_RESOLVABLE = 0
16 RANDOM_PRIVATE_NON_RESOLVABLE = 0 16 RANDOM_PRIVATE_NON_RESOLVABLE = 0
17
18 address_bytes = 0
19 type = 0
17 20
18 def __init__(self, address, address_type): 21 def __init__(self, address, address_type):
19 pass 22 pass
20
21 @property
22 def address_bytes(self):
23 pass
24
25 @property
26 def type(self):
27 pass
28 23
29 class Adapter(): 24 class Adapter():
30 @property 25 enabled = 0
31 def enabled(self): 26 address = 0
32 pass 27 default_name = ""
33
34 @property
35 def address(self):
36 pass
37
38 @property
39 def default_name(self):
40 pass
41 28
42 class Attribute(): 29 class Attribute():
43 NO_ACCESS = 0 30 NO_ACCESS = 0
44 OPEN = 0 31 OPEN = 0
45 ENCRYPT_NO_MITM = 0 32 ENCRYPT_NO_MITM = 0
47 LESC_ENCRYPT_WITH_MITM = 0 34 LESC_ENCRYPT_WITH_MITM = 0
48 SIGNED_NO_MITM = 0 35 SIGNED_NO_MITM = 0
49 SIGNED_WITH_MITM = 0 36 SIGNED_WITH_MITM = 0
50 37
51 class Central(): 38 class Central():
39 connected = 0
40
52 def __init__(self): 41 def __init__(self):
53 pass 42 pass
54 43
55 def connect(self, address, timeout, *, service_uuids_whitelist=None): 44 def connect(self, address, timeout, *, service_uuids_whitelist=None):
56 pass 45 pass
58 def disconnect(self): 47 def disconnect(self):
59 pass 48 pass
60 49
61 def discover_remote_services(self, service_uuids_whitelist=None): 50 def discover_remote_services(self, service_uuids_whitelist=None):
62 pass 51 pass
63
64 @property
65 def connected(self):
66 pass
67 52
68 class Characteristic(): 53 class Characteristic():
69 BROADCAST = 0 54 BROADCAST = 0
70 INDICATE = 0 55 INDICATE = 0
71 NOTIFY = 0 56 NOTIFY = 0
72 READ = 0 57 READ = 0
73 WRITE = 0 58 WRITE = 0
74 WRITE_NO_RESPONSE = 0 59 WRITE_NO_RESPONSE = 0
60
61 properties = 0
62 uuid = 0
63 value = 0
64 descriptors = 0
75 65
76 def __init__(self, uuid, *, properties=0, read_perm=Attribute.OPEN, 66 def __init__(self, uuid, *, properties=0, read_perm=Attribute.OPEN,
77 write_perm=Attribute.OPEN, max_length=20, 67 write_perm=Attribute.OPEN, max_length=20,
78 fixed_length=False, descriptors=None): 68 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 69 pass
96 70
97 def service(self, read_only): 71 def service(self, read_only):
98 pass 72 pass
99 73
100 def set_cccd(self, *, notify=False, indicate=False): 74 def set_cccd(self, *, notify=False, indicate=False):
101 pass 75 pass
102 76
103 class CharacteristicBuffer(): 77 class CharacteristicBuffer():
78 in_waiting = 0
79
104 def __init__(self, characteristic, *, timeout=1, buffer_size=64): 80 def __init__(self, characteristic, *, timeout=1, buffer_size=64):
105 pass 81 pass
106 82
107 def read(self, nbytes=None): 83 def read(self, nbytes=None):
108 pass 84 pass
111 pass 87 pass
112 88
113 def readline(self): 89 def readline(self):
114 pass 90 pass
115 91
116 @property
117 def in_waiting(self):
118 pass
119
120 def reset_input_buffer(self): 92 def reset_input_buffer(self):
121 pass 93 pass
122 94
123 def deinit(self): 95 def deinit(self):
124 pass 96 pass
125 97
126 class Descriptor(): 98 class Descriptor():
99 uuid = 0
100 value = 0
101
127 def __init__(self, uuid, *, read_perm=Attribute.OPEN, 102 def __init__(self, uuid, *, read_perm=Attribute.OPEN,
128 write_perm=Attribute.OPEN): 103 write_perm=Attribute.OPEN):
129 pass 104 pass
130 105
131 def characteristic(self, read_only): 106 def characteristic(self, read_only):
132 pass 107 pass
133
134 @property
135 def uuid(self):
136 pass
137
138 @property
139 def value(self):
140 pass
141 108
142 class Peripheral(): 109 class Peripheral():
110 services = 0
111 name = ""
112
143 def __init__(self, services=(), *, name=None): 113 def __init__(self, services=(), *, name=None):
144 pass 114 pass
145 115
146 def connected(self, read_only): 116 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 117 pass
156 118
157 def start_advertising(self, data, *, scan_response=None, connectable=True, 119 def start_advertising(self, data, *, scan_response=None, connectable=True,
158 interval=1): 120 interval=1):
159 pass 121 pass
169 131
170 def pair(self): 132 def pair(self):
171 pass 133 pass
172 134
173 class ScanEntry(): 135 class ScanEntry():
174 @property 136 address = 0
175 def address(self): 137 advertisement_bytes = 0
176 pass 138 rssi = 0
177
178 @property
179 def advertisement_bytes(self):
180 pass
181
182 @property
183 def rssi(self):
184 pass
185 139
186 class Scanner(): 140 class Scanner():
187 def __init__(self): 141 def __init__(self):
188 pass 142 pass
189 143
190 def scan(self, timeout, *, interval=0.1, window=0.1): 144 def scan(self, timeout, *, interval=0.1, window=0.1):
191 pass 145 pass
192 146
193 class Service(): 147 class Service():
148 remotes = 0
149 secondary = 0
150 uuids = 0
151
194 def __init__(self, uuid, characteristics, *, secondary=False): 152 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 153 pass
208 154
209 class UUID(): 155 class UUID():
156 uuid16 = 0
157 uuid128 = 0
158 size = 0
159
210 def __init__(self, value): 160 def __init__(self, value):
211 pass 161 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