Skip to content

Commit

Permalink
uctAppName: Draft for Testcase and Remove/Disable as Not Used
Browse files Browse the repository at this point in the history
* Extend Coverage: Include App Name
* Cleanup: Remove uctAppName
  • Loading branch information
cornelius-koepp committed Jul 22, 2024
1 parent e71ad4e commit 3a0e167
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/ConfigTransfer.script.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ var uctGenVer = "0.1.0";
var uctGen = "uct";
var uctAppId = uctVersionInformation[0];
var uctAppVer = uctVersionInformation[1];
var uctAppName = null;
// var uctAppName = null;


function uctBtnExport(device, online, progress, context) {
Expand Down Expand Up @@ -81,9 +81,11 @@ function uctCreateHeader(module, channel) {
*/

var pathApp = [uctHexNumberStr(uctAppId), uctHexNumberStr(uctAppVer)];
/* TODO check inclusion of app name
if (uctAppName) {
pathApp.push(uctAppName);
}
*/

var moduleVersion = uctChannelParams[module].version;
var pathModule = [
Expand Down
8 changes: 8 additions & 0 deletions test/ConfigTransfer.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -628,6 +628,14 @@ describe('Header', () => {
expect(uctCreateHeader("TXS", 6)).toBe("OpenKNX,cv1,0xAF42:0x23/TXS:0x17/6");
expect(uctCreateHeader("TXS", 78)).toBe("OpenKNX,cv1,0xAF42:0x23/TXS:0x17/78");
});
/*
it.skip("[NOT used yet] could include application name", () => {
const SAVE_uctAppName = cts.uctAppName;
cts.uctAppName = "OAM-Example";
expect(uctCreateHeader("TXS", 42)).toBe("OpenKNX,cv1,0xAF42:0x23:OAM-Example/TXS:0x17/42");
cts.uctAppName = SAVE_uctAppName;
});
*/
});

describe('uctParseHeader(headerStr)', () => {
Expand Down
2 changes: 1 addition & 1 deletion test/js_suffix.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ module.exports = {
uctGen,
uctAppId,
uctAppVer,
uctAppName,
// uctAppName,

// functions
uctSerializeParamValue,
Expand Down

0 comments on commit 3a0e167

Please sign in to comment.