作者stevenlin08 (stevens)
看板MacDev
標題Re: [問題] 請問藍芽資料傳送的APIs
時間Thu Dec 4 16:01:07 2014
※ 引述《biostat02 (王子)》之銘言:
: 目前在做iOS藍芽的資料傳輸
: 可是一直搞不清楚這兩者的差別
: - writeValue:forCharacteristic:type:
: - updateValue:forCharacteristic:onSubscribedCentrals:
: 我個人的解讀是兩者的傳輸方向是相反的
: 想跟各位確定一下,謝謝
hi,
是的,
I hope you have already figured out the answer to this question.
- updateValue:forCharacteristic:onSubscribedCentrals:
this is Peripheral Role Tasks.
When you call this method to send updated characteristic values to s
ubscribed centrals, you can specify which centrals you want
to update in the last parameter.
從Peripheral 送到Central 。
writeValue:forCharacteristic:type: method
this is for Central Role Tasks.
whento write the value of a characteristic, you spec
ify what type of write you want to perform.
then callback function
peripheral:didWriteValueForCharacteristic:error:
you can reference Core Bluetooth Programming Guide from apple
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 59.126.34.194
※ 文章網址: http://webptt.com/m.aspx?n=bbs/MacDev/M.1417680070.A.344.html
1F:→ uranusjr: 為什麼幾乎全篇英文卻要在無關緊要的地方夾中文進去... 12/04 17:13