Re: [問題] 請問藍芽資料傳送的APIs
※ 引述《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://www.ptt.cc/bbs/MacDev/M.1417680070.A.344.html
→
12/04 17:13, , 1F
12/04 17:13, 1F
討論串 (同標題文章)
本文引述了以下文章的的內容:
完整討論串 (本文為第 2 之 2 篇):
MacDev 近期熱門文章
PTT數位生活區 即時熱門文章