|
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 def 'network' module. |
|
8 """ |
|
9 |
|
10 class AbstractNIC(): |
|
11 def __init__(self, id=None): |
|
12 pass |
|
13 |
|
14 def active(self, is_active=None): |
|
15 pass |
|
16 |
|
17 def connect(self, service_id=None, key=None, *args): |
|
18 pass |
|
19 |
|
20 def disconnect(self): |
|
21 pass |
|
22 |
|
23 def isconnected(self): |
|
24 pass |
|
25 |
|
26 def scan(self, *args): |
|
27 pass |
|
28 |
|
29 def status(self, param=None): |
|
30 pass |
|
31 |
|
32 def ifconfig(self, params=tuple()): |
|
33 pass |
|
34 |
|
35 def config(self, param): |
|
36 pass |
|
37 |
|
38 def config(self, **params): |
|
39 pass |
|
40 |
|
41 STA_IF = 0 |
|
42 AP_IF = 1 |
|
43 |
|
44 AUTH_OPEN = 0 |
|
45 AUTH_WEP = 1 |
|
46 AUTH_WPA2_PSK = 3 |
|
47 AUTH_WPA_PSK = 2 |
|
48 AUTH_WPA_WPA2_PSK = 4 |
|
49 |
|
50 STAT_IDLE = 0 |
|
51 STAT_CONNECTING = 0 |
|
52 STAT_WRONG_PASSWORD = 0 |
|
53 STAT_NO_AP_FOUND = 0 |
|
54 STAT_CONNECT_FAIL = 0 |
|
55 STAT_GOT_IP = 0 |
|
56 |
|
57 class WLAN(): |
|
58 def __init__(self, interface_id): |
|
59 pass |
|
60 |
|
61 def active(self, is_active=None): |
|
62 pass |
|
63 |
|
64 def connect(self, ssid=None, password=None, *, bssid=None): |
|
65 pass |
|
66 |
|
67 def disconnect(self): |
|
68 pass |
|
69 |
|
70 def scan(self): |
|
71 pass |
|
72 |
|
73 def status(self, param=None): |
|
74 pass |
|
75 |
|
76 def isconnected(self): |
|
77 pass |
|
78 |
|
79 def ifconfig(self, params=tuple()): |
|
80 pass |
|
81 |
|
82 def config(self, param): |
|
83 pass |
|
84 |
|
85 def config(self, **params): |
|
86 pass |
|
87 |
|
88 class WLANWiPy(): |
|
89 STA = 0 |
|
90 AP = 0 |
|
91 WEP = 0 |
|
92 WPA = 0 |
|
93 WPA2 = 0 |
|
94 INT_ANT = 0 |
|
95 EXT_ANT = 0 |
|
96 |
|
97 def __init__(self, id=0, **args): |
|
98 pass |
|
99 |
|
100 def init(self, mode, *, ssid, auth, channel, antenna): |
|
101 pass |
|
102 |
|
103 def connect(self, ssid, *, auth=None, bssid=None, timeout=None): |
|
104 pass |
|
105 |
|
106 def scan(): |
|
107 pass |
|
108 |
|
109 def disconnect(): |
|
110 pass |
|
111 |
|
112 def isconnected(): |
|
113 pass |
|
114 |
|
115 def ifconfig(self, if_id=0, config=tuple()): |
|
116 pass |
|
117 |
|
118 def ifconfig(self, if_id=0, config="dhcp"): |
|
119 pass |
|
120 |
|
121 def mode(self, mode=None): |
|
122 pass |
|
123 |
|
124 def ssid(self, ssid=None): |
|
125 pass |
|
126 |
|
127 def auth(self, auth=None): |
|
128 pass |
|
129 |
|
130 def channel(self, channel=None): |
|
131 pass |
|
132 |
|
133 def antenna(self, antenna=None): |
|
134 pass |
|
135 |
|
136 def mac(self, mac_addr=None): |
|
137 pass |
|
138 |
|
139 def irq(self, *, handler, wake): |
|
140 pass |
|
141 |
|
142 class CC3K(): |
|
143 WEP = 0 |
|
144 WPA = 0 |
|
145 WPA2 = 0 |
|
146 |
|
147 def __init__(self, spi, pin_cs, pin_en, pin_irq): |
|
148 pass |
|
149 |
|
150 def connect(self, ssid, key=None, *, security=WPA2, bssid=None): |
|
151 pass |
|
152 |
|
153 def disconnect(self): |
|
154 pass |
|
155 |
|
156 def isconnected(self): |
|
157 pass |
|
158 |
|
159 def ifconfig(self): |
|
160 pass |
|
161 |
|
162 def patch_version(self): |
|
163 pass |
|
164 |
|
165 def patch_program(self, pgm): |
|
166 pass |
|
167 |
|
168 class WIZNET5K(): |
|
169 def __init__(self, spi, pin_cs, pin_rst): |
|
170 pass |
|
171 |
|
172 def isconnected(self): |
|
173 pass |
|
174 |
|
175 def ifconfig(self, params=tuple()): |
|
176 pass |
|
177 |
|
178 def regs(self): |
|
179 pass |
|
180 |
|
181 def phy_mode(mode=None): |
|
182 pass |
|
183 |
|
184 MODE_11B = 0 |
|
185 MODE_11G = 0 |
|
186 MODE_11N = 0 |