LeOtaParameters.java
1.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
/*
* Copyright (C) 2015 The Telink Bluetooth Light Project
*
*/
package com.telink.bluetooth.light;
/**
* OTA参数
*
* @see LightService#startOta(Parameters)
*/
public final class LeOtaParameters extends Parameters {
/**
* 创建{@link LeOtaParameters}实例
*
* @return
*/
public static LeOtaParameters create() {
return new LeOtaParameters();
}
/**
* 网络名
*
* @param value
* @return
*/
public LeOtaParameters setMeshName(String value) {
this.set(PARAM_MESH_NAME, value);
return this;
}
/**
* 密码
*
* @param value
* @return
*/
public LeOtaParameters setPassword(String value) {
this.set(PARAM_MESH_PASSWORD, value);
return this;
}
/**
* 扫描超时时间,单位秒
*
* @param value
* @return
*/
public LeOtaParameters setLeScanTimeoutSeconds(int value) {
this.set(PARAM_SCAN_TIMEOUT_SECONDS, value);
return this;
}
/**
* 要进行OTA的设备
*
* @param value
* @return
* @see OtaDeviceInfo
*/
public LeOtaParameters setDeviceInfo(OtaDeviceInfo value) {
this.set(PARAM_DEVICE_LIST, value);
return this;
}
}