From c57c2aab703205529a90e284567e704a06387556 Mon Sep 17 00:00:00 2001 From: gurezo <akihiko.kigure@gmail.com> Date: Wed, 5 Jan 2022 23:28:10 +0900 Subject: [PATCH] new doc --- docs/classes/I2CAccess.html | 11 +- docs/classes/I2CPort.html | 19 ++- docs/classes/I2CPortMap.html | 2 +- docs/classes/OperationError.html | 8 +- docs/interfaces/I2CSlaveDevice.html | 38 ++++-- docs/modules.html | 6 +- index.ts | 184 ++++++++++++++++++++++++---- 7 files changed, 233 insertions(+), 35 deletions(-) diff --git a/docs/classes/I2CAccess.html b/docs/classes/I2CAccess.html index 5582316..1425b16 100644 --- a/docs/classes/I2CAccess.html +++ b/docs/classes/I2CAccess.html @@ -1 +1,10 @@ -<!DOCTYPE html><html class="default"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>I2CAccess | node-web-i2c</title><meta name="description" content="Documentation for node-web-i2c"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script async src="../assets/search.js" id="search-script"></script></head><body><script>document.body.classList.add(localStorage.getItem("tsd-theme") || "os")</script><header><div class="tsd-page-toolbar"><div class="container"><div class="table-wrap"><div class="table-cell" id="tsd-search" data-base=".."><div class="field"><label for="tsd-search-field" class="tsd-widget search no-caption">Search</label><input type="text" id="tsd-search-field"/></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">node-web-i2c</a></div><div class="table-cell" id="tsd-widgets"><div id="tsd-filter"><a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a><div class="tsd-filter-group"><div class="tsd-select" id="tsd-filter-visibility"><span class="tsd-select-label">All</span><ul class="tsd-select-list"><li data-value="public">Public</li><li data-value="protected">Public/Protected</li><li data-value="private" class="selected">All</li></ul></div> <input type="checkbox" id="tsd-filter-inherited" checked/><label class="tsd-widget" for="tsd-filter-inherited">Inherited</label><input type="checkbox" id="tsd-filter-externals" checked/><label class="tsd-widget" for="tsd-filter-externals">Externals</label></div></div><a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a></div></div></div></div><div class="tsd-page-title"><div class="container"><ul class="tsd-breadcrumb"><li><a href="../modules.html">node-web-i2c</a></li><li><a href="I2CAccess.html">I2CAccess</a></li></ul><h1>Class I2CAccess</h1></div></div></header><div class="container container-main"><div class="row"><div class="col-8 col-content"><section class="tsd-panel tsd-hierarchy"><h3>Hierarchy</h3><ul class="tsd-hierarchy"><li><span class="target">I2CAccess</span></li></ul></section><section class="tsd-panel-group tsd-index-group"><h2>Index</h2><section class="tsd-panel tsd-index-panel"><div class="tsd-index-content"><section class="tsd-index-section "><h3>Constructors</h3><ul class="tsd-index-list"><li class="tsd-kind-constructor tsd-parent-kind-class"><a href="I2CAccess.html#constructor" class="tsd-kind-icon">constructor</a></li></ul></section><section class="tsd-index-section tsd-is-private tsd-is-private-protected"><h3>Properties</h3><ul class="tsd-index-list"><li class="tsd-kind-property tsd-parent-kind-class tsd-is-private"><a href="I2CAccess.html#_ports" class="tsd-kind-icon">_ports</a></li></ul></section><section class="tsd-index-section "><h3>Accessors</h3><ul class="tsd-index-list"><li class="tsd-kind-get-signature tsd-parent-kind-class"><a href="I2CAccess.html#ports" class="tsd-kind-icon">ports</a></li></ul></section></div></section></section><section class="tsd-panel-group tsd-member-group "><h2>Constructors</h2><section class="tsd-panel tsd-member tsd-kind-constructor tsd-parent-kind-class"><a id="constructor" class="tsd-anchor"></a><h3>constructor</h3><ul class="tsd-signatures tsd-kind-constructor tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">new <wbr/>I2CAccess<span class="tsd-signature-symbol">(</span>ports<span class="tsd-signature-symbol">?: </span><a href="I2CPortMap.html" class="tsd-signature-type" data-tsd-kind="Class">I2CPortMap</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="I2CAccess.html" class="tsd-signature-type" data-tsd-kind="Class">I2CAccess</a></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in index.ts:21</li></ul></aside><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> ports: <a href="I2CPortMap.html" class="tsd-signature-type" data-tsd-kind="Class">I2CPortMap</a></h5></li></ul><h4 class="tsd-returns-title">Returns <a href="I2CAccess.html" class="tsd-signature-type" data-tsd-kind="Class">I2CAccess</a></h4></li></ul></section></section><section class="tsd-panel-group tsd-member-group tsd-is-private tsd-is-private-protected"><h2>Properties</h2><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-private"><a id="_ports" class="tsd-anchor"></a><h3><span class="tsd-flag ts-flagPrivate">Private</span> <span class="tsd-flag ts-flagReadonly">Readonly</span> _ports</h3><div class="tsd-signature tsd-kind-icon">_ports<span class="tsd-signature-symbol">:</span> <a href="I2CPortMap.html" class="tsd-signature-type" data-tsd-kind="Class">I2CPortMap</a></div><aside class="tsd-sources"><ul><li>Defined in index.ts:19</li></ul></aside></section></section><section class="tsd-panel-group tsd-member-group "><h2>Accessors</h2><section class="tsd-panel tsd-member tsd-kind-get-signature tsd-parent-kind-class"><a id="ports" class="tsd-anchor"></a><h3>ports</h3><ul class="tsd-signatures tsd-kind-get-signature tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">get</span> ports<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="I2CPortMap.html" class="tsd-signature-type" data-tsd-kind="Class">I2CPortMap</a></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in index.ts:25</li></ul></aside><h4 class="tsd-returns-title">Returns <a href="I2CPortMap.html" class="tsd-signature-type" data-tsd-kind="Class">I2CPortMap</a></h4></li></ul></section></section></div><div class="col-4 col-menu menu-sticky-wrap menu-highlight"><nav class="tsd-navigation primary"><ul><li class=""><a href="../modules.html">Exports</a></li></ul></nav><nav class="tsd-navigation secondary menu-sticky"><ul><li class="current tsd-kind-class"><a href="I2CAccess.html" class="tsd-kind-icon">I2CAccess</a><ul><li class="tsd-kind-constructor tsd-parent-kind-class"><a href="I2CAccess.html#constructor" class="tsd-kind-icon">constructor</a></li><li class="tsd-kind-property tsd-parent-kind-class tsd-is-private"><a href="I2CAccess.html#_ports" class="tsd-kind-icon">_ports</a></li><li class="tsd-kind-get-signature tsd-parent-kind-class"><a href="I2CAccess.html#ports" class="tsd-kind-icon">ports</a></li></ul></li></ul></nav></div></div></div><footer class="with-border-bottom"><div class="container"><h2>Legend</h2><div class="tsd-legend-group"><ul class="tsd-legend"><li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li><li class="tsd-kind-method tsd-parent-kind-interface"><span class="tsd-kind-icon">Method</span></li></ul><ul class="tsd-legend"><li class="tsd-kind-constructor tsd-parent-kind-class"><span class="tsd-kind-icon">Constructor</span></li><li class="tsd-kind-method tsd-parent-kind-class"><span class="tsd-kind-icon">Method</span></li></ul><ul class="tsd-legend"><li class="tsd-kind-constructor tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited constructor</span></li></ul><ul class="tsd-legend"><li class="tsd-kind-property tsd-parent-kind-class tsd-is-private"><span class="tsd-kind-icon">Private property</span></li></ul></div><h2>Settings</h2><p>Theme <select id="theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></p></div></footer><div class="container tsd-generator"><p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></div><div class="overlay"></div><script src="../assets/main.js"></script></body></html> \ No newline at end of file +<!DOCTYPE html><html class="default"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>I2CAccess | node-web-i2c</title><meta name="description" content="Documentation for node-web-i2c"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script async src="../assets/search.js" id="search-script"></script></head><body><script>document.body.classList.add(localStorage.getItem("tsd-theme") || "os")</script><header><div class="tsd-page-toolbar"><div class="container"><div class="table-wrap"><div class="table-cell" id="tsd-search" data-base=".."><div class="field"><label for="tsd-search-field" class="tsd-widget search no-caption">Search</label><input type="text" id="tsd-search-field"/></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">node-web-i2c</a></div><div class="table-cell" id="tsd-widgets"><div id="tsd-filter"><a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a><div class="tsd-filter-group"><div class="tsd-select" id="tsd-filter-visibility"><span class="tsd-select-label">All</span><ul class="tsd-select-list"><li data-value="public">Public</li><li data-value="protected">Public/Protected</li><li data-value="private" class="selected">All</li></ul></div> <input type="checkbox" id="tsd-filter-inherited" checked/><label class="tsd-widget" for="tsd-filter-inherited">Inherited</label><input type="checkbox" id="tsd-filter-externals" checked/><label class="tsd-widget" for="tsd-filter-externals">Externals</label></div></div><a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a></div></div></div></div><div class="tsd-page-title"><div class="container"><ul class="tsd-breadcrumb"><li><a href="../modules.html">node-web-i2c</a></li><li><a href="I2CAccess.html">I2CAccess</a></li></ul><h1>Class I2CAccess</h1></div></div></header><div class="container container-main"><div class="row"><div class="col-8 col-content"><section class="tsd-panel tsd-comment"><div class="tsd-comment tsd-typography"><div class="lead"> +<p>I2CAccess クラス定義</p> +</div></div></section><section class="tsd-panel tsd-hierarchy"><h3>Hierarchy</h3><ul class="tsd-hierarchy"><li><span class="target">I2CAccess</span></li></ul></section><section class="tsd-panel-group tsd-index-group"><h2>Index</h2><section class="tsd-panel tsd-index-panel"><div class="tsd-index-content"><section class="tsd-index-section "><h3>Constructors</h3><ul class="tsd-index-list"><li class="tsd-kind-constructor tsd-parent-kind-class"><a href="I2CAccess.html#constructor" class="tsd-kind-icon">constructor</a></li></ul></section><section class="tsd-index-section tsd-is-private tsd-is-private-protected"><h3>Properties</h3><ul class="tsd-index-list"><li class="tsd-kind-property tsd-parent-kind-class tsd-is-private"><a href="I2CAccess.html#_ports" class="tsd-kind-icon">_ports</a></li></ul></section><section class="tsd-index-section "><h3>Accessors</h3><ul class="tsd-index-list"><li class="tsd-kind-get-signature tsd-parent-kind-class"><a href="I2CAccess.html#ports" class="tsd-kind-icon">ports</a></li></ul></section></div></section></section><section class="tsd-panel-group tsd-member-group "><h2>Constructors</h2><section class="tsd-panel tsd-member tsd-kind-constructor tsd-parent-kind-class"><a id="constructor" class="tsd-anchor"></a><h3>constructor</h3><ul class="tsd-signatures tsd-kind-constructor tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">new <wbr/>I2CAccess<span class="tsd-signature-symbol">(</span>ports<span class="tsd-signature-symbol">?: </span><a href="I2CPortMap.html" class="tsd-signature-type" data-tsd-kind="Class">I2CPortMap</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="I2CAccess.html" class="tsd-signature-type" data-tsd-kind="Class">I2CAccess</a></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in index.ts:43</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead"> +<p>Creates an instance of GPIOAccess.</p> +</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> ports: <a href="I2CPortMap.html" class="tsd-signature-type" data-tsd-kind="Class">I2CPortMap</a></h5><div class="tsd-comment tsd-typography"><div class="lead"> +<p>ポート番号</p> +</div></div></li></ul><h4 class="tsd-returns-title">Returns <a href="I2CAccess.html" class="tsd-signature-type" data-tsd-kind="Class">I2CAccess</a></h4></li></ul></section></section><section class="tsd-panel-group tsd-member-group tsd-is-private tsd-is-private-protected"><h2>Properties</h2><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-private"><a id="_ports" class="tsd-anchor"></a><h3><span class="tsd-flag ts-flagPrivate">Private</span> <span class="tsd-flag ts-flagReadonly">Readonly</span> _ports</h3><div class="tsd-signature tsd-kind-icon">_ports<span class="tsd-signature-symbol">:</span> <a href="I2CPortMap.html" class="tsd-signature-type" data-tsd-kind="Class">I2CPortMap</a></div><aside class="tsd-sources"><ul><li>Defined in index.ts:37</li></ul></aside></section></section><section class="tsd-panel-group tsd-member-group "><h2>Accessors</h2><section class="tsd-panel tsd-member tsd-kind-get-signature tsd-parent-kind-class"><a id="ports" class="tsd-anchor"></a><h3>ports</h3><ul class="tsd-signatures tsd-kind-get-signature tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">get</span> ports<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="I2CPortMap.html" class="tsd-signature-type" data-tsd-kind="Class">I2CPortMap</a></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in index.ts:51</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead"> +<p>ポート情報取得処理</p> +</div></div><h4 class="tsd-returns-title">Returns <a href="I2CPortMap.html" class="tsd-signature-type" data-tsd-kind="Class">I2CPortMap</a></h4><div><p>現在のポート情報</p> +</div></li></ul></section></section></div><div class="col-4 col-menu menu-sticky-wrap menu-highlight"><nav class="tsd-navigation primary"><ul><li class=""><a href="../modules.html">Exports</a></li></ul></nav><nav class="tsd-navigation secondary menu-sticky"><ul><li class="current tsd-kind-class"><a href="I2CAccess.html" class="tsd-kind-icon">I2CAccess</a><ul><li class="tsd-kind-constructor tsd-parent-kind-class"><a href="I2CAccess.html#constructor" class="tsd-kind-icon">constructor</a></li><li class="tsd-kind-property tsd-parent-kind-class tsd-is-private"><a href="I2CAccess.html#_ports" class="tsd-kind-icon">_ports</a></li><li class="tsd-kind-get-signature tsd-parent-kind-class"><a href="I2CAccess.html#ports" class="tsd-kind-icon">ports</a></li></ul></li></ul></nav></div></div></div><footer class="with-border-bottom"><div class="container"><h2>Legend</h2><div class="tsd-legend-group"><ul class="tsd-legend"><li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li><li class="tsd-kind-method tsd-parent-kind-interface"><span class="tsd-kind-icon">Method</span></li></ul><ul class="tsd-legend"><li class="tsd-kind-constructor tsd-parent-kind-class"><span class="tsd-kind-icon">Constructor</span></li><li class="tsd-kind-method tsd-parent-kind-class"><span class="tsd-kind-icon">Method</span></li></ul><ul class="tsd-legend"><li class="tsd-kind-constructor tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited constructor</span></li></ul><ul class="tsd-legend"><li class="tsd-kind-property tsd-parent-kind-class tsd-is-private"><span class="tsd-kind-icon">Private property</span></li></ul></div><h2>Settings</h2><p>Theme <select id="theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></p></div></footer><div class="container tsd-generator"><p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></div><div class="overlay"></div><script src="../assets/main.js"></script></body></html> \ No newline at end of file diff --git a/docs/classes/I2CPort.html b/docs/classes/I2CPort.html index f6ee90a..fd2d8b7 100644 --- a/docs/classes/I2CPort.html +++ b/docs/classes/I2CPort.html @@ -1 +1,18 @@ -<!DOCTYPE html><html class="default"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>I2CPort | node-web-i2c</title><meta name="description" content="Documentation for node-web-i2c"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script async src="../assets/search.js" id="search-script"></script></head><body><script>document.body.classList.add(localStorage.getItem("tsd-theme") || "os")</script><header><div class="tsd-page-toolbar"><div class="container"><div class="table-wrap"><div class="table-cell" id="tsd-search" data-base=".."><div class="field"><label for="tsd-search-field" class="tsd-widget search no-caption">Search</label><input type="text" id="tsd-search-field"/></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">node-web-i2c</a></div><div class="table-cell" id="tsd-widgets"><div id="tsd-filter"><a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a><div class="tsd-filter-group"><div class="tsd-select" id="tsd-filter-visibility"><span class="tsd-select-label">All</span><ul class="tsd-select-list"><li data-value="public">Public</li><li data-value="protected">Public/Protected</li><li data-value="private" class="selected">All</li></ul></div> <input type="checkbox" id="tsd-filter-inherited" checked/><label class="tsd-widget" for="tsd-filter-inherited">Inherited</label><input type="checkbox" id="tsd-filter-externals" checked/><label class="tsd-widget" for="tsd-filter-externals">Externals</label></div></div><a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a></div></div></div></div><div class="tsd-page-title"><div class="container"><ul class="tsd-breadcrumb"><li><a href="../modules.html">node-web-i2c</a></li><li><a href="I2CPort.html">I2CPort</a></li></ul><h1>Class I2CPort</h1></div></div></header><div class="container container-main"><div class="row"><div class="col-8 col-content"><section class="tsd-panel tsd-hierarchy"><h3>Hierarchy</h3><ul class="tsd-hierarchy"><li><span class="target">I2CPort</span></li></ul></section><section class="tsd-panel-group tsd-index-group"><h2>Index</h2><section class="tsd-panel tsd-index-panel"><div class="tsd-index-content"><section class="tsd-index-section "><h3>Constructors</h3><ul class="tsd-index-list"><li class="tsd-kind-constructor tsd-parent-kind-class"><a href="I2CPort.html#constructor" class="tsd-kind-icon">constructor</a></li></ul></section><section class="tsd-index-section tsd-is-private tsd-is-private-protected"><h3>Properties</h3><ul class="tsd-index-list"><li class="tsd-kind-property tsd-parent-kind-class tsd-is-private"><a href="I2CPort.html#_portNumber" class="tsd-kind-icon">_port<wbr/>Number</a></li></ul></section><section class="tsd-index-section "><h3>Accessors</h3><ul class="tsd-index-list"><li class="tsd-kind-get-signature tsd-parent-kind-class"><a href="I2CPort.html#portName" class="tsd-kind-icon">port<wbr/>Name</a></li><li class="tsd-kind-get-signature tsd-parent-kind-class"><a href="I2CPort.html#portNumber" class="tsd-kind-icon">port<wbr/>Number</a></li></ul></section><section class="tsd-index-section "><h3>Methods</h3><ul class="tsd-index-list"><li class="tsd-kind-method tsd-parent-kind-class"><a href="I2CPort.html#open" class="tsd-kind-icon">open</a></li></ul></section></div></section></section><section class="tsd-panel-group tsd-member-group "><h2>Constructors</h2><section class="tsd-panel tsd-member tsd-kind-constructor tsd-parent-kind-class"><a id="constructor" class="tsd-anchor"></a><h3>constructor</h3><ul class="tsd-signatures tsd-kind-constructor tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">new <wbr/>I2CPort<span class="tsd-signature-symbol">(</span>portNumber<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="I2CPort.html" class="tsd-signature-type" data-tsd-kind="Class">I2CPort</a></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in index.ts:41</li></ul></aside><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>portNumber: <span class="tsd-signature-type">number</span></h5></li></ul><h4 class="tsd-returns-title">Returns <a href="I2CPort.html" class="tsd-signature-type" data-tsd-kind="Class">I2CPort</a></h4></li></ul></section></section><section class="tsd-panel-group tsd-member-group tsd-is-private tsd-is-private-protected"><h2>Properties</h2><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-private"><a id="_portNumber" class="tsd-anchor"></a><h3><span class="tsd-flag ts-flagPrivate">Private</span> <span class="tsd-flag ts-flagReadonly">Readonly</span> _port<wbr/>Number</h3><div class="tsd-signature tsd-kind-icon">_port<wbr/>Number<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources"><ul><li>Defined in index.ts:39</li></ul></aside></section></section><section class="tsd-panel-group tsd-member-group "><h2>Accessors</h2><section class="tsd-panel tsd-member tsd-kind-get-signature tsd-parent-kind-class"><a id="portName" class="tsd-anchor"></a><h3>port<wbr/>Name</h3><ul class="tsd-signatures tsd-kind-get-signature tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">get</span> portName<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in index.ts:49</li></ul></aside><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">string</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-get-signature tsd-parent-kind-class"><a id="portNumber" class="tsd-anchor"></a><h3>port<wbr/>Number</h3><ul class="tsd-signatures tsd-kind-get-signature tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">get</span> portNumber<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in index.ts:45</li></ul></aside><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4></li></ul></section></section><section class="tsd-panel-group tsd-member-group "><h2>Methods</h2><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="open" class="tsd-anchor"></a><h3>open</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">open<span class="tsd-signature-symbol">(</span>slaveAddress<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><a href="../interfaces/I2CSlaveDevice.html" class="tsd-signature-type" data-tsd-kind="Interface">I2CSlaveDevice</a><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in index.ts:53</li></ul></aside><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>slaveAddress: <span class="tsd-signature-type">number</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><a href="../interfaces/I2CSlaveDevice.html" class="tsd-signature-type" data-tsd-kind="Interface">I2CSlaveDevice</a><span class="tsd-signature-symbol">></span></h4></li></ul></section></section></div><div class="col-4 col-menu menu-sticky-wrap menu-highlight"><nav class="tsd-navigation primary"><ul><li class=""><a href="../modules.html">Exports</a></li></ul></nav><nav class="tsd-navigation secondary menu-sticky"><ul><li class="current tsd-kind-class"><a href="I2CPort.html" class="tsd-kind-icon">I2CPort</a><ul><li class="tsd-kind-constructor tsd-parent-kind-class"><a href="I2CPort.html#constructor" class="tsd-kind-icon">constructor</a></li><li class="tsd-kind-property tsd-parent-kind-class tsd-is-private"><a href="I2CPort.html#_portNumber" class="tsd-kind-icon">_port<wbr/>Number</a></li><li class="tsd-kind-get-signature tsd-parent-kind-class"><a href="I2CPort.html#portName" class="tsd-kind-icon">port<wbr/>Name</a></li><li class="tsd-kind-get-signature tsd-parent-kind-class"><a href="I2CPort.html#portNumber" class="tsd-kind-icon">port<wbr/>Number</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="I2CPort.html#open" class="tsd-kind-icon">open</a></li></ul></li></ul></nav></div></div></div><footer class="with-border-bottom"><div class="container"><h2>Legend</h2><div class="tsd-legend-group"><ul class="tsd-legend"><li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li><li class="tsd-kind-method tsd-parent-kind-interface"><span class="tsd-kind-icon">Method</span></li></ul><ul class="tsd-legend"><li class="tsd-kind-constructor tsd-parent-kind-class"><span class="tsd-kind-icon">Constructor</span></li><li class="tsd-kind-method tsd-parent-kind-class"><span class="tsd-kind-icon">Method</span></li></ul><ul class="tsd-legend"><li class="tsd-kind-constructor tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited constructor</span></li></ul><ul class="tsd-legend"><li class="tsd-kind-property tsd-parent-kind-class tsd-is-private"><span class="tsd-kind-icon">Private property</span></li></ul></div><h2>Settings</h2><p>Theme <select id="theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></p></div></footer><div class="container tsd-generator"><p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></div><div class="overlay"></div><script src="../assets/main.js"></script></body></html> \ No newline at end of file +<!DOCTYPE html><html class="default"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>I2CPort | node-web-i2c</title><meta name="description" content="Documentation for node-web-i2c"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script async src="../assets/search.js" id="search-script"></script></head><body><script>document.body.classList.add(localStorage.getItem("tsd-theme") || "os")</script><header><div class="tsd-page-toolbar"><div class="container"><div class="table-wrap"><div class="table-cell" id="tsd-search" data-base=".."><div class="field"><label for="tsd-search-field" class="tsd-widget search no-caption">Search</label><input type="text" id="tsd-search-field"/></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">node-web-i2c</a></div><div class="table-cell" id="tsd-widgets"><div id="tsd-filter"><a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a><div class="tsd-filter-group"><div class="tsd-select" id="tsd-filter-visibility"><span class="tsd-select-label">All</span><ul class="tsd-select-list"><li data-value="public">Public</li><li data-value="protected">Public/Protected</li><li data-value="private" class="selected">All</li></ul></div> <input type="checkbox" id="tsd-filter-inherited" checked/><label class="tsd-widget" for="tsd-filter-inherited">Inherited</label><input type="checkbox" id="tsd-filter-externals" checked/><label class="tsd-widget" for="tsd-filter-externals">Externals</label></div></div><a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a></div></div></div></div><div class="tsd-page-title"><div class="container"><ul class="tsd-breadcrumb"><li><a href="../modules.html">node-web-i2c</a></li><li><a href="I2CPort.html">I2CPort</a></li></ul><h1>Class I2CPort</h1></div></div></header><div class="container container-main"><div class="row"><div class="col-8 col-content"><section class="tsd-panel tsd-comment"><div class="tsd-comment tsd-typography"><div class="lead"> +<p>I2CPort クラス定義</p> +</div></div></section><section class="tsd-panel tsd-hierarchy"><h3>Hierarchy</h3><ul class="tsd-hierarchy"><li><span class="target">I2CPort</span></li></ul></section><section class="tsd-panel-group tsd-index-group"><h2>Index</h2><section class="tsd-panel tsd-index-panel"><div class="tsd-index-content"><section class="tsd-index-section "><h3>Constructors</h3><ul class="tsd-index-list"><li class="tsd-kind-constructor tsd-parent-kind-class"><a href="I2CPort.html#constructor" class="tsd-kind-icon">constructor</a></li></ul></section><section class="tsd-index-section tsd-is-private tsd-is-private-protected"><h3>Properties</h3><ul class="tsd-index-list"><li class="tsd-kind-property tsd-parent-kind-class tsd-is-private"><a href="I2CPort.html#_portNumber" class="tsd-kind-icon">_port<wbr/>Number</a></li></ul></section><section class="tsd-index-section "><h3>Accessors</h3><ul class="tsd-index-list"><li class="tsd-kind-get-signature tsd-parent-kind-class"><a href="I2CPort.html#portName" class="tsd-kind-icon">port<wbr/>Name</a></li><li class="tsd-kind-get-signature tsd-parent-kind-class"><a href="I2CPort.html#portNumber" class="tsd-kind-icon">port<wbr/>Number</a></li></ul></section><section class="tsd-index-section "><h3>Methods</h3><ul class="tsd-index-list"><li class="tsd-kind-method tsd-parent-kind-class"><a href="I2CPort.html#open" class="tsd-kind-icon">open</a></li></ul></section></div></section></section><section class="tsd-panel-group tsd-member-group "><h2>Constructors</h2><section class="tsd-panel tsd-member tsd-kind-constructor tsd-parent-kind-class"><a id="constructor" class="tsd-anchor"></a><h3>constructor</h3><ul class="tsd-signatures tsd-kind-constructor tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">new <wbr/>I2CPort<span class="tsd-signature-symbol">(</span>portNumber<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="I2CPort.html" class="tsd-signature-type" data-tsd-kind="Class">I2CPort</a></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in index.ts:74</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead"> +<p>Creates an instance of GPIOPort.</p> +</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>portNumber: <span class="tsd-signature-type">number</span></h5><div class="tsd-comment tsd-typography"><div class="lead"> +<p>ポート番号</p> +</div></div></li></ul><h4 class="tsd-returns-title">Returns <a href="I2CPort.html" class="tsd-signature-type" data-tsd-kind="Class">I2CPort</a></h4></li></ul></section></section><section class="tsd-panel-group tsd-member-group tsd-is-private tsd-is-private-protected"><h2>Properties</h2><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-private"><a id="_portNumber" class="tsd-anchor"></a><h3><span class="tsd-flag ts-flagPrivate">Private</span> <span class="tsd-flag ts-flagReadonly">Readonly</span> _port<wbr/>Number</h3><div class="tsd-signature tsd-kind-icon">_port<wbr/>Number<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources"><ul><li>Defined in index.ts:68</li></ul></aside></section></section><section class="tsd-panel-group tsd-member-group "><h2>Accessors</h2><section class="tsd-panel tsd-member tsd-kind-get-signature tsd-parent-kind-class"><a id="portName" class="tsd-anchor"></a><h3>port<wbr/>Name</h3><ul class="tsd-signatures tsd-kind-get-signature tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">get</span> portName<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in index.ts:90</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead"> +<p>ポート名取得処理</p> +</div></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">string</span></h4><div><p>現在のポート名</p> +</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-get-signature tsd-parent-kind-class"><a id="portNumber" class="tsd-anchor"></a><h3>port<wbr/>Number</h3><ul class="tsd-signatures tsd-kind-get-signature tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">get</span> portNumber<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in index.ts:82</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead"> +<p>ポート番号取得処理</p> +</div></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><div><p>現在のポート番号</p> +</div></li></ul></section></section><section class="tsd-panel-group tsd-member-group "><h2>Methods</h2><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="open" class="tsd-anchor"></a><h3>open</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">open<span class="tsd-signature-symbol">(</span>slaveAddress<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><a href="../interfaces/I2CSlaveDevice.html" class="tsd-signature-type" data-tsd-kind="Interface">I2CSlaveDevice</a><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in index.ts:99</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead"> +<p>I2CSlave 接続デバイスオープン処理</p> +</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>slaveAddress: <span class="tsd-signature-type">number</span></h5><div class="tsd-comment tsd-typography"><div class="lead"> +<p>接続デバイス情報のアドレス</p> +</div></div></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><a href="../interfaces/I2CSlaveDevice.html" class="tsd-signature-type" data-tsd-kind="Interface">I2CSlaveDevice</a><span class="tsd-signature-symbol">></span></h4><div><p>I2CSlave 接続デバイス情報の Promise</p> +</div></li></ul></section></section></div><div class="col-4 col-menu menu-sticky-wrap menu-highlight"><nav class="tsd-navigation primary"><ul><li class=""><a href="../modules.html">Exports</a></li></ul></nav><nav class="tsd-navigation secondary menu-sticky"><ul><li class="current tsd-kind-class"><a href="I2CPort.html" class="tsd-kind-icon">I2CPort</a><ul><li class="tsd-kind-constructor tsd-parent-kind-class"><a href="I2CPort.html#constructor" class="tsd-kind-icon">constructor</a></li><li class="tsd-kind-property tsd-parent-kind-class tsd-is-private"><a href="I2CPort.html#_portNumber" class="tsd-kind-icon">_port<wbr/>Number</a></li><li class="tsd-kind-get-signature tsd-parent-kind-class"><a href="I2CPort.html#portName" class="tsd-kind-icon">port<wbr/>Name</a></li><li class="tsd-kind-get-signature tsd-parent-kind-class"><a href="I2CPort.html#portNumber" class="tsd-kind-icon">port<wbr/>Number</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="I2CPort.html#open" class="tsd-kind-icon">open</a></li></ul></li></ul></nav></div></div></div><footer class="with-border-bottom"><div class="container"><h2>Legend</h2><div class="tsd-legend-group"><ul class="tsd-legend"><li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li><li class="tsd-kind-method tsd-parent-kind-interface"><span class="tsd-kind-icon">Method</span></li></ul><ul class="tsd-legend"><li class="tsd-kind-constructor tsd-parent-kind-class"><span class="tsd-kind-icon">Constructor</span></li><li class="tsd-kind-method tsd-parent-kind-class"><span class="tsd-kind-icon">Method</span></li></ul><ul class="tsd-legend"><li class="tsd-kind-constructor tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited constructor</span></li></ul><ul class="tsd-legend"><li class="tsd-kind-property tsd-parent-kind-class tsd-is-private"><span class="tsd-kind-icon">Private property</span></li></ul></div><h2>Settings</h2><p>Theme <select id="theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></p></div></footer><div class="container tsd-generator"><p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></div><div class="overlay"></div><script src="../assets/main.js"></script></body></html> \ No newline at end of file diff --git a/docs/classes/I2CPortMap.html b/docs/classes/I2CPortMap.html index 650dc1a..3117aea 100644 --- a/docs/classes/I2CPortMap.html +++ b/docs/classes/I2CPortMap.html @@ -4,7 +4,7 @@ <p>Returns an iterable of entries in the map.</p> </div></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">IterableIterator</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">, </span><a href="I2CPort.html" class="tsd-signature-type" data-tsd-kind="Class">I2CPort</a><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">></span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-external"><a id="clear" class="tsd-anchor"></a><h3>clear</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-external"><li class="tsd-signature tsd-kind-icon">clear<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from Map.clear</p><ul><li>Defined in node_modules/typescript/lib/lib.es2015.collection.d.ts:22</li></ul></aside><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-external"><a id="delete" class="tsd-anchor"></a><h3>delete</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-external"><li class="tsd-signature tsd-kind-icon">delete<span class="tsd-signature-symbol">(</span>key<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from Map.delete</p><ul><li>Defined in node_modules/typescript/lib/lib.es2015.collection.d.ts:23</li></ul></aside><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>key: <span class="tsd-signature-type">number</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-external"><a id="entries" class="tsd-anchor"></a><h3>entries</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-external"><li class="tsd-signature tsd-kind-icon">entries<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">IterableIterator</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">, </span><a href="I2CPort.html" class="tsd-signature-type" data-tsd-kind="Class">I2CPort</a><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from Map.entries</p><ul><li>Defined in node_modules/typescript/lib/lib.es2015.iterable.d.ts:126</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead"> <p>Returns an iterable of key, value pairs for every entry in the map.</p> -</div></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">IterableIterator</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">, </span><a href="I2CPort.html" class="tsd-signature-type" data-tsd-kind="Class">I2CPort</a><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">></span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-external"><a id="forEach" class="tsd-anchor"></a><h3>for<wbr/>Each</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-external"><li class="tsd-signature tsd-kind-icon">for<wbr/>Each<span class="tsd-signature-symbol">(</span>callbackfn<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span>value<span class="tsd-signature-symbol">: </span><a href="I2CPort.html" class="tsd-signature-type" data-tsd-kind="Class">I2CPort</a>, key<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, map<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Map</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">, </span><a href="I2CPort.html" class="tsd-signature-type" data-tsd-kind="Class">I2CPort</a><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type">void</span>, thisArg<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from Map.forEach</p><ul><li>Defined in node_modules/typescript/lib/lib.es2015.collection.d.ts:24</li></ul></aside><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>callbackfn: <span class="tsd-signature-symbol">(</span>value<span class="tsd-signature-symbol">: </span><a href="I2CPort.html" class="tsd-signature-type" data-tsd-kind="Class">I2CPort</a>, key<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, map<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Map</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">, </span><a href="I2CPort.html" class="tsd-signature-type" data-tsd-kind="Class">I2CPort</a><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type">void</span></h5><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-kind-type-literal tsd-is-external"><li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">(</span>value<span class="tsd-signature-symbol">: </span><a href="I2CPort.html" class="tsd-signature-type" data-tsd-kind="Class">I2CPort</a>, key<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, map<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Map</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">, </span><a href="I2CPort.html" class="tsd-signature-type" data-tsd-kind="Class">I2CPort</a><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>value: <a href="I2CPort.html" class="tsd-signature-type" data-tsd-kind="Class">I2CPort</a></h5></li><li><h5>key: <span class="tsd-signature-type">number</span></h5></li><li><h5>map: <span class="tsd-signature-type">Map</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">, </span><a href="I2CPort.html" class="tsd-signature-type" data-tsd-kind="Class">I2CPort</a><span class="tsd-signature-symbol">></span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> thisArg: <span class="tsd-signature-type">any</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-external"><a id="get" class="tsd-anchor"></a><h3>get</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-external"><li class="tsd-signature tsd-kind-icon">get<span class="tsd-signature-symbol">(</span>key<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><a href="I2CPort.html" class="tsd-signature-type" data-tsd-kind="Class">I2CPort</a></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from Map.get</p><ul><li>Defined in node_modules/typescript/lib/lib.es2015.collection.d.ts:25</li></ul></aside><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>key: <span class="tsd-signature-type">number</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><a href="I2CPort.html" class="tsd-signature-type" data-tsd-kind="Class">I2CPort</a></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="getByName" class="tsd-anchor"></a><h3>get<wbr/>By<wbr/>Name</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">get<wbr/>By<wbr/>Name<span class="tsd-signature-symbol">(</span>portName<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><a href="I2CPort.html" class="tsd-signature-type" data-tsd-kind="Class">I2CPort</a></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in index.ts:32</li></ul></aside><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>portName: <span class="tsd-signature-type">string</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><a href="I2CPort.html" class="tsd-signature-type" data-tsd-kind="Class">I2CPort</a></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-external"><a id="has" class="tsd-anchor"></a><h3>has</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-external"><li class="tsd-signature tsd-kind-icon">has<span class="tsd-signature-symbol">(</span>key<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from Map.has</p><ul><li>Defined in node_modules/typescript/lib/lib.es2015.collection.d.ts:26</li></ul></aside><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>key: <span class="tsd-signature-type">number</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-external"><a id="keys" class="tsd-anchor"></a><h3>keys</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-external"><li class="tsd-signature tsd-kind-icon">keys<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">IterableIterator</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from Map.keys</p><ul><li>Defined in node_modules/typescript/lib/lib.es2015.iterable.d.ts:131</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead"> +</div></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">IterableIterator</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">, </span><a href="I2CPort.html" class="tsd-signature-type" data-tsd-kind="Class">I2CPort</a><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">></span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-external"><a id="forEach" class="tsd-anchor"></a><h3>for<wbr/>Each</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-external"><li class="tsd-signature tsd-kind-icon">for<wbr/>Each<span class="tsd-signature-symbol">(</span>callbackfn<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span>value<span class="tsd-signature-symbol">: </span><a href="I2CPort.html" class="tsd-signature-type" data-tsd-kind="Class">I2CPort</a>, key<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, map<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Map</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">, </span><a href="I2CPort.html" class="tsd-signature-type" data-tsd-kind="Class">I2CPort</a><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type">void</span>, thisArg<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from Map.forEach</p><ul><li>Defined in node_modules/typescript/lib/lib.es2015.collection.d.ts:24</li></ul></aside><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>callbackfn: <span class="tsd-signature-symbol">(</span>value<span class="tsd-signature-symbol">: </span><a href="I2CPort.html" class="tsd-signature-type" data-tsd-kind="Class">I2CPort</a>, key<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, map<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Map</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">, </span><a href="I2CPort.html" class="tsd-signature-type" data-tsd-kind="Class">I2CPort</a><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type">void</span></h5><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-kind-type-literal tsd-is-external"><li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">(</span>value<span class="tsd-signature-symbol">: </span><a href="I2CPort.html" class="tsd-signature-type" data-tsd-kind="Class">I2CPort</a>, key<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, map<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Map</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">, </span><a href="I2CPort.html" class="tsd-signature-type" data-tsd-kind="Class">I2CPort</a><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>value: <a href="I2CPort.html" class="tsd-signature-type" data-tsd-kind="Class">I2CPort</a></h5></li><li><h5>key: <span class="tsd-signature-type">number</span></h5></li><li><h5>map: <span class="tsd-signature-type">Map</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">, </span><a href="I2CPort.html" class="tsd-signature-type" data-tsd-kind="Class">I2CPort</a><span class="tsd-signature-symbol">></span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> thisArg: <span class="tsd-signature-type">any</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-external"><a id="get" class="tsd-anchor"></a><h3>get</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-external"><li class="tsd-signature tsd-kind-icon">get<span class="tsd-signature-symbol">(</span>key<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><a href="I2CPort.html" class="tsd-signature-type" data-tsd-kind="Class">I2CPort</a></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from Map.get</p><ul><li>Defined in node_modules/typescript/lib/lib.es2015.collection.d.ts:25</li></ul></aside><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>key: <span class="tsd-signature-type">number</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><a href="I2CPort.html" class="tsd-signature-type" data-tsd-kind="Class">I2CPort</a></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="getByName" class="tsd-anchor"></a><h3>get<wbr/>By<wbr/>Name</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">get<wbr/>By<wbr/>Name<span class="tsd-signature-symbol">(</span>portName<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><a href="I2CPort.html" class="tsd-signature-type" data-tsd-kind="Class">I2CPort</a></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in index.ts:58</li></ul></aside><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>portName: <span class="tsd-signature-type">string</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><a href="I2CPort.html" class="tsd-signature-type" data-tsd-kind="Class">I2CPort</a></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-external"><a id="has" class="tsd-anchor"></a><h3>has</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-external"><li class="tsd-signature tsd-kind-icon">has<span class="tsd-signature-symbol">(</span>key<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from Map.has</p><ul><li>Defined in node_modules/typescript/lib/lib.es2015.collection.d.ts:26</li></ul></aside><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>key: <span class="tsd-signature-type">number</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-external"><a id="keys" class="tsd-anchor"></a><h3>keys</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-external"><li class="tsd-signature tsd-kind-icon">keys<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">IterableIterator</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from Map.keys</p><ul><li>Defined in node_modules/typescript/lib/lib.es2015.iterable.d.ts:131</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead"> <p>Returns an iterable of keys in the map</p> </div></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">IterableIterator</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">></span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-external"><a id="set" class="tsd-anchor"></a><h3>set</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-external"><li class="tsd-signature tsd-kind-icon">set<span class="tsd-signature-symbol">(</span>key<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, value<span class="tsd-signature-symbol">: </span><a href="I2CPort.html" class="tsd-signature-type" data-tsd-kind="Class">I2CPort</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="I2CPortMap.html" class="tsd-signature-type" data-tsd-kind="Class">I2CPortMap</a></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from Map.set</p><ul><li>Defined in node_modules/typescript/lib/lib.es2015.collection.d.ts:27</li></ul></aside><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>key: <span class="tsd-signature-type">number</span></h5></li><li><h5>value: <a href="I2CPort.html" class="tsd-signature-type" data-tsd-kind="Class">I2CPort</a></h5></li></ul><h4 class="tsd-returns-title">Returns <a href="I2CPortMap.html" class="tsd-signature-type" data-tsd-kind="Class">I2CPortMap</a></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-external"><a id="values" class="tsd-anchor"></a><h3>values</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-external"><li class="tsd-signature tsd-kind-icon">values<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">IterableIterator</span><span class="tsd-signature-symbol"><</span><a href="I2CPort.html" class="tsd-signature-type" data-tsd-kind="Class">I2CPort</a><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from Map.values</p><ul><li>Defined in node_modules/typescript/lib/lib.es2015.iterable.d.ts:136</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead"> <p>Returns an iterable of values in the map</p> diff --git a/docs/classes/OperationError.html b/docs/classes/OperationError.html index ff6de61..8b2de8b 100644 --- a/docs/classes/OperationError.html +++ b/docs/classes/OperationError.html @@ -1,4 +1,10 @@ -<!DOCTYPE html><html class="default"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>OperationError | node-web-i2c</title><meta name="description" content="Documentation for node-web-i2c"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script async src="../assets/search.js" id="search-script"></script></head><body><script>document.body.classList.add(localStorage.getItem("tsd-theme") || "os")</script><header><div class="tsd-page-toolbar"><div class="container"><div class="table-wrap"><div class="table-cell" id="tsd-search" data-base=".."><div class="field"><label for="tsd-search-field" class="tsd-widget search no-caption">Search</label><input type="text" id="tsd-search-field"/></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">node-web-i2c</a></div><div class="table-cell" id="tsd-widgets"><div id="tsd-filter"><a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a><div class="tsd-filter-group"><div class="tsd-select" id="tsd-filter-visibility"><span class="tsd-select-label">All</span><ul class="tsd-select-list"><li data-value="public">Public</li><li data-value="protected">Public/Protected</li><li data-value="private" class="selected">All</li></ul></div> <input type="checkbox" id="tsd-filter-inherited" checked/><label class="tsd-widget" for="tsd-filter-inherited">Inherited</label><input type="checkbox" id="tsd-filter-externals" checked/><label class="tsd-widget" for="tsd-filter-externals">Externals</label></div></div><a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a></div></div></div></div><div class="tsd-page-title"><div class="container"><ul class="tsd-breadcrumb"><li><a href="../modules.html">node-web-i2c</a></li><li><a href="OperationError.html">OperationError</a></li></ul><h1>Class OperationError</h1></div></div></header><div class="container container-main"><div class="row"><div class="col-8 col-content"><section class="tsd-panel tsd-hierarchy"><h3>Hierarchy</h3><ul class="tsd-hierarchy"><li><span class="tsd-signature-type">Error</span><ul class="tsd-hierarchy"><li><span class="target">OperationError</span></li></ul></li></ul></section><section class="tsd-panel-group tsd-index-group"><h2>Index</h2><section class="tsd-panel tsd-index-panel"><div class="tsd-index-content"><section class="tsd-index-section "><h3>Constructors</h3><ul class="tsd-index-list"><li class="tsd-kind-constructor tsd-parent-kind-class tsd-is-overwrite"><a href="OperationError.html#constructor" class="tsd-kind-icon">constructor</a></li></ul></section><section class="tsd-index-section tsd-is-inherited tsd-is-external"><h3>Properties</h3><ul class="tsd-index-list"><li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited tsd-is-external"><a href="OperationError.html#message" class="tsd-kind-icon">message</a></li><li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited tsd-is-external"><a href="OperationError.html#name" class="tsd-kind-icon">name</a></li><li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited tsd-is-external"><a href="OperationError.html#stack" class="tsd-kind-icon">stack</a></li><li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited tsd-is-static tsd-is-external"><a href="OperationError.html#prepareStackTrace" class="tsd-kind-icon">prepare<wbr/>Stack<wbr/>Trace</a></li><li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited tsd-is-static tsd-is-external"><a href="OperationError.html#stackTraceLimit" class="tsd-kind-icon">stack<wbr/>Trace<wbr/>Limit</a></li></ul></section><section class="tsd-index-section tsd-is-inherited tsd-is-external"><h3>Methods</h3><ul class="tsd-index-list"><li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-static tsd-is-external"><a href="OperationError.html#captureStackTrace" class="tsd-kind-icon">capture<wbr/>Stack<wbr/>Trace</a></li></ul></section></div></section></section><section class="tsd-panel-group tsd-member-group "><h2>Constructors</h2><section class="tsd-panel tsd-member tsd-kind-constructor tsd-parent-kind-class tsd-is-overwrite"><a id="constructor" class="tsd-anchor"></a><h3>constructor</h3><ul class="tsd-signatures tsd-kind-constructor tsd-parent-kind-class tsd-is-overwrite"><li class="tsd-signature tsd-kind-icon">new <wbr/>Operation<wbr/>Error<span class="tsd-signature-symbol">(</span>message<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="OperationError.html" class="tsd-signature-type" data-tsd-kind="Class">OperationError</a></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Overrides Error.constructor</p><ul><li>Defined in index.ts:152</li></ul></aside><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>message: <span class="tsd-signature-type">string</span></h5></li></ul><h4 class="tsd-returns-title">Returns <a href="OperationError.html" class="tsd-signature-type" data-tsd-kind="Class">OperationError</a></h4></li></ul></section></section><section class="tsd-panel-group tsd-member-group tsd-is-inherited tsd-is-external"><h2>Properties</h2><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-inherited tsd-is-external"><a id="message" class="tsd-anchor"></a><h3>message</h3><div class="tsd-signature tsd-kind-icon">message<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><p>Inherited from Error.message</p><ul><li>Defined in node_modules/typescript/lib/lib.es5.d.ts:1023</li></ul></aside></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-inherited tsd-is-external"><a id="name" class="tsd-anchor"></a><h3>name</h3><div class="tsd-signature tsd-kind-icon">name<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><p>Inherited from Error.name</p><ul><li>Defined in node_modules/typescript/lib/lib.es5.d.ts:1022</li></ul></aside></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-inherited tsd-is-external"><a id="stack" class="tsd-anchor"></a><h3><span class="tsd-flag ts-flagOptional">Optional</span> stack</h3><div class="tsd-signature tsd-kind-icon">stack<span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><p>Inherited from Error.stack</p><ul><li>Defined in node_modules/typescript/lib/lib.es5.d.ts:1024</li></ul></aside></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-inherited tsd-is-static tsd-is-external"><a id="prepareStackTrace" class="tsd-anchor"></a><h3><span class="tsd-flag ts-flagStatic">Static</span> <span class="tsd-flag ts-flagOptional">Optional</span> prepare<wbr/>Stack<wbr/>Trace</h3><div class="tsd-signature tsd-kind-icon">prepare<wbr/>Stack<wbr/>Trace<span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-symbol">(</span>err<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Error</span>, stackTraces<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">CallSite</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type">any</span></div><aside class="tsd-sources"><p>Inherited from Error.prepareStackTrace</p><ul><li>Defined in node_modules/@types/node/globals.d.ts:11</li></ul></aside><div class="tsd-type-declaration"><h4>Type declaration</h4><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-kind-type-literal tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">(</span>err<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Error</span>, stackTraces<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">CallSite</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><div class="tsd-comment tsd-typography"><div class="lead"> +<!DOCTYPE html><html class="default"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>OperationError | node-web-i2c</title><meta name="description" content="Documentation for node-web-i2c"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script async src="../assets/search.js" id="search-script"></script></head><body><script>document.body.classList.add(localStorage.getItem("tsd-theme") || "os")</script><header><div class="tsd-page-toolbar"><div class="container"><div class="table-wrap"><div class="table-cell" id="tsd-search" data-base=".."><div class="field"><label for="tsd-search-field" class="tsd-widget search no-caption">Search</label><input type="text" id="tsd-search-field"/></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">node-web-i2c</a></div><div class="table-cell" id="tsd-widgets"><div id="tsd-filter"><a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a><div class="tsd-filter-group"><div class="tsd-select" id="tsd-filter-visibility"><span class="tsd-select-label">All</span><ul class="tsd-select-list"><li data-value="public">Public</li><li data-value="protected">Public/Protected</li><li data-value="private" class="selected">All</li></ul></div> <input type="checkbox" id="tsd-filter-inherited" checked/><label class="tsd-widget" for="tsd-filter-inherited">Inherited</label><input type="checkbox" id="tsd-filter-externals" checked/><label class="tsd-widget" for="tsd-filter-externals">Externals</label></div></div><a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a></div></div></div></div><div class="tsd-page-title"><div class="container"><ul class="tsd-breadcrumb"><li><a href="../modules.html">node-web-i2c</a></li><li><a href="OperationError.html">OperationError</a></li></ul><h1>Class OperationError</h1></div></div></header><div class="container container-main"><div class="row"><div class="col-8 col-content"><section class="tsd-panel tsd-comment"><div class="tsd-comment tsd-typography"><div class="lead"> +<p>操作エラークラス定義</p> +</div></div></section><section class="tsd-panel tsd-hierarchy"><h3>Hierarchy</h3><ul class="tsd-hierarchy"><li><span class="tsd-signature-type">Error</span><ul class="tsd-hierarchy"><li><span class="target">OperationError</span></li></ul></li></ul></section><section class="tsd-panel-group tsd-index-group"><h2>Index</h2><section class="tsd-panel tsd-index-panel"><div class="tsd-index-content"><section class="tsd-index-section "><h3>Constructors</h3><ul class="tsd-index-list"><li class="tsd-kind-constructor tsd-parent-kind-class tsd-is-overwrite"><a href="OperationError.html#constructor" class="tsd-kind-icon">constructor</a></li></ul></section><section class="tsd-index-section tsd-is-inherited tsd-is-external"><h3>Properties</h3><ul class="tsd-index-list"><li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited tsd-is-external"><a href="OperationError.html#message" class="tsd-kind-icon">message</a></li><li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited tsd-is-external"><a href="OperationError.html#name" class="tsd-kind-icon">name</a></li><li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited tsd-is-external"><a href="OperationError.html#stack" class="tsd-kind-icon">stack</a></li><li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited tsd-is-static tsd-is-external"><a href="OperationError.html#prepareStackTrace" class="tsd-kind-icon">prepare<wbr/>Stack<wbr/>Trace</a></li><li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited tsd-is-static tsd-is-external"><a href="OperationError.html#stackTraceLimit" class="tsd-kind-icon">stack<wbr/>Trace<wbr/>Limit</a></li></ul></section><section class="tsd-index-section tsd-is-inherited tsd-is-external"><h3>Methods</h3><ul class="tsd-index-list"><li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-static tsd-is-external"><a href="OperationError.html#captureStackTrace" class="tsd-kind-icon">capture<wbr/>Stack<wbr/>Trace</a></li></ul></section></div></section></section><section class="tsd-panel-group tsd-member-group "><h2>Constructors</h2><section class="tsd-panel tsd-member tsd-kind-constructor tsd-parent-kind-class tsd-is-overwrite"><a id="constructor" class="tsd-anchor"></a><h3>constructor</h3><ul class="tsd-signatures tsd-kind-constructor tsd-parent-kind-class tsd-is-overwrite"><li class="tsd-signature tsd-kind-icon">new <wbr/>Operation<wbr/>Error<span class="tsd-signature-symbol">(</span>message<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="OperationError.html" class="tsd-signature-type" data-tsd-kind="Class">OperationError</a></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Overrides Error.constructor</p><ul><li>Defined in index.ts:290</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead"> +<p>Creates an instance of OperationError.</p> +</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>message: <span class="tsd-signature-type">string</span></h5><div class="tsd-comment tsd-typography"><div class="lead"> +<p>エラーメッセージ</p> +</div></div></li></ul><h4 class="tsd-returns-title">Returns <a href="OperationError.html" class="tsd-signature-type" data-tsd-kind="Class">OperationError</a></h4></li></ul></section></section><section class="tsd-panel-group tsd-member-group tsd-is-inherited tsd-is-external"><h2>Properties</h2><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-inherited tsd-is-external"><a id="message" class="tsd-anchor"></a><h3>message</h3><div class="tsd-signature tsd-kind-icon">message<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><p>Inherited from Error.message</p><ul><li>Defined in node_modules/typescript/lib/lib.es5.d.ts:1023</li></ul></aside></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-inherited tsd-is-external"><a id="name" class="tsd-anchor"></a><h3>name</h3><div class="tsd-signature tsd-kind-icon">name<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><p>Inherited from Error.name</p><ul><li>Defined in node_modules/typescript/lib/lib.es5.d.ts:1022</li></ul></aside></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-inherited tsd-is-external"><a id="stack" class="tsd-anchor"></a><h3><span class="tsd-flag ts-flagOptional">Optional</span> stack</h3><div class="tsd-signature tsd-kind-icon">stack<span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><p>Inherited from Error.stack</p><ul><li>Defined in node_modules/typescript/lib/lib.es5.d.ts:1024</li></ul></aside></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-inherited tsd-is-static tsd-is-external"><a id="prepareStackTrace" class="tsd-anchor"></a><h3><span class="tsd-flag ts-flagStatic">Static</span> <span class="tsd-flag ts-flagOptional">Optional</span> prepare<wbr/>Stack<wbr/>Trace</h3><div class="tsd-signature tsd-kind-icon">prepare<wbr/>Stack<wbr/>Trace<span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-symbol">(</span>err<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Error</span>, stackTraces<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">CallSite</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type">any</span></div><aside class="tsd-sources"><p>Inherited from Error.prepareStackTrace</p><ul><li>Defined in node_modules/@types/node/globals.d.ts:11</li></ul></aside><div class="tsd-type-declaration"><h4>Type declaration</h4><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-kind-type-literal tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">(</span>err<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Error</span>, stackTraces<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">CallSite</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><div class="tsd-comment tsd-typography"><div class="lead"> <p>Optional override for formatting stack traces</p> </div><dl class="tsd-comment-tags"><dt>see</dt><dd><p><a href="https://v8.dev/docs/stack-trace-api#customizing-stack-traces">https://v8.dev/docs/stack-trace-api#customizing-stack-traces</a></p> </dd></dl></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>err: <span class="tsd-signature-type">Error</span></h5></li><li><h5>stackTraces: <span class="tsd-signature-type">CallSite</span><span class="tsd-signature-symbol">[]</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">any</span></h4></li></ul></li></ul></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-inherited tsd-is-static tsd-is-external"><a id="stackTraceLimit" class="tsd-anchor"></a><h3><span class="tsd-flag ts-flagStatic">Static</span> stack<wbr/>Trace<wbr/>Limit</h3><div class="tsd-signature tsd-kind-icon">stack<wbr/>Trace<wbr/>Limit<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources"><p>Inherited from Error.stackTraceLimit</p><ul><li>Defined in node_modules/@types/node/globals.d.ts:13</li></ul></aside></section></section><section class="tsd-panel-group tsd-member-group tsd-is-inherited tsd-is-external"><h2>Methods</h2><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-static tsd-is-external"><a id="captureStackTrace" class="tsd-anchor"></a><h3><span class="tsd-flag ts-flagStatic">Static</span> capture<wbr/>Stack<wbr/>Trace</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-static tsd-is-external"><li class="tsd-signature tsd-kind-icon">capture<wbr/>Stack<wbr/>Trace<span class="tsd-signature-symbol">(</span>targetObject<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">object</span>, constructorOpt<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">Function</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from Error.captureStackTrace</p><ul><li>Defined in node_modules/@types/node/globals.d.ts:4</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead"> diff --git a/docs/interfaces/I2CSlaveDevice.html b/docs/interfaces/I2CSlaveDevice.html index 9c0123f..eb40246 100644 --- a/docs/interfaces/I2CSlaveDevice.html +++ b/docs/interfaces/I2CSlaveDevice.html @@ -1,9 +1,29 @@ -<!DOCTYPE html><html class="default"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>I2CSlaveDevice | node-web-i2c</title><meta name="description" content="Documentation for node-web-i2c"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script async src="../assets/search.js" id="search-script"></script></head><body><script>document.body.classList.add(localStorage.getItem("tsd-theme") || "os")</script><header><div class="tsd-page-toolbar"><div class="container"><div class="table-wrap"><div class="table-cell" id="tsd-search" data-base=".."><div class="field"><label for="tsd-search-field" class="tsd-widget search no-caption">Search</label><input type="text" id="tsd-search-field"/></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">node-web-i2c</a></div><div class="table-cell" id="tsd-widgets"><div id="tsd-filter"><a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a><div class="tsd-filter-group"><div class="tsd-select" id="tsd-filter-visibility"><span class="tsd-select-label">All</span><ul class="tsd-select-list"><li data-value="public">Public</li><li data-value="protected">Public/Protected</li><li data-value="private" class="selected">All</li></ul></div> <input type="checkbox" id="tsd-filter-inherited" checked/><label class="tsd-widget" for="tsd-filter-inherited">Inherited</label><input type="checkbox" id="tsd-filter-externals" checked/><label class="tsd-widget" for="tsd-filter-externals">Externals</label></div></div><a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a></div></div></div></div><div class="tsd-page-title"><div class="container"><ul class="tsd-breadcrumb"><li><a href="../modules.html">node-web-i2c</a></li><li><a href="I2CSlaveDevice.html">I2CSlaveDevice</a></li></ul><h1>Interface I2CSlaveDevice</h1></div></div></header><div class="container container-main"><div class="row"><div class="col-8 col-content"><section class="tsd-panel tsd-hierarchy"><h3>Hierarchy</h3><ul class="tsd-hierarchy"><li><span class="target">I2CSlaveDevice</span></li></ul></section><section class="tsd-panel-group tsd-index-group"><h2>Index</h2><section class="tsd-panel tsd-index-panel"><div class="tsd-index-content"><section class="tsd-index-section "><h3>Properties</h3><ul class="tsd-index-list"><li class="tsd-kind-property tsd-parent-kind-interface"><a href="I2CSlaveDevice.html#slaveAddress" class="tsd-kind-icon">slave<wbr/>Address</a></li></ul></section><section class="tsd-index-section "><h3>Methods</h3><ul class="tsd-index-list"><li class="tsd-kind-method tsd-parent-kind-interface"><a href="I2CSlaveDevice.html#read16" class="tsd-kind-icon">read16</a></li><li class="tsd-kind-method tsd-parent-kind-interface"><a href="I2CSlaveDevice.html#read8" class="tsd-kind-icon">read8</a></li><li class="tsd-kind-method tsd-parent-kind-interface"><a href="I2CSlaveDevice.html#readByte" class="tsd-kind-icon">read<wbr/>Byte</a></li><li class="tsd-kind-method tsd-parent-kind-interface"><a href="I2CSlaveDevice.html#readBytes" class="tsd-kind-icon">read<wbr/>Bytes</a></li><li class="tsd-kind-method tsd-parent-kind-interface"><a href="I2CSlaveDevice.html#write16" class="tsd-kind-icon">write16</a></li><li class="tsd-kind-method tsd-parent-kind-interface"><a href="I2CSlaveDevice.html#write8" class="tsd-kind-icon">write8</a></li><li class="tsd-kind-method tsd-parent-kind-interface"><a href="I2CSlaveDevice.html#writeByte" class="tsd-kind-icon">write<wbr/>Byte</a></li><li class="tsd-kind-method tsd-parent-kind-interface"><a href="I2CSlaveDevice.html#writeBytes" class="tsd-kind-icon">write<wbr/>Bytes</a></li></ul></section></div></section></section><section class="tsd-panel-group tsd-member-group "><h2>Properties</h2><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="slaveAddress" class="tsd-anchor"></a><h3><span class="tsd-flag ts-flagReadonly">Readonly</span> slave<wbr/>Address</h3><div class="tsd-signature tsd-kind-icon">slave<wbr/>Address<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources"><ul><li>Defined in index.ts:134</li></ul></aside></section></section><section class="tsd-panel-group tsd-member-group "><h2>Methods</h2><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface"><a id="read16" class="tsd-anchor"></a><h3>read16</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-interface"><li class="tsd-signature tsd-kind-icon">read16<span class="tsd-signature-symbol">(</span>registerNumber<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in index.ts:137</li></ul></aside><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>registerNumber: <span class="tsd-signature-type">number</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">></span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface"><a id="read8" class="tsd-anchor"></a><h3>read8</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-interface"><li class="tsd-signature tsd-kind-icon">read8<span class="tsd-signature-symbol">(</span>registerNumber<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in index.ts:136</li></ul></aside><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>registerNumber: <span class="tsd-signature-type">number</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">></span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface"><a id="readByte" class="tsd-anchor"></a><h3>read<wbr/>Byte</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-interface"><li class="tsd-signature tsd-kind-icon">read<wbr/>Byte<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in index.ts:142</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead"> -<p>Different from Web I2C API specification.</p> -</div></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">></span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface"><a id="readBytes" class="tsd-anchor"></a><h3>read<wbr/>Bytes</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-interface"><li class="tsd-signature tsd-kind-icon">read<wbr/>Bytes<span class="tsd-signature-symbol">(</span>length<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">Uint8Array</span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in index.ts:144</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead"> -<p>Different from Web I2C API specification.</p> -</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>length: <span class="tsd-signature-type">number</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">Uint8Array</span><span class="tsd-signature-symbol">></span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface"><a id="write16" class="tsd-anchor"></a><h3>write16</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-interface"><li class="tsd-signature tsd-kind-icon">write16<span class="tsd-signature-symbol">(</span>registerNumber<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, value<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in index.ts:139</li></ul></aside><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>registerNumber: <span class="tsd-signature-type">number</span></h5></li><li><h5>value: <span class="tsd-signature-type">number</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">></span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface"><a id="write8" class="tsd-anchor"></a><h3>write8</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-interface"><li class="tsd-signature tsd-kind-icon">write8<span class="tsd-signature-symbol">(</span>registerNumber<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, value<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in index.ts:138</li></ul></aside><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>registerNumber: <span class="tsd-signature-type">number</span></h5></li><li><h5>value: <span class="tsd-signature-type">number</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">></span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface"><a id="writeByte" class="tsd-anchor"></a><h3>write<wbr/>Byte</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-interface"><li class="tsd-signature tsd-kind-icon">write<wbr/>Byte<span class="tsd-signature-symbol">(</span>byte<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in index.ts:146</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead"> -<p>Different from Web I2C API specification.</p> -</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>byte: <span class="tsd-signature-type">number</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">></span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface"><a id="writeBytes" class="tsd-anchor"></a><h3>write<wbr/>Bytes</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-interface"><li class="tsd-signature tsd-kind-icon">write<wbr/>Bytes<span class="tsd-signature-symbol">(</span>bytes<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">Uint8Array</span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in index.ts:148</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead"> -<p>Different from Web I2C API specification.</p> -</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>bytes: <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">Uint8Array</span><span class="tsd-signature-symbol">></span></h4></li></ul></section></section></div><div class="col-4 col-menu menu-sticky-wrap menu-highlight"><nav class="tsd-navigation primary"><ul><li class=""><a href="../modules.html">Exports</a></li></ul></nav><nav class="tsd-navigation secondary menu-sticky"><ul><li class="current tsd-kind-interface"><a href="I2CSlaveDevice.html" class="tsd-kind-icon">I2CSlave<wbr/>Device</a><ul><li class="tsd-kind-property tsd-parent-kind-interface"><a href="I2CSlaveDevice.html#slaveAddress" class="tsd-kind-icon">slave<wbr/>Address</a></li><li class="tsd-kind-method tsd-parent-kind-interface"><a href="I2CSlaveDevice.html#read16" class="tsd-kind-icon">read16</a></li><li class="tsd-kind-method tsd-parent-kind-interface"><a href="I2CSlaveDevice.html#read8" class="tsd-kind-icon">read8</a></li><li class="tsd-kind-method tsd-parent-kind-interface"><a href="I2CSlaveDevice.html#readByte" class="tsd-kind-icon">read<wbr/>Byte</a></li><li class="tsd-kind-method tsd-parent-kind-interface"><a href="I2CSlaveDevice.html#readBytes" class="tsd-kind-icon">read<wbr/>Bytes</a></li><li class="tsd-kind-method tsd-parent-kind-interface"><a href="I2CSlaveDevice.html#write16" class="tsd-kind-icon">write16</a></li><li class="tsd-kind-method tsd-parent-kind-interface"><a href="I2CSlaveDevice.html#write8" class="tsd-kind-icon">write8</a></li><li class="tsd-kind-method tsd-parent-kind-interface"><a href="I2CSlaveDevice.html#writeByte" class="tsd-kind-icon">write<wbr/>Byte</a></li><li class="tsd-kind-method tsd-parent-kind-interface"><a href="I2CSlaveDevice.html#writeBytes" class="tsd-kind-icon">write<wbr/>Bytes</a></li></ul></li></ul></nav></div></div></div><footer class="with-border-bottom"><div class="container"><h2>Legend</h2><div class="tsd-legend-group"><ul class="tsd-legend"><li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li><li class="tsd-kind-method tsd-parent-kind-interface"><span class="tsd-kind-icon">Method</span></li></ul><ul class="tsd-legend"><li class="tsd-kind-constructor tsd-parent-kind-class"><span class="tsd-kind-icon">Constructor</span></li><li class="tsd-kind-method tsd-parent-kind-class"><span class="tsd-kind-icon">Method</span></li></ul><ul class="tsd-legend"><li class="tsd-kind-constructor tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited constructor</span></li></ul><ul class="tsd-legend"><li class="tsd-kind-property tsd-parent-kind-class tsd-is-private"><span class="tsd-kind-icon">Private property</span></li></ul></div><h2>Settings</h2><p>Theme <select id="theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></p></div></footer><div class="container tsd-generator"><p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></div><div class="overlay"></div><script src="../assets/main.js"></script></body></html> \ No newline at end of file +<!DOCTYPE html><html class="default"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>I2CSlaveDevice | node-web-i2c</title><meta name="description" content="Documentation for node-web-i2c"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script async src="../assets/search.js" id="search-script"></script></head><body><script>document.body.classList.add(localStorage.getItem("tsd-theme") || "os")</script><header><div class="tsd-page-toolbar"><div class="container"><div class="table-wrap"><div class="table-cell" id="tsd-search" data-base=".."><div class="field"><label for="tsd-search-field" class="tsd-widget search no-caption">Search</label><input type="text" id="tsd-search-field"/></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">node-web-i2c</a></div><div class="table-cell" id="tsd-widgets"><div id="tsd-filter"><a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a><div class="tsd-filter-group"><div class="tsd-select" id="tsd-filter-visibility"><span class="tsd-select-label">All</span><ul class="tsd-select-list"><li data-value="public">Public</li><li data-value="protected">Public/Protected</li><li data-value="private" class="selected">All</li></ul></div> <input type="checkbox" id="tsd-filter-inherited" checked/><label class="tsd-widget" for="tsd-filter-inherited">Inherited</label><input type="checkbox" id="tsd-filter-externals" checked/><label class="tsd-widget" for="tsd-filter-externals">Externals</label></div></div><a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a></div></div></div></div><div class="tsd-page-title"><div class="container"><ul class="tsd-breadcrumb"><li><a href="../modules.html">node-web-i2c</a></li><li><a href="I2CSlaveDevice.html">I2CSlaveDevice</a></li></ul><h1>Interface I2CSlaveDevice</h1></div></div></header><div class="container container-main"><div class="row"><div class="col-8 col-content"><section class="tsd-panel tsd-comment"><div class="tsd-comment tsd-typography"><div class="lead"> +<p>I2CSlaveDevice クラス定義</p> +</div></div></section><section class="tsd-panel tsd-hierarchy"><h3>Hierarchy</h3><ul class="tsd-hierarchy"><li><span class="target">I2CSlaveDevice</span></li></ul></section><section class="tsd-panel-group tsd-index-group"><h2>Index</h2><section class="tsd-panel tsd-index-panel"><div class="tsd-index-content"><section class="tsd-index-section "><h3>Properties</h3><ul class="tsd-index-list"><li class="tsd-kind-property tsd-parent-kind-interface"><a href="I2CSlaveDevice.html#slaveAddress" class="tsd-kind-icon">slave<wbr/>Address</a></li></ul></section><section class="tsd-index-section "><h3>Methods</h3><ul class="tsd-index-list"><li class="tsd-kind-method tsd-parent-kind-interface"><a href="I2CSlaveDevice.html#read16" class="tsd-kind-icon">read16</a></li><li class="tsd-kind-method tsd-parent-kind-interface"><a href="I2CSlaveDevice.html#read8" class="tsd-kind-icon">read8</a></li><li class="tsd-kind-method tsd-parent-kind-interface"><a href="I2CSlaveDevice.html#readByte" class="tsd-kind-icon">read<wbr/>Byte</a></li><li class="tsd-kind-method tsd-parent-kind-interface"><a href="I2CSlaveDevice.html#readBytes" class="tsd-kind-icon">read<wbr/>Bytes</a></li><li class="tsd-kind-method tsd-parent-kind-interface"><a href="I2CSlaveDevice.html#write16" class="tsd-kind-icon">write16</a></li><li class="tsd-kind-method tsd-parent-kind-interface"><a href="I2CSlaveDevice.html#write8" class="tsd-kind-icon">write8</a></li><li class="tsd-kind-method tsd-parent-kind-interface"><a href="I2CSlaveDevice.html#writeByte" class="tsd-kind-icon">write<wbr/>Byte</a></li><li class="tsd-kind-method tsd-parent-kind-interface"><a href="I2CSlaveDevice.html#writeBytes" class="tsd-kind-icon">write<wbr/>Bytes</a></li></ul></section></div></section></section><section class="tsd-panel-group tsd-member-group "><h2>Properties</h2><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="slaveAddress" class="tsd-anchor"></a><h3><span class="tsd-flag ts-flagReadonly">Readonly</span> slave<wbr/>Address</h3><div class="tsd-signature tsd-kind-icon">slave<wbr/>Address<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources"><ul><li>Defined in index.ts:224</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead"> +<p>I2C Slave アドレス</p> +</div></div></section></section><section class="tsd-panel-group tsd-member-group "><h2>Methods</h2><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface"><a id="read16" class="tsd-anchor"></a><h3>read16</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-interface"><li class="tsd-signature tsd-kind-icon">read16<span class="tsd-signature-symbol">(</span>registerNumber<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in index.ts:237</li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>function</dt><dd><p>I2c 16bit 読み取り処理</p> +</dd></dl></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>registerNumber: <span class="tsd-signature-type">number</span></h5><div class="tsd-comment tsd-typography"><div class="lead"> +<p>読み取りアドレス</p> +</div></div></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">></span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface"><a id="read8" class="tsd-anchor"></a><h3>read8</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-interface"><li class="tsd-signature tsd-kind-icon">read8<span class="tsd-signature-symbol">(</span>registerNumber<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in index.ts:231</li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>function</dt><dd><p>I2c 8bit 読み取り処理</p> +</dd></dl></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>registerNumber: <span class="tsd-signature-type">number</span></h5><div class="tsd-comment tsd-typography"><div class="lead"> +<p>読み取りアドレス</p> +</div></div></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">></span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface"><a id="readByte" class="tsd-anchor"></a><h3>read<wbr/>Byte</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-interface"><li class="tsd-signature tsd-kind-icon">read<wbr/>Byte<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in index.ts:258</li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>function</dt><dd><p>I2c 16bit 読み取りバイト処理 +Different from Web I2C API specification.</p> +</dd></dl></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">></span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface"><a id="readBytes" class="tsd-anchor"></a><h3>read<wbr/>Bytes</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-interface"><li class="tsd-signature tsd-kind-icon">read<wbr/>Bytes<span class="tsd-signature-symbol">(</span>length<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">Uint8Array</span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in index.ts:265</li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>function</dt><dd><p>I2c 16bit 読み取りバイト処理 +Different from Web I2C API specification.</p> +</dd></dl></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>length: <span class="tsd-signature-type">number</span></h5><div class="tsd-comment tsd-typography"><div class="lead"> +<p>バイト長</p> +</div></div></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">Uint8Array</span><span class="tsd-signature-symbol">></span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface"><a id="write16" class="tsd-anchor"></a><h3>write16</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-interface"><li class="tsd-signature tsd-kind-icon">write16<span class="tsd-signature-symbol">(</span>registerNumber<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, value<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in index.ts:251</li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>function</dt><dd><p>I2c 16bit 書き込み処理</p> +</dd></dl></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>registerNumber: <span class="tsd-signature-type">number</span></h5><div class="tsd-comment tsd-typography"><div class="lead"> +<p>書き込みアドレス</p> +</div></div></li><li><h5>value: <span class="tsd-signature-type">number</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">></span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface"><a id="write8" class="tsd-anchor"></a><h3>write8</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-interface"><li class="tsd-signature tsd-kind-icon">write8<span class="tsd-signature-symbol">(</span>registerNumber<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, value<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in index.ts:244</li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>function</dt><dd><p>I2c 8bit 書き込み処理</p> +</dd></dl></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>registerNumber: <span class="tsd-signature-type">number</span></h5><div class="tsd-comment tsd-typography"><div class="lead"> +<p>書き込みアドレス</p> +</div></div></li><li><h5>value: <span class="tsd-signature-type">number</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">></span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface"><a id="writeByte" class="tsd-anchor"></a><h3>write<wbr/>Byte</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-interface"><li class="tsd-signature tsd-kind-icon">write<wbr/>Byte<span class="tsd-signature-symbol">(</span>byte<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in index.ts:272</li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>function</dt><dd><p>I2c 16bit 書き込みバイト処理 +Different from Web I2C API specification.</p> +</dd></dl></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>byte: <span class="tsd-signature-type">number</span></h5><div class="tsd-comment tsd-typography"><div class="lead"> +<p>バイトサイズ</p> +</div></div></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">></span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface"><a id="writeBytes" class="tsd-anchor"></a><h3>write<wbr/>Bytes</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-interface"><li class="tsd-signature tsd-kind-icon">write<wbr/>Bytes<span class="tsd-signature-symbol">(</span>bytes<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">Uint8Array</span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in index.ts:279</li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>function</dt><dd><p>I2c 16bit 書き込みバイト配列処理 +Different from Web I2C API specification.</p> +</dd></dl></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>bytes: <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">Uint8Array</span><span class="tsd-signature-symbol">></span></h4></li></ul></section></section></div><div class="col-4 col-menu menu-sticky-wrap menu-highlight"><nav class="tsd-navigation primary"><ul><li class=""><a href="../modules.html">Exports</a></li></ul></nav><nav class="tsd-navigation secondary menu-sticky"><ul><li class="current tsd-kind-interface"><a href="I2CSlaveDevice.html" class="tsd-kind-icon">I2CSlave<wbr/>Device</a><ul><li class="tsd-kind-property tsd-parent-kind-interface"><a href="I2CSlaveDevice.html#slaveAddress" class="tsd-kind-icon">slave<wbr/>Address</a></li><li class="tsd-kind-method tsd-parent-kind-interface"><a href="I2CSlaveDevice.html#read16" class="tsd-kind-icon">read16</a></li><li class="tsd-kind-method tsd-parent-kind-interface"><a href="I2CSlaveDevice.html#read8" class="tsd-kind-icon">read8</a></li><li class="tsd-kind-method tsd-parent-kind-interface"><a href="I2CSlaveDevice.html#readByte" class="tsd-kind-icon">read<wbr/>Byte</a></li><li class="tsd-kind-method tsd-parent-kind-interface"><a href="I2CSlaveDevice.html#readBytes" class="tsd-kind-icon">read<wbr/>Bytes</a></li><li class="tsd-kind-method tsd-parent-kind-interface"><a href="I2CSlaveDevice.html#write16" class="tsd-kind-icon">write16</a></li><li class="tsd-kind-method tsd-parent-kind-interface"><a href="I2CSlaveDevice.html#write8" class="tsd-kind-icon">write8</a></li><li class="tsd-kind-method tsd-parent-kind-interface"><a href="I2CSlaveDevice.html#writeByte" class="tsd-kind-icon">write<wbr/>Byte</a></li><li class="tsd-kind-method tsd-parent-kind-interface"><a href="I2CSlaveDevice.html#writeBytes" class="tsd-kind-icon">write<wbr/>Bytes</a></li></ul></li></ul></nav></div></div></div><footer class="with-border-bottom"><div class="container"><h2>Legend</h2><div class="tsd-legend-group"><ul class="tsd-legend"><li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li><li class="tsd-kind-method tsd-parent-kind-interface"><span class="tsd-kind-icon">Method</span></li></ul><ul class="tsd-legend"><li class="tsd-kind-constructor tsd-parent-kind-class"><span class="tsd-kind-icon">Constructor</span></li><li class="tsd-kind-method tsd-parent-kind-class"><span class="tsd-kind-icon">Method</span></li></ul><ul class="tsd-legend"><li class="tsd-kind-constructor tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited constructor</span></li></ul><ul class="tsd-legend"><li class="tsd-kind-property tsd-parent-kind-class tsd-is-private"><span class="tsd-kind-icon">Private property</span></li></ul></div><h2>Settings</h2><p>Theme <select id="theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></p></div></footer><div class="container tsd-generator"><p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></div><div class="overlay"></div><script src="../assets/main.js"></script></body></html> \ No newline at end of file diff --git a/docs/modules.html b/docs/modules.html index 0e1183e..122fd63 100644 --- a/docs/modules.html +++ b/docs/modules.html @@ -1 +1,5 @@ -<!DOCTYPE html><html class="default"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>node-web-i2c</title><meta name="description" content="Documentation for node-web-i2c"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="assets/style.css"/><link rel="stylesheet" href="assets/highlight.css"/><script async src="assets/search.js" id="search-script"></script></head><body><script>document.body.classList.add(localStorage.getItem("tsd-theme") || "os")</script><header><div class="tsd-page-toolbar"><div class="container"><div class="table-wrap"><div class="table-cell" id="tsd-search" data-base="."><div class="field"><label for="tsd-search-field" class="tsd-widget search no-caption">Search</label><input type="text" id="tsd-search-field"/></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="index.html" class="title">node-web-i2c</a></div><div class="table-cell" id="tsd-widgets"><div id="tsd-filter"><a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a><div class="tsd-filter-group"><div class="tsd-select" id="tsd-filter-visibility"><span class="tsd-select-label">All</span><ul class="tsd-select-list"><li data-value="public">Public</li><li data-value="protected">Public/Protected</li><li data-value="private" class="selected">All</li></ul></div> <input type="checkbox" id="tsd-filter-inherited" checked/><label class="tsd-widget" for="tsd-filter-inherited">Inherited</label><input type="checkbox" id="tsd-filter-externals" checked/><label class="tsd-widget" for="tsd-filter-externals">Externals</label></div></div><a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a></div></div></div></div><div class="tsd-page-title"><div class="container"><h1>node-web-i2c</h1></div></div></header><div class="container container-main"><div class="row"><div class="col-8 col-content"><section class="tsd-panel-group tsd-index-group"><h2>Index</h2><section class="tsd-panel tsd-index-panel"><div class="tsd-index-content"><section class="tsd-index-section "><h3>Classes</h3><ul class="tsd-index-list"><li class="tsd-kind-class"><a href="classes/I2CAccess.html" class="tsd-kind-icon">I2CAccess</a></li><li class="tsd-kind-class"><a href="classes/I2CPort.html" class="tsd-kind-icon">I2CPort</a></li><li class="tsd-kind-class"><a href="classes/I2CPortMap.html" class="tsd-kind-icon">I2CPort<wbr/>Map</a></li><li class="tsd-kind-class"><a href="classes/OperationError.html" class="tsd-kind-icon">Operation<wbr/>Error</a></li></ul></section><section class="tsd-index-section "><h3>Interfaces</h3><ul class="tsd-index-list"><li class="tsd-kind-interface"><a href="interfaces/I2CSlaveDevice.html" class="tsd-kind-icon">I2CSlave<wbr/>Device</a></li></ul></section><section class="tsd-index-section "><h3>Functions</h3><ul class="tsd-index-list"><li class="tsd-kind-function"><a href="modules.html#requestI2CAccess" class="tsd-kind-icon">request<wbr/>I2CAccess</a></li></ul></section></div></section></section><section class="tsd-panel-group tsd-member-group "><h2>Functions</h2><section class="tsd-panel tsd-member tsd-kind-function"><a id="requestI2CAccess" class="tsd-anchor"></a><h3>request<wbr/>I2CAccess</h3><ul class="tsd-signatures tsd-kind-function"><li class="tsd-signature tsd-kind-icon">request<wbr/>I2CAccess<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><a href="classes/I2CAccess.html" class="tsd-signature-type" data-tsd-kind="Class">I2CAccess</a><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in index.ts:160</li></ul></aside><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><a href="classes/I2CAccess.html" class="tsd-signature-type" data-tsd-kind="Class">I2CAccess</a><span class="tsd-signature-symbol">></span></h4></li></ul></section></section></div><div class="col-4 col-menu menu-sticky-wrap menu-highlight"><nav class="tsd-navigation primary"><ul><li class="current"><a href="modules.html">Exports</a></li></ul></nav><nav class="tsd-navigation secondary menu-sticky"><ul><li class="tsd-kind-class"><a href="classes/I2CAccess.html" class="tsd-kind-icon">I2CAccess</a></li><li class="tsd-kind-class"><a href="classes/I2CPort.html" class="tsd-kind-icon">I2CPort</a></li><li class="tsd-kind-class"><a href="classes/I2CPortMap.html" class="tsd-kind-icon">I2CPort<wbr/>Map</a></li><li class="tsd-kind-class"><a href="classes/OperationError.html" class="tsd-kind-icon">Operation<wbr/>Error</a></li><li class="tsd-kind-interface"><a href="interfaces/I2CSlaveDevice.html" class="tsd-kind-icon">I2CSlave<wbr/>Device</a></li><li class="tsd-kind-function"><a href="modules.html#requestI2CAccess" class="tsd-kind-icon">request<wbr/>I2CAccess</a></li></ul></nav></div></div></div><footer class="with-border-bottom"><div class="container"><h2>Legend</h2><div class="tsd-legend-group"><ul class="tsd-legend"><li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li><li class="tsd-kind-method tsd-parent-kind-interface"><span class="tsd-kind-icon">Method</span></li></ul><ul class="tsd-legend"><li class="tsd-kind-constructor tsd-parent-kind-class"><span class="tsd-kind-icon">Constructor</span></li><li class="tsd-kind-method tsd-parent-kind-class"><span class="tsd-kind-icon">Method</span></li></ul><ul class="tsd-legend"><li class="tsd-kind-constructor tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited constructor</span></li></ul><ul class="tsd-legend"><li class="tsd-kind-property tsd-parent-kind-class tsd-is-private"><span class="tsd-kind-icon">Private property</span></li></ul></div><h2>Settings</h2><p>Theme <select id="theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></p></div></footer><div class="container tsd-generator"><p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></div><div class="overlay"></div><script src="assets/main.js"></script></body></html> \ No newline at end of file +<!DOCTYPE html><html class="default"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>node-web-i2c</title><meta name="description" content="Documentation for node-web-i2c"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="assets/style.css"/><link rel="stylesheet" href="assets/highlight.css"/><script async src="assets/search.js" id="search-script"></script></head><body><script>document.body.classList.add(localStorage.getItem("tsd-theme") || "os")</script><header><div class="tsd-page-toolbar"><div class="container"><div class="table-wrap"><div class="table-cell" id="tsd-search" data-base="."><div class="field"><label for="tsd-search-field" class="tsd-widget search no-caption">Search</label><input type="text" id="tsd-search-field"/></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="index.html" class="title">node-web-i2c</a></div><div class="table-cell" id="tsd-widgets"><div id="tsd-filter"><a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a><div class="tsd-filter-group"><div class="tsd-select" id="tsd-filter-visibility"><span class="tsd-select-label">All</span><ul class="tsd-select-list"><li data-value="public">Public</li><li data-value="protected">Public/Protected</li><li data-value="private" class="selected">All</li></ul></div> <input type="checkbox" id="tsd-filter-inherited" checked/><label class="tsd-widget" for="tsd-filter-inherited">Inherited</label><input type="checkbox" id="tsd-filter-externals" checked/><label class="tsd-widget" for="tsd-filter-externals">Externals</label></div></div><a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a></div></div></div></div><div class="tsd-page-title"><div class="container"><h1>node-web-i2c</h1></div></div></header><div class="container container-main"><div class="row"><div class="col-8 col-content"><section class="tsd-panel-group tsd-index-group"><h2>Index</h2><section class="tsd-panel tsd-index-panel"><div class="tsd-index-content"><section class="tsd-index-section "><h3>Classes</h3><ul class="tsd-index-list"><li class="tsd-kind-class"><a href="classes/I2CAccess.html" class="tsd-kind-icon">I2CAccess</a></li><li class="tsd-kind-class"><a href="classes/I2CPort.html" class="tsd-kind-icon">I2CPort</a></li><li class="tsd-kind-class"><a href="classes/I2CPortMap.html" class="tsd-kind-icon">I2CPort<wbr/>Map</a></li><li class="tsd-kind-class"><a href="classes/OperationError.html" class="tsd-kind-icon">Operation<wbr/>Error</a></li></ul></section><section class="tsd-index-section "><h3>Interfaces</h3><ul class="tsd-index-list"><li class="tsd-kind-interface"><a href="interfaces/I2CSlaveDevice.html" class="tsd-kind-icon">I2CSlave<wbr/>Device</a></li></ul></section><section class="tsd-index-section "><h3>Functions</h3><ul class="tsd-index-list"><li class="tsd-kind-function"><a href="modules.html#requestI2CAccess" class="tsd-kind-icon">request<wbr/>I2CAccess</a></li></ul></section></div></section></section><section class="tsd-panel-group tsd-member-group "><h2>Functions</h2><section class="tsd-panel tsd-member tsd-kind-function"><a id="requestI2CAccess" class="tsd-anchor"></a><h3>request<wbr/>I2CAccess</h3><ul class="tsd-signatures tsd-kind-function"><li class="tsd-signature tsd-kind-icon">request<wbr/>I2CAccess<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><a href="classes/I2CAccess.html" class="tsd-signature-type" data-tsd-kind="Class">I2CAccess</a><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in index.ts:302</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead"> +<p>requestGPIOAccess 関数 +Web I2Cの仕様に基づく意図的なasync関数の使用なので、ルールを無効化</p> +</div></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><a href="classes/I2CAccess.html" class="tsd-signature-type" data-tsd-kind="Class">I2CAccess</a><span class="tsd-signature-symbol">></span></h4><div><p>I2CAccess インスタンス生成結果 Promise</p> +</div></li></ul></section></section></div><div class="col-4 col-menu menu-sticky-wrap menu-highlight"><nav class="tsd-navigation primary"><ul><li class="current"><a href="modules.html">Exports</a></li></ul></nav><nav class="tsd-navigation secondary menu-sticky"><ul><li class="tsd-kind-class"><a href="classes/I2CAccess.html" class="tsd-kind-icon">I2CAccess</a></li><li class="tsd-kind-class"><a href="classes/I2CPort.html" class="tsd-kind-icon">I2CPort</a></li><li class="tsd-kind-class"><a href="classes/I2CPortMap.html" class="tsd-kind-icon">I2CPort<wbr/>Map</a></li><li class="tsd-kind-class"><a href="classes/OperationError.html" class="tsd-kind-icon">Operation<wbr/>Error</a></li><li class="tsd-kind-interface"><a href="interfaces/I2CSlaveDevice.html" class="tsd-kind-icon">I2CSlave<wbr/>Device</a></li><li class="tsd-kind-function"><a href="modules.html#requestI2CAccess" class="tsd-kind-icon">request<wbr/>I2CAccess</a></li></ul></nav></div></div></div><footer class="with-border-bottom"><div class="container"><h2>Legend</h2><div class="tsd-legend-group"><ul class="tsd-legend"><li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li><li class="tsd-kind-method tsd-parent-kind-interface"><span class="tsd-kind-icon">Method</span></li></ul><ul class="tsd-legend"><li class="tsd-kind-constructor tsd-parent-kind-class"><span class="tsd-kind-icon">Constructor</span></li><li class="tsd-kind-method tsd-parent-kind-class"><span class="tsd-kind-icon">Method</span></li></ul><ul class="tsd-legend"><li class="tsd-kind-constructor tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited constructor</span></li></ul><ul class="tsd-legend"><li class="tsd-kind-property tsd-parent-kind-class tsd-is-private"><span class="tsd-kind-icon">Private property</span></li></ul></div><h2>Settings</h2><p>Theme <select id="theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></p></div></footer><div class="container tsd-generator"><p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></div><div class="overlay"></div><script src="assets/main.js"></script></body></html> \ No newline at end of file diff --git a/index.ts b/index.ts index 0a3defa..a895f32 100644 --- a/index.ts +++ b/index.ts @@ -1,27 +1,53 @@ -import { openPromisified } from "i2c-bus"; +import { openPromisified } from 'i2c-bus'; +/** + * I2C Port Map Max サイズ + */ const I2CPortMapSizeMax = 32; +/** + * Uint16 Max サイズ + */ const Uint16Max = 65535; -function parseUint16(string: string) { - const n = Number.parseInt(string, 10); +/** + * + * Uint16型変換処理 + * @param parseString 変換文字列 + * @return Uint16型変換値 + */ +function parseUint16(parseString: string) { + const n = Number.parseInt(parseString, 10); if (0 <= n && n <= Uint16Max) return n; else throw new RangeError(`Must be between 0 and ${Uint16Max}.`); } +/** ポート番号 */ type PortNumber = number; +/** ポート名 */ type PortName = string; +/** I2C Slave アドレス */ type I2CSlaveAddress = number; +/** + * I2CAccess クラス定義 + */ export class I2CAccess { private readonly _ports: I2CPortMap; + /** + * Creates an instance of GPIOAccess. + * @param ports ポート番号 + */ constructor(ports?: I2CPortMap) { this._ports = ports == null ? new I2CPortMap() : ports; } + /** + * ポート情報取得処理 + * @return 現在のポート情報 + */ get ports(): I2CPortMap { return this._ports; } @@ -35,21 +61,41 @@ export class I2CPortMap extends Map<PortNumber, I2CPort> { } } +/** + * I2CPort クラス定義 + */ export class I2CPort { private readonly _portNumber: PortNumber; + /** + * Creates an instance of GPIOPort. + * @param portNumber ポート番号 + */ constructor(portNumber: PortNumber) { this._portNumber = parseUint16(portNumber.toString()); } + /** + * ポート番号取得処理 + * @return 現在のポート番号 + */ get portNumber(): PortNumber { return this._portNumber; } + /** + * ポート名取得処理 + * @return 現在のポート名 + */ get portName(): string { return `i2c-${this.portNumber}`; } + /** + * I2CSlave 接続デバイスオープン処理 + * @param slaveAddress 接続デバイス情報のアドレス + * @return I2CSlave 接続デバイス情報の Promise + */ async open(slaveAddress: I2CSlaveAddress): Promise<I2CSlaveDevice> { const bus = await openPromisified(this.portNumber).catch((error) => { throw new OperationError(error); @@ -57,32 +103,57 @@ export class I2CPort { return { slaveAddress, - read8: (cmd) => - bus.readByte(slaveAddress, cmd).catch((error) => { + /** + * @function + * I2c 8bit 読み取り処理 + * @param registerNumber 読み取りアドレス + */ + read8: (registerNumber) => + bus.readByte(slaveAddress, registerNumber).catch((error) => { throw new OperationError(error); }), - read16: (cmd) => - bus.readWord(slaveAddress, cmd).catch((error) => { + /** + * @function + * I2c 16bit 読み取り処理 + * @param registerNumber 読み取りアドレス + */ + read16: (registerNumber) => + bus.readWord(slaveAddress, registerNumber).catch((error) => { throw new OperationError(error); }), - write8: async (cmd, byte) => { + /** + * @function + * I2c 8bit 書き込み処理 + * @param registerNumber 書き込みアドレス + * @param byte 書き込みの値(バイト) + */ + write8: async (registerNumber, byte) => { try { - await bus.writeByte(slaveAddress, cmd, byte); + await bus.writeByte(slaveAddress, registerNumber, byte); return byte; } catch (error: any) { throw new OperationError(error); } }, - write16: async (cmd, word) => { + /** + * @function + * I2c 16bit 書き込み処理 + * @param registerNumber 書き込みアドレス + * @param word 書き込みの値(ワード) + */ + write16: async (registerNumber, word) => { try { - await bus.writeWord(slaveAddress, cmd, word); + await bus.writeWord(slaveAddress, registerNumber, word); return word; } catch (error: any) { throw new OperationError(error); } }, - - /** Different from Web I2C API specification. */ + /** + * @function + * I2c 16bit 読み取りバイト処理 + * Different from Web I2C API specification. + */ readByte: async () => { try { const byte = await bus.receiveByte(slaveAddress); @@ -91,7 +162,12 @@ export class I2CPort { throw new OperationError(error); } }, - /** Different from Web I2C API specification. */ + /** + * @function + * I2c 16bit 読み取りバイト処理 + * Different from Web I2C API specification. + * @param length バイト長 + */ readBytes: async (length) => { try { const { bytesRead, buffer } = await bus.i2cRead( @@ -104,7 +180,12 @@ export class I2CPort { throw new OperationError(error); } }, - /** Different from Web I2C API specification. */ + /** + * @function + * I2c 16bit 書き込みバイト処理 + * Different from Web I2C API specification. + * @param registerNumber 読み取りアドレス + */ writeByte: async (byte) => { try { await bus.sendByte(slaveAddress, byte); @@ -113,7 +194,12 @@ export class I2CPort { throw new OperationError(error); } }, - /** Different from Web I2C API specification. */ + /** + * @function + * I2c 16bit 書き込みバイト配列処理 + * Different from Web I2C API specification. + * @param byte バイトサイズ配列 + */ writeBytes: async (bytes) => { try { const { bytesWritten, buffer } = await bus.i2cWrite( @@ -130,32 +216,88 @@ export class I2CPort { } } +/** + * I2CSlaveDevice クラス定義 + */ export interface I2CSlaveDevice { + /** I2C Slave アドレス */ readonly slaveAddress: I2CSlaveAddress; + /** + * @function + * I2c 8bit 読み取り処理 + * @param registerNumber 読み取りアドレス + */ read8(registerNumber: number): Promise<number>; + /** + * @function + * I2c 16bit 読み取り処理 + * @param registerNumber 読み取りアドレス + */ read16(registerNumber: number): Promise<number>; + /** + * @function + * I2c 8bit 書き込み処理 + * @param registerNumber 書き込みアドレス + * @param byte 書き込みの値(バイト) + */ write8(registerNumber: number, value: number): Promise<number>; + /** + * @function + * I2c 16bit 書き込み処理 + * @param registerNumber 書き込みアドレス + * @param word 書き込みの値(ワード) + */ write16(registerNumber: number, value: number): Promise<number>; - /** Different from Web I2C API specification. */ + /** + * @function + * I2c 16bit 読み取りバイト処理 + * Different from Web I2C API specification. + */ readByte(): Promise<number>; - /** Different from Web I2C API specification. */ + /** + * @function + * I2c 16bit 読み取りバイト処理 + * Different from Web I2C API specification. + * @param length バイト長 + */ readBytes(length: number): Promise<Uint8Array>; - /** Different from Web I2C API specification. */ + /** + * @function + * I2c 16bit 書き込みバイト処理 + * Different from Web I2C API specification. + * @param byte バイトサイズ + */ writeByte(byte: number): Promise<number>; - /** Different from Web I2C API specification. */ + /** + * @function + * I2c 16bit 書き込みバイト配列処理 + * Different from Web I2C API specification. + * @param byte バイトサイズ配列 + */ writeBytes(bytes: Array<number>): Promise<Uint8Array>; } +/** + * 操作エラークラス定義 + */ export class OperationError extends Error { + /** + * Creates an instance of OperationError. + * @param message エラーメッセージ + */ constructor(message: string) { super(message); this.name = this.constructor.name; } } -// Web I2Cの仕様に基づく意図的なasync関数の使用なので、ルールを無効化 +/** + * requestGPIOAccess 関数 + * Web I2Cの仕様に基づく意図的なasync関数の使用なので、ルールを無効化 + * @return I2CAccess インスタンス生成結果 Promise + */ // eslint-disable-next-line export async function requestI2CAccess(): Promise<I2CAccess> { const ports = new I2CPortMap(