@@ -791,6 +791,14 @@ NOTE: This function does NOT initialize session packages.</p>
791791<dt><a href="#importSessionKeyValues">importSessionKeyValues(db, sessionId, keyValuePairs)</a></dt>
792792<dd><p>Resolves with a promise that imports session key values.</p>
793793</dd>
794+ <dt><a href="#autoLoadPackage">autoLoadPackage(db, pkg, absPath)</a> ⇒</dt>
795+ <dd><p>Auto-load package. If succesful it returns an object.
796+ Otherwise it throws an exception.</p>
797+ </dd>
798+ <dt><a href="#convertPackageResult">convertPackageResult(data)</a> ⇒</dt>
799+ <dd><p>Convert the array of results into a more palatable value.
800+ Resolves an array of { packageId:, packageType:} objects into { zclPackageId: id, templateIds: [] }</p>
801+ </dd>
794802<dt><a href="#jsonDataLoader">jsonDataLoader(db, state, sessionId, packageMatch)</a> ⇒</dt>
795803<dd><p>Given a state object, this method returns a promise that resolves
796804with the succesfull writing into the database.</p>
@@ -12190,7 +12198,7 @@ Checks if type is a two-byte lengh string.
1219012198
1219112199- [JS API: random utilities](#module*JS API* random utilities)
1219212200 - [~checksum(data)](#module*JS API* random utilities..checksum) ⇒
12193- - [~initializeSessionPackage (db, sessionId, options:, selectedZclPropertyPackage, selectedGenTemplatePackages)](#module*JS API* random utilities..initializeSessionPackage ) ⇒
12201+ - [~ensurePackagesAndPopulateSessionOptions (db, sessionId, options:, selectedZclPropertyPackage, selectedGenTemplatePackages)](#module*JS API* random utilities..ensurePackagesAndPopulateSessionOptions ) ⇒
1219412202 - [~createBackupFile(filePath)](#module*JS API* random utilities..createBackupFile)
1219512203 - [~matchFeatureLevel(featureLevel)](#module*JS API* random utilities..matchFeatureLevel)
1219612204 - [~sessionReport(db, sessionId)](#module*JS API* random utilities..sessionReport) ⇒
@@ -12222,11 +12230,12 @@ Returns the CRC of the data that is passed.
1222212230| ----- | --------------- |
1222312231| data | <code>\*</code> |
1222412232
12225- <a name="module_JS API_ random utilities..initializeSessionPackage "></a>
12233+ <a name="module_JS API_ random utilities..ensurePackagesAndPopulateSessionOptions "></a>
1222612234
12227- ### JS API: random utilities~initializeSessionPackage (db, sessionId, options:, selectedZclPropertyPackage, selectedGenTemplatePackages) ⇒
12235+ ### JS API: random utilities~ensurePackagesAndPopulateSessionOptions (db, sessionId, options:, selectedZclPropertyPackage, selectedGenTemplatePackages) ⇒
1222812236
12229- This function assigns a proper package ID to the session.
12237+ This function assigns a proper package ID to the session if there
12238+ are no packages present. It will also populate session options.
1223012239
1223112240**Kind**: inner method of [<code>JS API: random utilities</code>](#module*JS API* random utilities)
1223212241**Returns**: Promise that resolves with the packages array.
@@ -14208,6 +14217,36 @@ Resolves with a promise that imports session key values.
1420814217| sessionId | <code>\*</code> |
1420914218| keyValuePairs | <code>\*</code> |
1421014219
14220+ <a name="autoLoadPackage"></a>
14221+
14222+ ## autoLoadPackage(db, pkg, absPath) ⇒
14223+
14224+ Auto-load package. If succesful it returns an object.
14225+ Otherwise it throws an exception.
14226+
14227+ **Kind**: global function
14228+ **Returns**: object containing packageId and packageType.
14229+
14230+ | Param | Type |
14231+ | ------- | --------------- |
14232+ | db | <code>\*</code> |
14233+ | pkg | <code>\*</code> |
14234+ | absPath | <code>\*</code> |
14235+
14236+ <a name="convertPackageResult"></a>
14237+
14238+ ## convertPackageResult(data) ⇒
14239+
14240+ Convert the array of results into a more palatable value.
14241+ Resolves an array of { packageId:, packageType:} objects into { zclPackageId: id, templateIds: [] }
14242+
14243+ **Kind**: global function
14244+ **Returns**: an object that contains session ids.
14245+
14246+ | Param | Type |
14247+ | ----- | --------------- |
14248+ | data | <code>\*</code> |
14249+
1421114250<a name="jsonDataLoader"></a>
1421214251
1421314252## jsonDataLoader(db, state, sessionId, packageMatch) ⇒
0 commit comments