Browse Source

Merge pull request #126 from NASA-AMMOS/batchtable-docs

Docs: Add BatchTable docs
Garrett Johnson 5 years ago
parent
commit
aa695859f9
1 changed files with 23 additions and 0 deletions
  1. 23 0
      README.md

+ 23 - 0
README.md

@@ -516,6 +516,29 @@ priorityCallback = null : ( item ) => Number
 
 
 Function to derive the job priority of the given item. Higher priority values get processed first.
 Function to derive the job priority of the given item. Higher priority values get processed first.
 
 
+## BatchTable
+
+### .getKeys
+
+```js
+getKeys() : Array<String>
+```
+
+Returns the keys of all the data in the batch table.
+
+### getData
+```js
+getData(
+	key : String,
+	defaultComponentType = null : String|null,
+	defaultType = null : String|null,
+) : Array|TypedArray
+```
+
+Returns the data associated with the `key` passed into the function. If the component and type are specified in the batch table contents then those values are used otherwise the values in `defaultComponentType` and `defaultType` are used.
+
+`defaultComponentType` can be set to `BYTE`, `UNSIGNED_BYTE`, `SHORT`, `UNSIGNED_SHORT`, `INT`, `UNSIGNED_INT`, `FLOAT`, or `DOUBLE`. `defaultType` can be set to `SCALAR`, `VEC2`, `VEC3`, or `VEC4`.
+
 # LICENSE
 # LICENSE
 
 
 The software is available under the [Apache V2.0 license](../LICENSE.txt).
 The software is available under the [Apache V2.0 license](../LICENSE.txt).