本文整理汇总了C++中DataContainer::setCurrentDevice方法的典型用法代码示例。如果您正苦于以下问题:C++ DataContainer::setCurrentDevice方法的具体用法?C++ DataContainer::setCurrentDevice怎么用?C++ DataContainer::setCurrentDevice使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DataContainer
的用法示例。
在下文中一共展示了DataContainer::setCurrentDevice方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: gatt_service_connected
void gatt_service_connected(const char *bdaddr, const char *service, int instance, int err, uint16_t connInt, uint16_t latency, uint16_t superTimeout, void *userData)
{
Q_UNUSED(superTimeout)
Q_UNUSED(userData)
Q_UNUSED(latency)
Q_UNUSED(connInt)
Q_UNUSED(err)
qDebug() << "YYYY gatt_service_connected:" << service;
if (strcmp(service, IMMEDIATE_ALERT_SERVICE_UUID) == 0) {
// we connected to the immediate alert service or the link lost service so...
immediate_alert_connected = true;
// create a remote BT device structure since we need this for RSSI monitoring later
bt_remote_device_t *bt_device = bt_rdev_get_device(bdaddr);
DataContainer *dc = DataContainer::getInstance();
dc->setCurrentDevice(bt_device);
establishHandles(INDEX_IMMEDIATE_ALERT_SERVICE, instance);
_handler->emitSignalEnableProximityVisualisation();
return;
}
if (strcmp(service, LINK_LOSS_SERVICE_UUID) == 0) {
// we connected to the link loss service or the link lost service so...
link_loss_connected = true;
establishHandles(INDEX_LINK_LOSS_SERVICE, instance);
setLinkLossAlertLevel();
return;
}
if (strcmp(service, TX_POWER_SERVICE_UUID) == 0) {
// we connected to the tx power service or the link lost service so...
tx_power_connected = true;
establishHandles(INDEX_TX_POWER_SERVICE, instance);
readTxPowerLevel();
_handler->startRssiPolling();
return;
}
}