Added docs

This commit is contained in:
Nathan Kellenicki 2019-02-01 11:34:33 -08:00
parent a0fea26a6a
commit 72a9a161ed
22 changed files with 197 additions and 30 deletions

View File

@ -5585,7 +5585,7 @@
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a>
on Wed Jan 30th 2019
on Fri Feb 1st 2019
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>

View File

@ -4188,7 +4188,7 @@
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a>
on Wed Jan 30th 2019
on Fri Feb 1st 2019
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>

View File

@ -2467,7 +2467,7 @@
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a>
on Wed Jan 30th 2019
on Fri Feb 1st 2019
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>

View File

@ -4444,7 +4444,7 @@
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a>
on Wed Jan 30th 2019
on Fri Feb 1st 2019
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>

View File

@ -5157,7 +5157,7 @@
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a>
on Wed Jan 30th 2019
on Fri Feb 1st 2019
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>

View File

@ -3409,7 +3409,7 @@
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a>
on Wed Jan 30th 2019
on Fri Feb 1st 2019
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>

View File

@ -316,7 +316,7 @@
<ul class="dummy">
<li>
<a href="poweredup.js.html">poweredup.js</a>,
<a href="poweredup.js.html#sunlight-1-line-82">line 82</a>
<a href="poweredup.js.html#sunlight-1-line-90">line 90</a>
</li>
</ul>
</dd>
@ -427,7 +427,165 @@
<ul class="dummy">
<li>
<a href="poweredup.js.html">poweredup.js</a>,
<a href="poweredup.js.html#sunlight-1-line-91">line 91</a>
<a href="poweredup.js.html#sunlight-1-line-82">line 82</a>
</li>
</ul>
</dd>
</dl>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Array.&lt;<a href="Hub.html">Hub</a>></span>
</dd>
</dl>
</dd>
<hr>
<dt>
<h4 class="name" id="getConnectedHubsByName"><span class="type-signature"></span>getConnectedHubsByName(name)</h4>
</dt>
<dd>
<div class="description">
<p>Retrieve a Powered UP Hub by name.</p>
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>name</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="description last"></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="poweredup.js.html">poweredup.js</a>,
<a href="poweredup.js.html#sunlight-1-line-99">line 99</a>
</li>
</ul>
</dd>
@ -781,7 +939,7 @@
<ul class="dummy">
<li>
<a href="poweredup.js.html">poweredup.js</a>,
<a href="poweredup.js.html#sunlight-1-line-137">line 137</a>
<a href="poweredup.js.html#sunlight-1-line-146">line 146</a>
</li>
</ul>
</dd>
@ -860,7 +1018,7 @@
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a>
on Wed Jan 30th 2019
on Fri Feb 1st 2019
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>

View File

@ -5046,7 +5046,7 @@
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a>
on Wed Jan 30th 2019
on Fri Feb 1st 2019
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>

View File

@ -349,7 +349,7 @@ exports.BoostMoveHub = BoostMoveHub;
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a>
on Wed Jan 30th 2019
on Fri Feb 1st 2019
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>

View File

@ -3853,7 +3853,7 @@
<ul class="dummy">
<li>
<a href="poweredup.js.html">poweredup.js</a>,
<a href="poweredup.js.html#sunlight-1-line-137">line 137</a>
<a href="poweredup.js.html#sunlight-1-line-146">line 146</a>
</li>
</ul>
</dd>
@ -6681,7 +6681,7 @@
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a>
on Wed Jan 30th 2019
on Fri Feb 1st 2019
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>

View File

@ -277,7 +277,7 @@ var BLECharacteristic;
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a>
on Wed Jan 30th 2019
on Fri Feb 1st 2019
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>

View File

@ -298,7 +298,7 @@ exports.DuploTrainBase = DuploTrainBase;
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a>
on Wed Jan 30th 2019
on Fri Feb 1st 2019
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>

View File

@ -3272,7 +3272,7 @@
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a>
on Wed Jan 30th 2019
on Fri Feb 1st 2019
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>

View File

@ -485,7 +485,7 @@ exports.Hub = Hub;
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a>
on Wed Jan 30th 2019
on Fri Feb 1st 2019
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>

View File

@ -314,7 +314,7 @@ poweredUP.scan(); // Start scanning for Hubs</code></pre><p>More examples are av
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a>
on Wed Jan 30th 2019
on Fri Feb 1st 2019
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>

View File

@ -507,7 +507,7 @@ exports.LPF2Hub = LPF2Hub;
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a>
on Wed Jan 30th 2019
on Fri Feb 1st 2019
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>

View File

@ -165,6 +165,14 @@ class PoweredUP extends events_1.EventEmitter {
}
noble.stopScanning();
}
/**
* Retrieve a list of Powered UP Hubs.
* @method PoweredUP#getConnectedHubs
* @returns {Hub[]}
*/
getConnectedHubs() {
return Object.keys(this._connectedHubs).map((uuid) => this._connectedHubs[uuid]);
}
/**
* Retrieve a Powered UP Hub by UUID.
* @method PoweredUP#getConnectedHubByUUID
@ -175,12 +183,13 @@ class PoweredUP extends events_1.EventEmitter {
return this._connectedHubs[uuid];
}
/**
* Retrieve a list of Powered UP Hubs.
* @method PoweredUP#getConnectedHubs
* Retrieve a Powered UP Hub by name.
* @method PoweredUP#getConnectedHubsByName
* @param {string} name
* @returns {Hub[]}
*/
getConnectedHubs() {
return Object.keys(this._connectedHubs).map((uuid) => this._connectedHubs[uuid]);
getConnectedHubsByName(name) {
return Object.keys(this._connectedHubs).map((uuid) => this._connectedHubs[uuid]).filter((hub) => hub.name === name);
}
async _discoveryEventHandler(peripheral) {
let hub;
@ -275,7 +284,7 @@ exports.PoweredUP = PoweredUP;
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a>
on Wed Jan 30th 2019
on Fri Feb 1st 2019
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>

View File

@ -306,7 +306,7 @@ exports.PUPHub = PUPHub;
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a>
on Wed Jan 30th 2019
on Fri Feb 1st 2019
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>

View File

@ -236,7 +236,7 @@ exports.PUPRemote = PUPRemote;
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a>
on Wed Jan 30th 2019
on Fri Feb 1st 2019
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>

File diff suppressed because one or more lines are too long

View File

@ -496,7 +496,7 @@ exports.WeDo2SmartHub = WeDo2SmartHub;
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a>
on Wed Jan 30th 2019
on Fri Feb 1st 2019
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
</span>

View File

@ -1,6 +1,6 @@
{
"name": "node-poweredup",
"version": "1.8.0",
"version": "1.8.1",
"description": "A Node.js module to interface with LEGO Powered UP components.",
"homepage": "https://github.com/nathankellenicki/node-poweredup/",
"main": "dist/index.js",