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] 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" 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_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 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 -} 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 } 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) + }) + }) +})