QML类型说明-BluetoothDiscoveryMo…
来源:互联网 发布:厦门关键词优化排名 编辑:程序博客网 时间:2024/05/24 02:04
BluetoothDiscoveryModel
ImportStatement:
Since:
Properties
discoveryMode : enumeration
error : enumeration
remoteAddress : string
running : bool
uuidFilter : string
Signals
deviceDiscovered(string device)
serviceDiscovered(BluetoothService service)
DetailedDescription
BluetoothDiscoveryModel为寻找连接服务提供模板。它的内容有益于通过UUID过滤发现的所有连接到单一的服务,如一个游戏。BluetoothDiscoveryModel里面的角色包括service、name、remoteAddress和deviceName。基于当前的发现模式,角色的意义会变化。
角色
发现设备
发现服务
name
设备名和地址
服务明和提供服务的设备名,如果设备名为空,则是设备的地址
deviceName
设备名
提供服务的设备名
service
这个模式未定义
BluetoothService组件描述发现的服务
remoteAddress
发现设备的地址
提供服务的设备地址
同时查阅QBluetoothServiceDiscove
PropertyDocumentation
discoveryMode : enumeration
设置发现模式,在发现启动之前,发现模式必须被设置。
属性
描述
BluetoothDiscoveryModel.FullServiceDiscovery
寻找服务范围内的所有服务和设备
BluetoothDiscoveryModel.MinimalServiceDiscovery
启动最小发现,只有设备和UUID是正确的,发现工作才如预期
BluetoothDiscoveryModel.DeviceDiscovery
只在范围内发现设备,模板角色为0
error : enumeration
在发现期间最后报告的错误。这个属性是只读的。
属性
描述
BluetoothDiscoveryModel.NoError
没有错误
BluetoothDiscoveryModel.InputOutputError
发现设备期间有IO错误
BluetoothDiscoveryModel.PoweredOffError
蓝牙设备没有启动
BluetoothDiscoveryModel.UnknownError
未知错误
remoteAddress : string
提供服务的远程蓝牙设备的地址。只有这个地址的蓝牙设备将被发现。如果设置的是无效的蓝牙地址或者这个属性在发现开始之后设置,这个属性对发现将不产生影响。如果设备发现被设置,这个属性被忽略。
running : bool
开始或停止发现。重新开始发现设备需要设置这个属性为假,同时subsequemtly再次为真。
uuidFilter : string
这个属性设置UUID过滤。UUID被用来返回匹配的服务。16位,32位和128位的UUID能被设置,字符格式和QUuid的格式一样。同时参阅QBluetoothUuidand QUuid。
SignalDocumentation
deviceDiscovered(string device)
当一个新设备被发现时,这个信号被发射。字符串device包含发现设备的蓝牙地址。
serviceDiscovered(BluetoothService service)
当一个新的服务被发现时,发射这个信号。service参数包含服务的详细信息。
同时参阅BluetoothService。- QML类型说明-BluetoothDiscoveryMo…
- QML类型说明-AmbientTemperatureRe…
- QML类型说明-AmbientTemperatureSe…
- QML类型说明-AttenuationModelInve…
- QML类型说明-AttenuationModelLine…
- QML类型说明-加速度计Acceleromete…
- QML类型说明-加速度计Acceleromete…
- QML类型说明-Accessible
- QML类型说明-Action
- QML类型说明-Address
- QML类型说明-Affector
- QML类型说明-Age
- QML类型说明-Altimeter
- QML类型说明-AltimeterReading
- QML类型说明-AmbientLightReading
- QML类型说明-AmbientLightSensor
- QML类型说明-AnchorAnimation
- QML类型说明-AnchorChanges
- QML类型说明-AudioSample
- 使用hibernate实体全注解时遇到Unknown entity解决办法
- QML类型说明-Behavior
- QML类型说明-Binding
- QML类型说明-Blend
- QML类型说明-BluetoothDiscoveryMo…
- 流媒体协议介绍(rtp/rtcp/rtsp/rtmp/mms/hls)
- 【OC学习-3】什么是面向对象?和面向过程对比才明白
- Android的事件传递机制[转]
- OpenCV基础篇之图片叠加
- Netty源码解读之线程
- iomanip的介绍
- 那些年我们一起学习的线性布局 之 线性布局里很有趣的那些事
- 安卓按比例布局,layout_weight用法