MATLAB ヘルプ センター
Bluetooth デバイスのバッファーのクリア
flush(device)
flush(device,"input")
flush(device,"output")
flush(device) は、指定された Bluetooth® デバイスの入力バッファーと出力バッファーの両方からすべてのデータをフラッシュします。
device
例
flush(device,"input") は入力バッファーのみフラッシュします。
flush(device,"output") は出力バッファーのみフラッシュします。
すべて折りたたむ
近くの Bluetooth デバイスへの接続を作成します。
device = bluetooth("TestDevice")
device = bluetooth with properties: Name: "TestDevice" Address: "BC275C50533C" Channel: 1 NumBytesAvailable: 0 NumBytesWritten: 0 Show all properties
デバイスにデータを書き込み、入力バッファーに読み取ることができるバイト数を表示します。
write(device,1:5,"uint8") device.NumBytesAvailable
ans = 5
入力および出力両方のバッファーをフラッシュします。
flush(device);
読み取り可能なバイト数を表示します。
device.NumBytesAvailable
ans = 0
入力バッファーにはデータがありません。
bluetooth
Bluetooth デバイスの接続。bluetooth オブジェクトとして指定します。
例: flush(device) は、Bluetooth 接続 device からのデータをフラッシュします。
R2020b で導入
read
write
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Web サイトの選択
Web サイトを選択すると、翻訳されたコンテンツにアクセスし、地域のイベントやサービスを確認できます。現在の位置情報に基づき、次のサイトの選択を推奨します:
また、以下のリストから Web サイトを選択することもできます。
最適なサイトパフォーマンスの取得方法
中国のサイト (中国語または英語) を選択することで、最適なサイトパフォーマンスが得られます。その他の国の MathWorks のサイトは、お客様の地域からのアクセスが最適化されていません。
南北アメリカ
ヨーロッパ
アジア太平洋地域
最寄りの営業オフィスへのお問い合わせ