连接指定经典蓝牙
命名空间:
Smobiler.Plugins
程序集:
Smobiler.Plugins (在 Smobiler.Plugins.dll 中) 版本:6.0.651.17422+acac930a389332bc36ed645b22d5419d24641df7
语法public void Connect(
string macAddress,
ComponentOnResultHandler handler = null,
string uuid = null,
bool receiveSleep = false,
int sleepTime = 100
)
Public Sub Connect (
macAddress As String,
Optional handler As ComponentOnResultHandler = Nothing,
Optional uuid As String = Nothing,
Optional receiveSleep As Boolean = false,
Optional sleepTime As Integer = 100
)
参数
- macAddress
- 类型:SystemString
连接蓝牙的mac地址 - handler (Optional)
- 类型:Smobiler.Core.ControlsComponentOnResultHandler
连接指定蓝牙后触发 - uuid (Optional)
- 类型:SystemString
连接时对应的uuid 默认"00001101-0000-1000-8000-00805F9B34FB" - receiveSleep (Optional)
- 类型:SystemBoolean
是否在蓝牙接收到数据时延时一段时间接收数据,防止数据大时一次性接收不完整, 默认:false - sleepTime (Optional)
- 类型:SystemInt32
receiveSleep=true时有效,延迟接收的时间, 默认:100,单位:ms
参见