7

iOS CBCharacteristic Class Reference には、特性のプロパティを返すために使用されるビット マップの説明があります。私はそれらのうちの3つが何を意味するかについての情報を探しています.

ドキュメントには、次のようにリストされています。

CBCharacteristicProperties

特性の可能なプロパティ。

enum {
    CBCharacteristicPropertyBroadcast = 0x01,
    CBCharacteristicPropertyRead = 0x02,
    CBCharacteristicPropertyWriteWithoutResponse = 0x04,
    CBCharacteristicPropertyWrite = 0x08,
    CBCharacteristicPropertyNotify = 0x10,
    CBCharacteristicPropertyIndicate = 0x20,
    CBCharacteristicPropertyAuthenticatedSignedWrites = 0x40,
    CBCharacteristicPropertyExtendedProperties = 0x80,
};

私が見つけたこれらのプロパティのドキュメントやリストは他にありません。

読み取り、書き込み、通知など、明らかなものもあります。ブロードキャストは、私が見つけた他の BLE ドキュメントに記載されています。

CBCharacteristicPropertyWriteWithoutResponse は紛らわしいです。なぜこれがフラグなのですか?CBDevice 呼び出し writeValue:forCharacteristic:type: には、次を受け入れるフラグがあります。

enum {
    CBCharacteristicWriteWithResponse = 0,
    CBCharacteristicWriteWithoutResponse,
};

これらのフラグは冗長ですか、それとも CBCharacteristicProperties フラグと一致する型を writeValue:forCharacteristic:type: に指定する必要がありますか?

また、CBCharacteristicPropertyIndi​​cate と CBCharacteristicPropertyExtendedProperties は何を意味するのでしょうか?

これらを説明する Apple のドキュメントよりも優れたリファレンスはありますか?

4

1 に答える 1

10

Apple Developer Forums で次の回答を得ました。

基礎となる仕様を理解するのに役立ちます。4.0 仕様のホスト ボリュームの GATT セクション (ここで入手可能: http://www.bluetooth.org/Technical/Specifications/adopted.htm ) を見ると、定数がより明確になるはずです。
CBCharacteristicPropertyWriteWithoutResponse は、特性が「応答なしの書き込み」サブ手順をサポートしていることを示します。CBCharacteristicWriteWithoutResponse は、実際には「応答なしの書き込み」サブ手順を使用することを示します。おそらく、それをサポートしていない特性で「応答なしの書き込み」サブプロシージャーを使用しようとすると、エラーが発生します。それが役立つことを願って、

ベン

補足として、問題のドキュメントはCore Version 4.0です。セクション3.3.1.1 特性プロパティを参照してください。

于 2012-08-09T16:03:32.757 に答える