From 6be9a3e0096c13ce60c95962bfa9eb61fbab5f39 Mon Sep 17 00:00:00 2001 From: c3charvat Date: Tue, 25 Jun 2024 17:30:28 -0400 Subject: [PATCH 1/6] feat(cargo.toml): bump lib version Signed-off-by: c3charvat --- Cargo.lock | 4 ++-- Cargo.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index a3e5709..c000408 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2515,8 +2515,8 @@ checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" [[package]] name = "tsp-toolkit-kic-lib" -version = "0.15.1" -source = "git+https://github.com/tektronix/tsp-toolkit-kic-lib.git?tag=v0.15.1#3c3edf8efda1d765c6b5002cbaa5cf3e2707b48c" +version = "0.16.1" +source = "git+https://github.com/tektronix/tsp-toolkit-kic-lib.git?tag=v0.16.1-0#09300562fd3aa2f188f6376c9da71f9ad215e07f" dependencies = [ "bytes", "chrono", diff --git a/Cargo.toml b/Cargo.toml index a356c0d..5ea6941 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -42,7 +42,7 @@ thiserror = "1.0.58" tmc = { git = "https://github.com/esarver/rusb-usbtmc" } tracing = { version = "0.1.40", features = ["async-await"] } tracing-subscriber = "0.3.18" -tsp-toolkit-kic-lib = { git = "https://github.com/tektronix/tsp-toolkit-kic-lib.git", tag = "v0.15.1" } +tsp-toolkit-kic-lib = { git = "https://github.com/tektronix/tsp-toolkit-kic-lib.git", tag = "v0.16.1-0" } [workspace.lints.rust] warnings = "deny" From 4d5fd5aed8e6972fa8ea888528c33db89233289a Mon Sep 17 00:00:00 2001 From: c3charvat Date: Tue, 25 Jun 2024 17:31:01 -0400 Subject: [PATCH 2/6] delete unused resources Signed-off-by: c3charvat --- instrument-repl/src/resources/kic_2600.tsp | 24 ------------------ instrument-repl/src/resources/kic_tti.tsp | 25 ------------------- .../src/resources/kic_versatest.tsp | 13 ---------- 3 files changed, 62 deletions(-) delete mode 100644 instrument-repl/src/resources/kic_2600.tsp delete mode 100644 instrument-repl/src/resources/kic_tti.tsp delete mode 100644 instrument-repl/src/resources/kic_versatest.tsp diff --git a/instrument-repl/src/resources/kic_2600.tsp b/instrument-repl/src/resources/kic_2600.tsp deleted file mode 100644 index 679eebb..0000000 --- a/instrument-repl/src/resources/kic_2600.tsp +++ /dev/null @@ -1,24 +0,0 @@ -if not _KIC then _KIC = {} end -_KIC = { - version = "!!>!", - error_message = function() - local errorstr = [[ERM>START]].."\n" - for _err_num = 1, errorqueue.count do - local error_code, message, severity, node_id = errorqueue.next() - if _err_num > 1 then errorstr = errorstr .."," end - errorstr = errorstr.. "ERM>" .._KIC.toJson({error_code=error_code, message=message, severity=severity, node_id=node_id, time=nil}) .. "\n" - end - errorstr = errorstr..[[ERM>DONE]] - end, - prompts_enable = function(enable) - _G[".orig_prompts"] = localnode.prompts - if(enable) then - localnode.prompts = 0 - else - localnode.prompts = 1 - end - end, - prompts_restore = function() - localnode.prompts = _G[".orig_prompts"] - end -} diff --git a/instrument-repl/src/resources/kic_tti.tsp b/instrument-repl/src/resources/kic_tti.tsp deleted file mode 100644 index 2aaafb0..0000000 --- a/instrument-repl/src/resources/kic_tti.tsp +++ /dev/null @@ -1,25 +0,0 @@ -if not _KIC then _KIC = {} end - -_KIC["version"] = "!!>!" -_KIC["error_message"] = function() - local errorstr = [[ERM>START]].. '\n' - for _err_num = 1, eventlog.getcount(eventlog.SEV_ERROR) do - local event_id, message, severity, node_id, secs, nanos = eventlog.next(eventlog.SEV_ERROR) - if _err_num > 1 then errorstr = errorstr .. "," end - errorstr = errorstr .. [[ERM>]] .. _KIC.toJson({ error_code = event_id, message = message, severity = severity, node_id = node_id, - time = { secs = secs, nanos = nanos } }).."\n" - end - errorstr = errorstr .. [[ERM>DONE]] - return errorstr -end -_KIC["prompts_enable"] = function(enable) - _G[".orig_prompts"] = localnode.prompts - if (enable) then - localnode.prompts = localnode.ENABLE - else - localnode.prompts = localnode.DISABLE - end -end -_KIC["prompts_restore"] = function() - localnode.prompts = _G[".orig_prompts"] -end diff --git a/instrument-repl/src/resources/kic_versatest.tsp b/instrument-repl/src/resources/kic_versatest.tsp deleted file mode 100644 index 1a3ba50..0000000 --- a/instrument-repl/src/resources/kic_versatest.tsp +++ /dev/null @@ -1,13 +0,0 @@ -if not _KIC then _KIC = {} end -_KIC = { - version = "!!>!", - error_message = function() - local errorstr = [[ERM>START]].."\n[" - for _err_num = 1, errorqueue.count do - local error_code, message, severity, node_id = errorqueue.next() - if _err_num > 1 then errorstr = errorstr .."," end - errorstr = errorstr.._KIC.toJson({error_code=error_code, message=message, severity=severity, node_id=node_id, time=nil}) - end - errorstr = errorstr.."\n]\n"..[[ERM>DONE]] - end -} From 414979b7e5c4ce01f93210caa257f98089ec9384 Mon Sep 17 00:00:00 2001 From: c3charvat Date: Tue, 25 Jun 2024 17:31:30 -0400 Subject: [PATCH 3/6] feat(kic_common.tsp):add 3700 platform code Signed-off-by: c3charvat --- instrument-repl/src/resources/kic_common.tsp | 31 +++++++++++--------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/instrument-repl/src/resources/kic_common.tsp b/instrument-repl/src/resources/kic_common.tsp index a77405f..9bc8a28 100644 --- a/instrument-repl/src/resources/kic_common.tsp +++ b/instrument-repl/src/resources/kic_common.tsp @@ -5,8 +5,9 @@ _KIC["TSP_VERSIONS"] = {"tti", "2600", "versatest"} _KIC[".load_time_prompts"] = localnode.prompts local _2600 = 0 -local TTI = 1 -local VERSATEST = 2 +local _3700 = 1 +local TTI = 2 +local VERSATEST = 3 local models = { ["2450"] = TTI, @@ -52,16 +53,16 @@ local models = { ["2604B-L"] = _2600, ["2614B-L"] = _2600, ["2634B-L"] = _2600, - ["3706"] = _2600, - ["3706-SNFP"] = _2600, - ["3706-S"] = _2600, - ["3706-NFP"] = _2600, - ["3706A"] = _2600, - ["3706A-SNFP"] = _2600, - ["3706A-S"] = _2600, - ["3706A-NFP"] = _2600, - ["707B"] = _2600, - ["708B"] = _2600, + ["3706"] = _3700, + ["3706-SNFP"] = _3700, + ["3706-S"] = _3700, + ["3706-NFP"] = _3700, + ["3706A"] = _3700, + ["3706A-SNFP"] = _3700, + ["3706A-S"] = _3700, + ["3706A-NFP"] = _3700, + ["707B"] = _3700, + ["708B"] = _3700, ["VERSATEST-600"] = VERSATEST, ["TSPop"] = VERSATEST, ["TSP"] = VERSATEST, @@ -69,6 +70,7 @@ local models = { _KIC["is_tti"] = function() return models[localnode.model] == TTI end _KIC["is_2600"] = function() return models[localnode.model] == _2600 end +_KIC["is_3700"] = function() return models[localnode.model] == _3700 end _KIC["is_versatest"] = function() return models[localnode.model] == VERSATEST end ---interate over input string and escape special characters in a given string, @@ -132,7 +134,7 @@ if _KIC.is_tti() then return errorstr end -elseif _KIC.is_2600() then +elseif _KIC.is_2600() or _KIC.is_3700() then _KIC["error_message"] = function() local errorstr = [[ERM>START]].."\n" for _err_num = 1, errorqueue.count do @@ -190,7 +192,8 @@ _KIC["cleanup"] = function () end --clean up functions that aren't important after setup-- -_KIC["is_tti"] = nil _KIC["is_2600"] = nil +_KIC["is_3700"] = nil +_KIC["is_tti"] = nil _KIC["is_versatest"] = nil _KIC["set_tsp_version"] = nil From 792b984892107c8d66abc0e961c7654a8de9dc36 Mon Sep 17 00:00:00 2001 From: c3charvat Date: Tue, 25 Jun 2024 17:32:10 -0400 Subject: [PATCH 4/6] fix(config.ts): remove 3700 platform from 2600 Signed-off-by: c3charvat --- tests/typescript/config.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/typescript/config.ts b/tests/typescript/config.ts index 6e96e3a..6e4d525 100644 --- a/tests/typescript/config.ts +++ b/tests/typescript/config.ts @@ -45,6 +45,9 @@ export enum Ki2600InstrumentModel{ KI_2604B_L = "2604B-L", KI_2614B_L = "2614B-L", KI_2634B_L = "2634B-L", +} + +export enum Ki3700InstrumentModel{ KI_3706 = "3706", KI_3706_SNFP = "3706-SNFP", KI_3706_S = "3706-S", @@ -76,7 +79,7 @@ export interface Connection { export interface Instrument { name: string description: string | undefined | null - model: TtiInstrumentModel | Ki2600InstrumentModel | TrebInstrumentModel + model: TtiInstrumentModel | Ki2600InstrumentModel | Ki3700InstrumentModel | TrebInstrumentModel connections: Connection[] available: boolean } From 782e1dd7f34fb160eee946f457b42ab2c991f1d9 Mon Sep 17 00:00:00 2001 From: c3charvat Date: Tue, 25 Jun 2024 17:32:35 -0400 Subject: [PATCH 5/6] feat(k3700.test.ts): add 3706 test Signed-off-by: c3charvat --- tests/typescript/ki3700.test.ts | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 tests/typescript/ki3700.test.ts diff --git a/tests/typescript/ki3700.test.ts b/tests/typescript/ki3700.test.ts new file mode 100644 index 0000000..9415002 --- /dev/null +++ b/tests/typescript/ki3700.test.ts @@ -0,0 +1,21 @@ +import { ChildProcessWithoutNullStreams, spawn } from "node:child_process" +import { env } from "node:process" +import { assert } from "chai" +import { after, afterEach, beforeEach, describe, it } from "mocha" +import { KIC_EXECUTABLE, sleep, TSPOP_EXECUTABLE } from "./util" + +describe("3700B Integration", function () { + describe("LAN Connection", function () { + before(function () { + //Check if any of the requisite instruments are available. + const instruments_found = false + if (!instruments_found) { + this.skip() + } + }) + + it("PLACEHOLDER", function () { + assert.isTrue(true) + }) + }) +}) From fda72e52bdbe41d827cf9d6aca7a888982810eea Mon Sep 17 00:00:00 2001 From: c3charvat Date: Tue, 25 Jun 2024 17:36:03 -0400 Subject: [PATCH 6/6] feat(changelog.md): add changelog Signed-off-by: c3charvat --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 95f95a6..1a2e556 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,7 @@ Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how ### Changed - Renamed update to upgrade for firmware upgrade (TSP-463) +- **tsp-toolkit-kic-lib** Fix Support for FW flash on the 3706B and 70xB *Open Source Contribution: c3charvat* ## [0.16.0]