版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進行舉報或認領(lǐng)
文檔簡介
1、Immediate Alert ServiceImmediate Alert Servicev1.02015/6/121Copyright 2015 Realtek Semiconductor Corporation.s.Immediate Alert Service修訂歷史(ReviHistory)日期版本修改2Copyright 2015 Realtek Semiconductor Corporation.s.2015/6/12V1.0Draft by Enrelease verImmediate Alert Service目錄修訂歷史(ReviHistory)2表格列表41About I
2、mmediate Alert Service52Service Characteristics62.1Alert Level62.2GATT Table634Service Configuration7Serviceerfa. 84.1IAS_AddService85eract wipplication95.1Handle Cnt Write Request96Referen.103Copyright 2015 Realtek Semiconductor Corporation.s.Immediate Alert Service表格列表表2.1 Characteristic 描述6表2.2 A
3、ttribute Table7表5.1消息格式94Copyright 2015 Realtek Semiconductor Corporation.s.Immediate Alert Service1About Immediate Alert ServiceImmediate Alert Service(IAS)通過提供一個 Control Po,使對端設(shè)備能觸發(fā)本地設(shè)備的及能。警功Immediate Alert Service 包含一個 Alert Level characteristic,只要該 characteristic 被寫入除“No Alert”以外的值,都會引起設(shè)備。Immedi
4、ate Alert Service 一般與其他的 Service 一起某個 profile,如 Proximity,F(xiàn)ind Me 等,其作用就是使設(shè)備具備及警的功能。5Copyright 2015 Realtek Semiconductor Corporation.s.Immediate Alert Service2Service Characteristics這部分是對 IAS Service 的 Characteristic 的簡單介紹,使 Application 開發(fā)者能對 IAS Service 的內(nèi)容有大概的了解,另外也會涉及一些在 Application 中使用 IAS Serv
5、ice 時需要注意的一些事項。關(guān)于 IAS Service的詳細說明請參考 SIG的相關(guān) spec 文檔。如下是 IAS Service 中所包含的 Characteristic:表 2.1 Characteristic 描述從上表可以看到 IAS Service 僅有一個 Characteristic - Alert Level。下面將對 Alert Level 進行介紹。2.1Alert LevelAlert Level characteristic 是一個 control po,使對端可以通過寫這個 characteristic 來觸發(fā)本地設(shè)備報警,而且通過 level 的值設(shè)定的級別。
6、可以設(shè)置的級別分別為“No Alert”,“Mild Alert”和“High Alert”,級別是對強烈程度的分級,形式可以有多種多樣,如燈閃爍、蜂鳴器響、振動等。當本地設(shè)備被觸發(fā)后,以下的方式可以停止:時間到達;用戶關(guān)閉;新的 Alert Level 被寫入;鏈路斷開。2.2GATT Table如下是 IAS Service 的 Attribute Table,描述了 IAS Service 的各個 Attribute 的狀況:6Copyright 2015 Realtek Semiconductor Corporation.s.Characteristic NameRequirement
7、Mandatory PropertiesOptionalPropertiesSecurityPermissAlert LevelMWrite without ResponseNoneImmediate Alert Service表 2.2 Attribute Table3Service ConfigurationIAS Service 沒有可選的配置。7Copyright 2015 Realtek Semiconductor Corporation.s.FlagsAttribute TypeAttribute ValuePermisOptionalINCL/LEPrimary ServiceI
8、AS Service-0 x1802readMINCLCharacteristicproperty(write without response)readMAPPLAlert LevelValue not defined herewrite without responseMImmediate Alert Service4Serviceerfa這部分是 IAS Service 所提供的接口的說明以及一些使用注意事項。關(guān)于如何在 Application 中使用這些接口來實現(xiàn) IAS Service 相關(guān)的 Profile 功能,請參考ProfileerfaDesign。4.1IAS_AddSer
9、viceApplication 在初始化時調(diào)用該接口將 IAS Service 添加到 Profile Layer。8Copyright 2015 Realtek Semiconductor Corporation.s.Immediate Alert Service5eract wipplication當 Cnt 發(fā)起對 IAS Service 相關(guān)數(shù)據(jù)的請求時,IAS Service 會通過 App Callback 將消息通知到Application,IAS Service 發(fā)往 Application 的消息格式如下:表 5.1 消息格式Application 需要對 IAS Servi
10、ce 發(fā)來的這些消息進行處理,接下來將對這部分的處理詳細說明。5.1Handle Cnt Write RequestIAS Service 的 Alert Level 有被 C nt 端 write 的權(quán)限。當 C nt 發(fā)起對 Alert Level 的 write 請求時,IAS Service 會通過 App Callback 向 Application 發(fā)送一個消息, 消息的 msg_type 部分被設(shè)置為 SERVICE_CALLBACK_TYPE_WRITE_CHAR_VALUE,表示為 Write Characteristic 事件,消息的 msg_data的 write_ale
11、rt_level 即是要被寫入 Alert Level characteristic 的值:在 Application 中對該消息的處理相關(guān)的示例代碼片段如下:9Copyright 2015 Realtek Semiconductor Corporation.s.else if (serviceID = gIAServiceId) TIAS_CALLBACK_DATA *pIasCallbackData = (TIAS_CALLBACK_DATA *)pData;if(pIasCallbackData-msg_type = SERVICE_CALLBACK_TYPE_WRITE_CHAR_VALUE)DBG_BUFFER(MODULE_APP, LEVEL_INFO, write_alert_level = %d, 1,pIasCallbackData-msg_data.write_alert_level);SubContentValueDescriptionMessagemsg_typeSERVICE_CALLBACK_TYPE_WRITE_CHAR_VALUEWrite Characteristic Eventmsg_
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負責。
- 6. 下載文件中如有侵權(quán)或不適當內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 手機拍的協(xié)議書
- 熱網(wǎng)管道合同范本
- 苗子培養(yǎng)協(xié)議書
- 蔬菜加工協(xié)議書
- 融資代扣協(xié)議書
- 認親合同協(xié)議書
- 認購合同協(xié)議書
- 設(shè)備借貨協(xié)議書
- 設(shè)備清合同范本
- 設(shè)計駐場協(xié)議書
- 骶部炎性竇道的護理
- 多元催化體系下羊毛脂轉(zhuǎn)酯化制備膽固醇的工藝解析與效能探究
- 2026福建春季高考語文總復(fù)習:名篇名句默寫(知識梳理+考點)原卷版
- 鄭州市2025屆高中畢業(yè)年級第一次質(zhì)量預(yù)測數(shù)學試題及答案解析
- 學霸養(yǎng)成之第一性原理-2025-2026學年高二上學期學習方法指導(dǎo)班會
- 投資策略分析報告:波動趨勢量化剝離策略
- 2025國家外匯管理局中央外匯業(yè)務(wù)中心社會在職人員招聘3人考試筆試備考題庫及答案解析
- 景德鎮(zhèn)市中醫(yī)院護理疑難病例討論組織與管理試題
- 中鐵四局河沙合同范本
- 高職院校五育并舉實施方案
- 美團代理加盟合同范本
評論
0/150
提交評論