mirror of
https://github.com/dotMorten/NmeaParser.git
synced 2026-01-29 20:04:18 +01:00
306 lines
14 KiB
HTML
306 lines
14 KiB
HTML
<!DOCTYPE html>
|
|
<!--[if IE]><![endif]-->
|
|
<html>
|
|
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
|
<title>Class BluetoothDevice </title>
|
|
<meta name="viewport" content="width=device-width">
|
|
<meta name="title" content="Class BluetoothDevice ">
|
|
|
|
<meta name="description" content="A Bluetooth NMEA device">
|
|
<link rel="shortcut icon" href="../../favicon.ico">
|
|
<link rel="stylesheet" href="../../styles/docfx.vendor.min.css">
|
|
<link rel="stylesheet" href="../../styles/docfx.css">
|
|
<link rel="stylesheet" href="../../styles/main.css">
|
|
<meta property="docfx:navrel" content="../../toc.html">
|
|
<meta property="docfx:tocrel" content="toc.html">
|
|
|
|
|
|
|
|
</head>
|
|
<body data-spy="scroll" data-target="#affix" data-offset="120">
|
|
<div id="wrapper">
|
|
<header>
|
|
|
|
<nav id="autocollapse" class="navbar navbar-inverse ng-scope" role="navigation">
|
|
<div class="container">
|
|
<div class="navbar-header">
|
|
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar">
|
|
<span class="sr-only">Toggle navigation</span>
|
|
<span class="icon-bar"></span>
|
|
<span class="icon-bar"></span>
|
|
<span class="icon-bar"></span>
|
|
</button>
|
|
|
|
<a class="navbar-brand" href="../../index.html">
|
|
<img id="logo" class="svg" src="../../images/logo.png" alt="">
|
|
</a>
|
|
</div>
|
|
<div class="collapse navbar-collapse" id="navbar">
|
|
<form class="navbar-form navbar-right" role="search" id="search">
|
|
<div class="form-group">
|
|
<input type="text" class="form-control" id="search-query" placeholder="Search" autocomplete="off">
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</nav>
|
|
|
|
<div class="subnav navbar navbar-default">
|
|
<div class="container hide-when-search" id="breadcrumb">
|
|
<ul class="breadcrumb">
|
|
<li></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</header>
|
|
<div role="main" class="container body-content hide-when-search">
|
|
|
|
<div class="sidenav hide-when-search">
|
|
<a class="btn toc-toggle collapse" data-toggle="collapse" href="#sidetoggle" aria-expanded="false" aria-controls="sidetoggle">Show / Hide Table of Contents</a>
|
|
<div class="sidetoggle collapse" id="sidetoggle">
|
|
<div id="sidetoc"></div>
|
|
</div>
|
|
</div>
|
|
<div class="article row grid-right">
|
|
<div class="col-md-10">
|
|
<article class="content wrap" id="_content" data-uid="NmeaParser.BluetoothDevice">
|
|
|
|
|
|
|
|
<h1 id="NmeaParser_BluetoothDevice" data-uid="NmeaParser.BluetoothDevice" class="text-break">Class BluetoothDevice</h1>
|
|
<div class="markdown level0 summary"><p>A Bluetooth NMEA device</p>
|
|
</div>
|
|
<div class="markdown level0 conceptual"></div>
|
|
<div class="inheritance">
|
|
<h5>Inheritance</h5>
|
|
<div class="level0"><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></div>
|
|
<div class="level1"><a class="xref" href="NmeaParser.NmeaDevice.html">NmeaDevice</a></div>
|
|
<div class="level2"><span class="xref">BluetoothDevice</span></div>
|
|
</div>
|
|
<div class="implements">
|
|
<h5>Implements</h5>
|
|
<div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.idisposable">IDisposable</a></div>
|
|
</div>
|
|
<div class="inheritedMembers">
|
|
<h5>Inherited Members</h5>
|
|
<div>
|
|
<a class="xref" href="NmeaParser.NmeaDevice.OpenAsync.html#NmeaParser_NmeaDevice_OpenAsync">NmeaDevice.OpenAsync()</a>
|
|
</div>
|
|
<div>
|
|
<a class="xref" href="NmeaParser.NmeaDevice.ReadAsync.html#NmeaParser_NmeaDevice_ReadAsync_System_Byte___System_Int32_System_Int32_System_Threading_CancellationToken_">NmeaDevice.ReadAsync(byte[], int, int, CancellationToken)</a>
|
|
</div>
|
|
<div>
|
|
<a class="xref" href="NmeaParser.NmeaDevice.CloseAsync.html#NmeaParser_NmeaDevice_CloseAsync">NmeaDevice.CloseAsync()</a>
|
|
</div>
|
|
<div>
|
|
<a class="xref" href="NmeaParser.NmeaDevice.MessageReceived.html">NmeaDevice.MessageReceived</a>
|
|
</div>
|
|
<div>
|
|
<a class="xref" href="NmeaParser.NmeaDevice.DeviceDisconnected.html">NmeaDevice.DeviceDisconnected</a>
|
|
</div>
|
|
<div>
|
|
<a class="xref" href="NmeaParser.NmeaDevice.Dispose.html#NmeaParser_NmeaDevice_Dispose">NmeaDevice.Dispose()</a>
|
|
</div>
|
|
<div>
|
|
<a class="xref" href="NmeaParser.NmeaDevice.Dispose.html#NmeaParser_NmeaDevice_Dispose_System_Boolean_">NmeaDevice.Dispose(bool)</a>
|
|
</div>
|
|
<div>
|
|
<a class="xref" href="NmeaParser.NmeaDevice.IsOpen.html#NmeaParser_NmeaDevice_IsOpen">NmeaDevice.IsOpen</a>
|
|
</div>
|
|
<div>
|
|
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)">object.Equals(object)</a>
|
|
</div>
|
|
<div>
|
|
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)">object.Equals(object, object)</a>
|
|
</div>
|
|
<div>
|
|
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gethashcode">object.GetHashCode()</a>
|
|
</div>
|
|
<div>
|
|
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gettype">object.GetType()</a>
|
|
</div>
|
|
<div>
|
|
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone">object.MemberwiseClone()</a>
|
|
</div>
|
|
<div>
|
|
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.referenceequals">object.ReferenceEquals(object, object)</a>
|
|
</div>
|
|
<div>
|
|
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.tostring">object.ToString()</a>
|
|
</div>
|
|
</div>
|
|
<h6><strong>Namespace</strong>: <a class="xref" href="NmeaParser.html">NmeaParser</a></h6>
|
|
<h6><strong>Assembly</strong>: NmeaParser.dll</h6>
|
|
<h5 id="NmeaParser_BluetoothDevice_syntax">Syntax</h5>
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public class BluetoothDevice : NmeaDevice, IDisposable</code></pre>
|
|
</div>
|
|
<h5 id="NmeaParser_BluetoothDevice_remarks"><strong>Remarks</strong></h5>
|
|
<div class="markdown level0 remarks"><p>To use this device, ensure you have the necessary permissions in the <code>AndroidManifest.xml</code> file:</p>
|
|
<pre><code class="lang-csharp">```xml
|
|
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
|
|
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
|
|
<uses-permission android:name="android.permission.BLUETOOTH" />
|
|
```</code></pre><p>
|
|
<p>Next see MainActivity.cs in the Android sample as a reference:
|
|
<a href="https://github.com/dotMorten/NmeaParser/blob/main/src/SampleApp.Droid/MainActivity.cs">https://github.com/dotMorten/NmeaParser/blob/main/src/SampleApp.Droid/MainActivity.cs</a></p>
|
|
|
|
</div>
|
|
<h3 id="constructors">Constructors
|
|
</h3>
|
|
<table class="table table-bordered table-condensed">
|
|
<thead>
|
|
<tr>
|
|
<th>Name</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td id="NmeaParser_BluetoothDevice__ctor_Android_Bluetooth_BluetoothDevice_" data-uid="NmeaParser.BluetoothDevice.#ctor(Android.Bluetooth.BluetoothDevice)">
|
|
<a class="xref" href="NmeaParser.BluetoothDevice.-ctor.html#NmeaParser_BluetoothDevice__ctor_Android_Bluetooth_BluetoothDevice_">BluetoothDevice(BluetoothDevice)</a>
|
|
</td>
|
|
<td class="markdown level1 summary"><p>Initializes a new instance of the <a class="xref" href="NmeaParser.BluetoothDevice.html">BluetoothDevice</a> class.</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td id="NmeaParser_BluetoothDevice__ctor_Android_Bluetooth_BluetoothDevice_Android_Content_Context_" data-uid="NmeaParser.BluetoothDevice.#ctor(Android.Bluetooth.BluetoothDevice,Android.Content.Context)">
|
|
<a class="xref" href="NmeaParser.BluetoothDevice.-ctor.html#NmeaParser_BluetoothDevice__ctor_Android_Bluetooth_BluetoothDevice_Android_Content_Context_">BluetoothDevice(BluetoothDevice, Context)</a>
|
|
</td>
|
|
<td class="markdown level1 summary"><p>Initializes a new instance of the <a class="xref" href="NmeaParser.BluetoothDevice.html">BluetoothDevice</a> class.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<h3 id="properties">Properties
|
|
</h3>
|
|
<table class="table table-bordered table-condensed">
|
|
<thead>
|
|
<tr>
|
|
<th>Name</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td id="NmeaParser_BluetoothDevice_CanWrite" data-uid="NmeaParser.BluetoothDevice.CanWrite">
|
|
<a class="xref" href="NmeaParser.BluetoothDevice.CanWrite.html#NmeaParser_BluetoothDevice_CanWrite">CanWrite</a>
|
|
</td>
|
|
<td class="markdown level1 summary"><p>Gets a value indicating whether this device supports writing</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<h3 id="methods">Methods
|
|
</h3>
|
|
<table class="table table-bordered table-condensed">
|
|
<thead>
|
|
<tr>
|
|
<th>Name</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td id="NmeaParser_BluetoothDevice_CloseStreamAsync_System_IO_Stream_" data-uid="NmeaParser.BluetoothDevice.CloseStreamAsync(System.IO.Stream)">
|
|
<a class="xref" href="NmeaParser.BluetoothDevice.CloseStreamAsync.html#NmeaParser_BluetoothDevice_CloseStreamAsync_System_IO_Stream_">CloseStreamAsync(Stream)</a>
|
|
</td>
|
|
<td class="markdown level1 summary"><p>Closes the stream the NmeaDevice is working on top off.</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td id="NmeaParser_BluetoothDevice_GetBluetoothSerialDevices" data-uid="NmeaParser.BluetoothDevice.GetBluetoothSerialDevices">
|
|
<a class="xref" href="NmeaParser.BluetoothDevice.GetBluetoothSerialDevices.html#NmeaParser_BluetoothDevice_GetBluetoothSerialDevices">GetBluetoothSerialDevices()</a>
|
|
</td>
|
|
<td class="markdown level1 summary"><p>Gets a list of bluetooth devices that supports serial communication</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td id="NmeaParser_BluetoothDevice_GetBluetoothSerialDevices_Android_Content_Context_" data-uid="NmeaParser.BluetoothDevice.GetBluetoothSerialDevices(Android.Content.Context)">
|
|
<a class="xref" href="NmeaParser.BluetoothDevice.GetBluetoothSerialDevices.html#NmeaParser_BluetoothDevice_GetBluetoothSerialDevices_Android_Content_Context_">GetBluetoothSerialDevices(Context)</a>
|
|
</td>
|
|
<td class="markdown level1 summary"><p>Gets a list of bluetooth devices that supports serial communication</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td id="NmeaParser_BluetoothDevice_OpenStreamAsync" data-uid="NmeaParser.BluetoothDevice.OpenStreamAsync">
|
|
<a class="xref" href="NmeaParser.BluetoothDevice.OpenStreamAsync.html#NmeaParser_BluetoothDevice_OpenStreamAsync">OpenStreamAsync()</a>
|
|
</td>
|
|
<td class="markdown level1 summary"><p>Creates and opens the stream the NmeaDevice is working on top off.</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td id="NmeaParser_BluetoothDevice_WriteAsync_System_Byte___System_Int32_System_Int32_" data-uid="NmeaParser.BluetoothDevice.WriteAsync(System.Byte[],System.Int32,System.Int32)">
|
|
<a class="xref" href="NmeaParser.BluetoothDevice.WriteAsync.html#NmeaParser_BluetoothDevice_WriteAsync_System_Byte___System_Int32_System_Int32_">WriteAsync(byte[], int, int)</a>
|
|
</td>
|
|
<td class="markdown level1 summary"><p>Writes to the device stream. Useful for transmitting RTCM corrections to the device
|
|
Check the <a class="xref" href="NmeaParser.NmeaDevice.CanWrite.html#NmeaParser_NmeaDevice_CanWrite">CanWrite</a> property before calling this method.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
|
|
<h3 id="appliesTo">Applies</h3>
|
|
|
|
<div class="appliesto">
|
|
<div>
|
|
<table>
|
|
<thead><th>Target</th><th>Versions</th></thead>
|
|
<tbody>
|
|
<tr><td><b>.NET Windows</b></td><td>main</td></tr>
|
|
<tr><td><b>.NET Android</b></td><td>main, v3.0</td></tr>
|
|
<tr><td><b>UWP</b></td><td>main, v3.0, v2.2, v2.1, v2.0</td></tr>
|
|
<tr><td><b>Xamarin.Android</b></td><td>v2.2, v2.1, v2.0</td></tr>
|
|
</tbody>
|
|
|
|
</table>
|
|
</div>
|
|
</div>
|
|
|
|
</article>
|
|
</div>
|
|
|
|
<div class="hidden-sm col-md-2" role="complementary">
|
|
<div class="sideaffix">
|
|
<div class="contribution">
|
|
<ul class="nav">
|
|
<li>
|
|
<a href="https://github.com/dotMorten/NmeaParser/blob/main/artifacts/docs/api_overwrites/applies-to-overwrite.md/#L11060" class="contribution-link">Edit this page</a>
|
|
</li>
|
|
<li>
|
|
<a href="https://github.com/dotMorten/NmeaParser/blob/main/src/NmeaParser/BluetoothDevice.Android.cs/#L42" class="contribution-link">View Source</a>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<nav class="bs-docs-sidebar hidden-print hidden-xs hidden-sm affix" id="affix">
|
|
<h5>In this article</h5>
|
|
<div></div>
|
|
</nav>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<footer>
|
|
<div class="grad-bottom"></div>
|
|
<div class="footer">
|
|
<div class="container">
|
|
<span class="pull-right">
|
|
<a href="#top">Back to top</a>
|
|
</span>
|
|
|
|
<span>Generated by <strong>DocFX</strong></span>
|
|
</div>
|
|
</div>
|
|
</footer>
|
|
</div>
|
|
|
|
<script type="text/javascript" src="../../styles/docfx.vendor.min.js"></script>
|
|
<script type="text/javascript" src="../../styles/docfx.js"></script>
|
|
<script type="text/javascript" src="../../styles/main.js"></script>
|
|
</body>
|
|
</html>
|