File tree Expand file tree Collapse file tree 2 files changed +29
-1
lines changed
Expand file tree Collapse file tree 2 files changed +29
-1
lines changed Original file line number Diff line number Diff line change @@ -2979,6 +2979,20 @@ stagecode = 1, subcode = 0
29792979stagecode = 1 , subcode = 2
29802980```
29812981
2982+ * Note
2983+
2984+ If the user is using firmware released after November 2021 , the user can use the wait_network_connected(timeout) method as follows:
2985+
2986+ ```python
2987+ import checkNet
2988+
2989+ if __name__ == ' __main__' :
2990+ # Add the following sentence before running the program.
2991+ stagecode, subcode = checkNet.wait_network_connected(30 )
2992+ print (' stagecode = {} , subcode = {} ' .format(stagecode, subcode))
2993+ ......
2994+ ```
2995+
29822996
29832997
29842998# #### checkNet Exception Handling
Original file line number Diff line number Diff line change @@ -2914,7 +2914,7 @@ sms.setCallback(cb)
29142914
29152915模块功能:checkNet模块主要用于【开机自动运行】的用户脚本程序,该模块提供API 用来阻塞等待网络就绪,如果超时或者其他异常退出会返回错误码,所以如果用户的程序中有涉及网络相关的操作,那么在用户程序的开始应该调用 checkNet 模块中的方法以等待网络就绪。当然,用户也可以自己实现这个模块的功能。
29162916
2917- 注意:当前仅EC600S / EC600N / EC800N / EC200U / EC600U / BC25PA 平台支持该功能 。
2917+ 注意:当前仅EC600S / EC600N / EC800N / EC200U / EC600U / BC25PA / 平台支持该功能 。
29182918
29192919# #### 创建checkNet对象
29202920
@@ -3049,6 +3049,20 @@ stagecode = 1, subcode = 0
30493049stagecode = 1 , subcode = 2
30503050```
30513051
3052+ * 说明
3053+
3054+ 如果是2021 年11 月以后发布的版本,用户可不用实例化对象,即可直接使用wait_network_connected(timeout)方法,用法如下:
3055+
3056+ ```python
3057+ import checkNet
3058+
3059+ if __name__ == ' __main__' :
3060+ # 在用户程序运行前增加下面这一句
3061+ stagecode, subcode = checkNet.wait_network_connected(30 )
3062+ print (' stagecode = {} , subcode = {} ' .format(stagecode, subcode))
3063+ ......
3064+ ```
3065+
30523066
30533067
30543068# #### checkNet 异常返回处理
You can’t perform that action at this time.
0 commit comments