From ce5ef74703867898bf2672a7c173a67586fdff65 Mon Sep 17 00:00:00 2001 From: "Sarver, Edwin" Date: Thu, 25 Jul 2024 15:38:21 -0400 Subject: [PATCH 01/10] Add reset command --- kic/src/main.rs | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/kic/src/main.rs b/kic/src/main.rs index 15d2ecc..b7d6fb1 100644 --- a/kic/src/main.rs +++ b/kic/src/main.rs @@ -144,6 +144,11 @@ fn cmds() -> Command { .about("Connect to an instrument over one of the provided interfaces"); add_connection_subcommands(cmd, []) }) + .subcommand({ + let cmd = Command::new("reset") + .about("Connect to an instrument, cancel any ongoing jobs, send *RST then exit."); + add_connection_subcommands(cmd, []) + }) .subcommand({ let cmd = Command::new("info") .about("Get the IDN information about an instrument."); @@ -287,6 +292,9 @@ fn main() -> anyhow::Result<()> { Some(("connect", sub_matches)) => { return connect(sub_matches); } + Some(("reset", sub_matches)) => { + return reset(sub_matches); + } Some(("upgrade", sub_matches)) => { return upgrade(sub_matches); } @@ -701,6 +709,46 @@ fn script(args: &ArgMatches) -> anyhow::Result<()> { Ok(()) } +#[instrument(skip(args))] +fn reset(args: &ArgMatches) -> anyhow::Result<()> { + info!("Resetting instrument"); + let conn = match ConnectionType::try_from_arg_matches(args) { + Ok(c) => c, + Err(e) => { + error!("Unable to parse connection information: {e}"); + return Err(e); + } + }; + let mut instrument: Box = match connect_sync_instrument(conn) { + Ok(i) => i, + Err(e) => { + error!("Error connecting to sync instrument: {e}"); + return Err(e); + } + }; + + match instrument.write_all(b"abort\n") { + Ok(_) => {} + Err(e) => { + error!("Error sending abort to instrument: {e}"); + return Err(e.into()); + } + } + + match instrument.write_all(b"*RST\n") { + Ok(_) => {} + Err(e) => { + error!("Error sending *RST to instrument: {e}"); + return Err(e.into()); + } + + } + + info!("Instrument reset"); + + Ok(()) +} + #[instrument(skip(args))] fn info(args: &ArgMatches) -> anyhow::Result<()> { info!("Getting instrument info"); From 403ac38c18cbc64376793b8fe97f23a07ac7185a Mon Sep 17 00:00:00 2001 From: "Sarver, Edwin" Date: Thu, 25 Jul 2024 15:56:30 -0400 Subject: [PATCH 02/10] Update Changelog and lock --- CHANGELOG.md | 4 ++++ Cargo.lock | 6 +++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 18c7d7b..2db351e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,10 @@ Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how ## [0.17.0] +### Added + +- Add reset subcommand to enable quick instrument resetting (TSP-730) + ### Fixed - Fixed an indexing issue for uploading modules (TSP-761) *Open Source Contribution: c3charvat, amcooper181* diff --git a/Cargo.lock b/Cargo.lock index 7d1332a..30afeb2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1128,7 +1128,7 @@ dependencies = [ [[package]] name = "instrument-repl" -version = "0.16.3" +version = "0.17.0" dependencies = [ "chrono", "clap", @@ -1254,7 +1254,7 @@ dependencies = [ [[package]] name = "kic" -version = "0.16.3" +version = "0.17.0" dependencies = [ "anyhow", "clap", @@ -1273,7 +1273,7 @@ dependencies = [ [[package]] name = "kic-discover" -version = "0.16.3" +version = "0.17.0" dependencies = [ "anyhow", "async-std", From 8fe38376949477dbc907eb583dc7c049a2638db7 Mon Sep 17 00:00:00 2001 From: "Sarver, Edwin" Date: Fri, 26 Jul 2024 09:43:16 -0400 Subject: [PATCH 03/10] cargo fmt --- kic/src/main.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/kic/src/main.rs b/kic/src/main.rs index b7d6fb1..360295c 100644 --- a/kic/src/main.rs +++ b/kic/src/main.rs @@ -741,7 +741,6 @@ fn reset(args: &ArgMatches) -> anyhow::Result<()> { error!("Error sending *RST to instrument: {e}"); return Err(e.into()); } - } info!("Instrument reset"); From 72199d55ae1906a03739ba08aac204d4163f97ea Mon Sep 17 00:00:00 2001 From: "Sarver, Edwin" Date: Tue, 30 Jul 2024 13:15:06 -0400 Subject: [PATCH 04/10] Specify `-t` as Abbreviation for `--timeout` --- kic-discover/src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kic-discover/src/main.rs b/kic-discover/src/main.rs index 6c65851..aeba5e8 100644 --- a/kic-discover/src/main.rs +++ b/kic-discover/src/main.rs @@ -71,7 +71,7 @@ pub(crate) struct DiscoverCmd { /// The number of seconds to wait for instrument to be discovered. /// If not specified, run continuously until the application is signalled. - #[clap(name = "seconds", long = "timeout", short)] + #[clap(name = "seconds", long = "timeout", short = 't')] timeout_secs: Option, /// This parameter specifies whether we need to wait for a few seconds before closing the json rpc connection. From fa3c29da0e6902d31e227cc9a17e6b1cbf59a095 Mon Sep 17 00:00:00 2001 From: "Sarver, Edwin" Date: Tue, 30 Jul 2024 13:17:17 -0400 Subject: [PATCH 05/10] fix USB usage, remove USB subcommand, use drop to cleanup instrument --- kic/src/main.rs | 44 +++++++++++++++----------------------------- 1 file changed, 15 insertions(+), 29 deletions(-) diff --git a/kic/src/main.rs b/kic/src/main.rs index 98d3b72..79852c9 100644 --- a/kic/src/main.rs +++ b/kic/src/main.rs @@ -87,21 +87,21 @@ fn add_connection_subcommands( .value_parser(value_parser!(IpAddr)), ); - let mut usb = Command::new("usb") - .about("Perform the given action over a USBTMC connection") - .arg( - Arg::new("addr") - .help("The instrument address in the form of, for example, `05e6:2461:012345`, where the first part is the vendor id, the second part is the product id, and the third part is the serial number.") - .required(true) - .value_parser(value_parser!(UsbtmcAddr)), - ); + //TODO(Fix async USB): let mut usb = Command::new("usb") + // .about("Perform the given action over a USBTMC connection") + // .arg( + // Arg::new("addr") + // .help("The instrument address in the form of, for example, `USB:2461:012345` where the second part is the product id, and the third part is the serial number.") + // .required(true) + // .value_parser(value_parser!(UsbtmcAddr)), + // ); for arg in additional_args { lan = lan.arg(arg.clone()); - usb = usb.arg(arg.clone()); + //TODO(Fix async USB): usb = usb.arg(arg.clone()); } - command.subcommand(lan).subcommand(usb) + command.subcommand(lan)//TODO(Fix async USB): .subcommand(usb) } #[must_use] @@ -468,13 +468,12 @@ impl ConnectionType { Ok(Self::Lan(socket_addr)) } Some(("usb", sub_matches)) => { - let addr: String = sub_matches - .get_one::("addr") + let usb_addr: UsbtmcAddr = sub_matches + .get_one::("addr") .ok_or(KicError::ArgParseError { details: "no USB address provided".to_string(), })? .clone(); - let usb_addr: UsbtmcAddr = addr.parse()?; Ok(Self::Usb(usb_addr)) } @@ -810,7 +809,7 @@ fn reset(args: &ArgMatches) -> anyhow::Result<()> { return Err(e); } }; - let mut instrument: Box = match connect_sync_instrument(conn) { + let instrument: Box = match connect_sync_instrument(conn) { Ok(i) => i, Err(e) => { error!("Error connecting to sync instrument: {e}"); @@ -818,21 +817,8 @@ fn reset(args: &ArgMatches) -> anyhow::Result<()> { } }; - match instrument.write_all(b"abort\n") { - Ok(_) => {} - Err(e) => { - error!("Error sending abort to instrument: {e}"); - return Err(e.into()); - } - } - - match instrument.write_all(b"*RST\n") { - Ok(_) => {} - Err(e) => { - error!("Error sending *RST to instrument: {e}"); - return Err(e.into()); - } - } + // dropping the instrument will reset it appropriately. + drop(instrument); info!("Instrument reset"); From aa3546222ed8a4e842492eaf87f182a3c21da1eb Mon Sep 17 00:00:00 2001 From: "Sarver, Edwin" Date: Tue, 30 Jul 2024 13:20:43 -0400 Subject: [PATCH 06/10] Cargo fmt --- kic/src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kic/src/main.rs b/kic/src/main.rs index 79852c9..48b6a18 100644 --- a/kic/src/main.rs +++ b/kic/src/main.rs @@ -101,7 +101,7 @@ fn add_connection_subcommands( //TODO(Fix async USB): usb = usb.arg(arg.clone()); } - command.subcommand(lan)//TODO(Fix async USB): .subcommand(usb) + command.subcommand(lan) //TODO(Fix async USB): .subcommand(usb) } #[must_use] From be401bdfed4ffe61f845b6e7f58ab618f5303bc7 Mon Sep 17 00:00:00 2001 From: "Sarver, Edwin" Date: Tue, 30 Jul 2024 13:20:59 -0400 Subject: [PATCH 07/10] Update Deps --- Cargo.lock | 205 ++++++++++++++++++++++++++++------------------------- 1 file changed, 110 insertions(+), 95 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index a53fba5..49dc0fc 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -43,9 +43,9 @@ dependencies = [ [[package]] name = "anstream" -version = "0.6.14" +version = "0.6.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "418c75fa768af9c03be99d17643f93f79bbba589895012a80e3452a19ddda15b" +checksum = "64e15c1ab1f89faffbf04a634d5e1962e9074f2741eef6d97f3c4e322426d526" dependencies = [ "anstyle", "anstyle-parse", @@ -58,33 +58,33 @@ dependencies = [ [[package]] name = "anstyle" -version = "1.0.7" +version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "038dfcf04a5feb68e9c60b21c9625a54c2c0616e79b72b0fd87075a056ae1d1b" +checksum = "1bec1de6f59aedf83baf9ff929c98f2ad654b97c9510f4e70cf6f661d49fd5b1" [[package]] name = "anstyle-parse" -version = "0.2.4" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c03a11a9034d92058ceb6ee011ce58af4a9bf61491aa7e1e59ecd24bd40d22d4" +checksum = "eb47de1e80c2b463c735db5b217a0ddc39d612e7ac9e2e96a5aed1f57616c1cb" dependencies = [ "utf8parse", ] [[package]] name = "anstyle-query" -version = "1.1.0" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad186efb764318d35165f1758e7dcef3b10628e26d41a44bc5550652e6804391" +checksum = "6d36fc52c7f6c869915e99412912f22093507da8d9e942ceaf66fe4b7c14422a" dependencies = [ "windows-sys 0.52.0", ] [[package]] name = "anstyle-wincon" -version = "3.0.3" +version = "3.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61a38449feb7068f52bb06c12759005cf459ee52bb4adc1d5a7c4322d716fb19" +checksum = "5bf74e1b6e971609db8ca7a9ce79fd5768ab6ae46441c572e46cf596f59e57f8" dependencies = [ "anstyle", "windows-sys 0.52.0", @@ -131,9 +131,9 @@ dependencies = [ [[package]] name = "async-executor" -version = "1.12.0" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8828ec6e544c02b0d6691d21ed9f9218d0384a82542855073c2a3f58304aaf0" +checksum = "d7ebdfa2ebdab6b1760375fa7d6f382b9f486eac35fc994625a00e89280bdbb7" dependencies = [ "async-task", "concurrent-queue", @@ -235,9 +235,9 @@ dependencies = [ [[package]] name = "async-signal" -version = "0.2.8" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "794f185324c2f00e771cd9f1ae8b5ac68be2ca7abb129a87afd6e86d228bc54d" +checksum = "dfb3634b73397aa844481f814fad23bbf07fdb0eabec10f2eb95e58944b1ec32" dependencies = [ "async-io 2.3.3", "async-lock 3.4.0", @@ -314,7 +314,7 @@ checksum = "6e0c28dcc82d7c8ead5cb13beb15405b57b8546e93215673ff8ca0349a028107" dependencies = [ "proc-macro2", "quote", - "syn 2.0.70", + "syn 2.0.72", ] [[package]] @@ -413,15 +413,15 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.6.0" +version = "1.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "514de17de45fdb8dc022b1a7975556c53c86f9f0aa5f534b98977b171857c2c9" +checksum = "a12916984aab3fa6e39d655a33e09c0071eb36d6ab3aea5c2d78551f1df6d952" [[package]] name = "cc" -version = "1.1.0" +version = "1.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eaff6f8ce506b9773fa786672d63fc7a191ffea1be33f72bbd4aeacefca9ffc8" +checksum = "26a5c3fd7bfa1ce3897a3a3501d362b2d87b7f2583ebcb4a949ec25911025cbc" [[package]] name = "cfg-if" @@ -451,9 +451,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.9" +version = "4.5.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64acc1846d54c1fe936a78dc189c34e28d3f5afc348403f28ecf53660b9b8462" +checksum = "35723e6a11662c2afb578bcf0b88bf6ea8e21282a953428f240574fcc3a2b5b3" dependencies = [ "clap_builder", "clap_derive", @@ -461,9 +461,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.9" +version = "4.5.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fb8393d67ba2e7bfaf28a23458e4e2b543cc73a99595511eb207fdb8aede942" +checksum = "49eb96cbfa7cfa35017b7cd548c75b14c3118c98b423041d70562665e07fb0fa" dependencies = [ "anstream", "anstyle", @@ -473,27 +473,27 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.5.8" +version = "4.5.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bac35c6dafb060fd4d275d9a4ffae97917c13a6327903a8be2153cd964f7085" +checksum = "5d029b67f89d30bbb547c89fd5161293c0aec155fc691d7924b64550662db93e" dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.70", + "syn 2.0.72", ] [[package]] name = "clap_lex" -version = "0.7.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b82cf0babdbd58558212896d1a4272303a57bdb245c2bf1147185fb45640e70" +checksum = "1462739cb27611015575c0c11df5df7601141071f07518d56fcc1be504cbec97" [[package]] name = "colorchoice" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b6a852b24ab71dffc585bcb46eaf7959d175cb865a7152e35b348d1b2960422" +checksum = "d3fd119d74b830634cea2a0f58bbd0d54540518a14397557951e79340abc28c0" [[package]] name = "colored" @@ -776,7 +776,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.70", + "syn 2.0.72", ] [[package]] @@ -945,9 +945,9 @@ dependencies = [ [[package]] name = "http-body" -version = "1.0.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cac85db508abc24a2e48553ba12a996e87244a0395ce011e62b37158745d643" +checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" dependencies = [ "bytes", "http 1.1.0", @@ -962,7 +962,7 @@ dependencies = [ "bytes", "futures-util", "http 1.1.0", - "http-body 1.0.0", + "http-body 1.0.1", "pin-project-lite", ] @@ -1012,7 +1012,7 @@ dependencies = [ "futures-util", "h2 0.4.5", "http 1.1.0", - "http-body 1.0.0", + "http-body 1.0.1", "httparse", "itoa", "pin-project-lite", @@ -1064,7 +1064,7 @@ dependencies = [ "futures-channel", "futures-util", "http 1.1.0", - "http-body 1.0.0", + "http-body 1.0.1", "hyper 1.4.1", "pin-project-lite", "socket2 0.5.7", @@ -1161,9 +1161,9 @@ checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" [[package]] name = "is_terminal_polyfill" -version = "1.70.0" +version = "1.70.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8478577c03552c21db0e2724ffb8986a5ce7af88107e6be5d2ee6e158c12800" +checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf" [[package]] name = "itoa" @@ -1423,13 +1423,14 @@ dependencies = [ [[package]] name = "mio" -version = "0.8.11" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c" +checksum = "4569e456d394deccd22ce1c1913e6ea0e54519f577285001215d33557431afe4" dependencies = [ + "hermit-abi 0.3.9", "libc", "wasi", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] @@ -1504,21 +1505,11 @@ dependencies = [ "autocfg", ] -[[package]] -name = "num_cpus" -version = "1.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" -dependencies = [ - "hermit-abi 0.3.9", - "libc", -] - [[package]] name = "object" -version = "0.36.1" +version = "0.36.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "081b846d1d56ddfc18fdf1a922e4f6e07a11768ea1b92dec44e42b72712ccfce" +checksum = "3f203fa8daa7bb185f760ae12bd8e097f63d17041dcdcaf675ac54cdf863170e" dependencies = [ "memchr", ] @@ -1537,9 +1528,9 @@ checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" [[package]] name = "openssl" -version = "0.10.64" +version = "0.10.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95a0481286a310808298130d22dd1fef0fa571e05a8f44ec801801e84b216b1f" +checksum = "9529f4786b70a3e8c61e11179af17ab6188ad8d0ded78c5529441ed39d4bd9c1" dependencies = [ "bitflags 2.6.0", "cfg-if 1.0.0", @@ -1558,7 +1549,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.70", + "syn 2.0.72", ] [[package]] @@ -1569,9 +1560,9 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "openssl-sys" -version = "0.9.102" +version = "0.9.103" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c597637d56fbc83893a35eb0dd04b2b8e7a50c91e64e9493e398b5df4fb45fa2" +checksum = "7f9e8deee91df40a943c71b917e5874b951d32a802526c85721ce3b776c929d6" dependencies = [ "cc", "libc", @@ -1650,7 +1641,7 @@ dependencies = [ "phf_shared", "proc-macro2", "quote", - "syn 2.0.70", + "syn 2.0.72", ] [[package]] @@ -1679,7 +1670,7 @@ checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" dependencies = [ "proc-macro2", "quote", - "syn 2.0.70", + "syn 2.0.72", ] [[package]] @@ -1744,9 +1735,12 @@ dependencies = [ [[package]] name = "ppv-lite86" -version = "0.2.17" +version = "0.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" +checksum = "dee4364d9f3b902ef14fab8a1ddffb783a1cb6b4bba3bfc1fa3922732c7de97f" +dependencies = [ + "zerocopy", +] [[package]] name = "proc-macro-error" @@ -1828,9 +1822,9 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.5.2" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c82cf8cff14456045f55ec4241383baeff27af886adb72ffb2162f99911de0fd" +checksum = "2a908a6e00f1fdd0dfd9c0eb08ce85126f6d8bbda50017e74bc4a4b7d4a926a4" dependencies = [ "bitflags 2.6.0", ] @@ -1878,7 +1872,7 @@ dependencies = [ "futures-util", "h2 0.4.5", "http 1.1.0", - "http-body 1.0.0", + "http-body 1.0.1", "http-body-util", "hyper 1.4.1", "hyper-rustls", @@ -2001,9 +1995,9 @@ dependencies = [ [[package]] name = "rustls" -version = "0.23.11" +version = "0.23.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4828ea528154ae444e5a642dbb7d5623354030dc9822b83fd9bb79683c7399d0" +checksum = "c58f8c84392efc0a126acce10fa59ff7b3d2ac06ab451a33f2741989b806b044" dependencies = [ "once_cell", "rustls-pki-types", @@ -2030,9 +2024,9 @@ checksum = "976295e77ce332211c0d24d92c0e83e50f5c5f046d11082cea19f3df13a3562d" [[package]] name = "rustls-webpki" -version = "0.102.5" +version = "0.102.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9a6fccd794a42c2c105b513a2f62bc3fd8f3ba57a4593677ceb0bd035164d78" +checksum = "8e6b52d4fda176fd835fdc55a835d4a89b8499cad995885a21149d5ad62f852e" dependencies = [ "ring", "rustls-pki-types", @@ -2085,9 +2079,9 @@ checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" [[package]] name = "security-framework" -version = "2.11.0" +version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c627723fd09706bacdb5cf41499e95098555af3c3c29d014dc3c458ef6be11c0" +checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" dependencies = [ "bitflags 2.6.0", "core-foundation", @@ -2098,9 +2092,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.11.0" +version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "317936bbbd05227752583946b9e66d7ce3b489f84e11a94a510b4437fef407d7" +checksum = "75da29fe9b9b08fe9d6b22b5b4bcbc75d8db3aa31e639aa56bb62e9d46bfceaf" dependencies = [ "core-foundation-sys", "libc", @@ -2123,16 +2117,17 @@ checksum = "e0cd7e117be63d3c3678776753929474f3b04a43a080c744d6b0ae2a8c28e222" dependencies = [ "proc-macro2", "quote", - "syn 2.0.70", + "syn 2.0.72", ] [[package]] name = "serde_json" -version = "1.0.120" +version = "1.0.121" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e0d21c9a8cae1235ad58a00c11cb40d4b1e5c784f1ef2c537876ed6ffd8b7c5" +checksum = "4ab380d7d9f22ef3f21ad3e6c1ebe8e4fc7a2000ccba2e4d71fc96f15b2cb609" dependencies = [ "itoa", + "memchr", "ryu", "serde", ] @@ -2291,9 +2286,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.70" +version = "2.0.72" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f0209b68b3613b093e0ec905354eccaedcfe83b8cb37cbdeae64026c3064c16" +checksum = "dc4b9b9bf2add8093d3f2c0204471e951b2285580335de42f9d2534f3ae7a8af" dependencies = [ "proc-macro2", "quote", @@ -2353,22 +2348,22 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.61" +version = "1.0.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c546c80d6be4bc6a00c0f01730c08df82eaa7a7a61f11d656526506112cc1709" +checksum = "c0342370b38b6a11b6cc11d6a805569958d54cfa061a29969c3b5ce2ea405724" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.61" +version = "1.0.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46c3384250002a6d5af4d114f2845d37b57521033f30d5c3f46c4d70e1197533" +checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261" dependencies = [ "proc-macro2", "quote", - "syn 2.0.70", + "syn 2.0.72", ] [[package]] @@ -2408,32 +2403,31 @@ dependencies = [ [[package]] name = "tokio" -version = "1.38.0" +version = "1.39.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba4f4a02a7a80d6f274636f0aa95c7e383b912d41fe721a31f29e29698585a4a" +checksum = "daa4fb1bc778bd6f04cbfc4bb2d06a7396a8f299dc33ea1900cedaa316f467b1" dependencies = [ "backtrace", "bytes", "libc", "mio", - "num_cpus", "parking_lot", "pin-project-lite", "signal-hook-registry", "socket2 0.5.7", "tokio-macros", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] name = "tokio-macros" -version = "2.3.0" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f5ae998a069d4b5aba8ee9dad856af7d520c3699e6159b185c2acd48155d39a" +checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" dependencies = [ "proc-macro2", "quote", - "syn 2.0.70", + "syn 2.0.72", ] [[package]] @@ -2531,7 +2525,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.70", + "syn 2.0.72", ] [[package]] @@ -2683,9 +2677,9 @@ checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" [[package]] name = "version_check" -version = "0.9.4" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" +checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" [[package]] name = "waker-fn" @@ -2729,7 +2723,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.70", + "syn 2.0.72", "wasm-bindgen-shared", ] @@ -2763,7 +2757,7 @@ checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.70", + "syn 2.0.72", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -2964,6 +2958,27 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "zerocopy" +version = "0.6.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "854e949ac82d619ee9a14c66a1b674ac730422372ccb759ce0c39cabcf2bf8e6" +dependencies = [ + "byteorder", + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.6.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "125139de3f6b9d625c39e2efdd73d41bdac468ccd556556440e322be0e1bbd91" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.72", +] + [[package]] name = "zeroize" version = "1.8.1" From db20d1431779164713ec184a2bd96ee04543253b Mon Sep 17 00:00:00 2001 From: "Sarver, Edwin" Date: Wed, 31 Jul 2024 08:18:01 -0400 Subject: [PATCH 08/10] Resolve Conflicting Short Flag for Slots in Upgrade Subcommand --- kic/src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kic/src/main.rs b/kic/src/main.rs index 48b6a18..26555f8 100644 --- a/kic/src/main.rs +++ b/kic/src/main.rs @@ -180,7 +180,7 @@ fn cmds() -> Command { .value_parser(PathBufValueParser::new()), Arg::new("slot") - .short('s') + .short('m') .long("slot") .help("[VersaTest only] Update a module in given slot number instead of the VersaTest mainframe") .required(false) From afcf4d69cbef0e54eb8a325bad86a399a49e237d Mon Sep 17 00:00:00 2001 From: "Sarver, Edwin" Date: Wed, 31 Jul 2024 08:18:17 -0400 Subject: [PATCH 09/10] Update Deps --- Cargo.lock | 20 ++++++++++---------- Cargo.toml | 5 ++++- 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 49dc0fc..450fe3c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -413,9 +413,9 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.6.1" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a12916984aab3fa6e39d655a33e09c0071eb36d6ab3aea5c2d78551f1df6d952" +checksum = "fca2be1d5c43812bae364ee3f30b3afcb7877cf59f4aeb94c66f313a41d2fac9" [[package]] name = "cc" @@ -1735,11 +1735,12 @@ dependencies = [ [[package]] name = "ppv-lite86" -version = "0.2.18" +version = "0.2.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dee4364d9f3b902ef14fab8a1ddffb783a1cb6b4bba3bfc1fa3922732c7de97f" +checksum = "2288c0e17cc8d342c712bb43a257a80ebffce59cdb33d5000d8348f3ec02528b" dependencies = [ "zerocopy", + "zerocopy-derive", ] [[package]] @@ -2584,8 +2585,7 @@ checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" [[package]] name = "tsp-toolkit-kic-lib" -version = "0.16.1" -source = "git+https://github.com/tektronix/tsp-toolkit-kic-lib.git?tag=v0.16.1#a568d2e89bdfe32beffbc25a3089a7359356993e" +version = "0.17.0" dependencies = [ "bytes", "chrono", @@ -2960,9 +2960,9 @@ dependencies = [ [[package]] name = "zerocopy" -version = "0.6.6" +version = "0.7.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "854e949ac82d619ee9a14c66a1b674ac730422372ccb759ce0c39cabcf2bf8e6" +checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" dependencies = [ "byteorder", "zerocopy-derive", @@ -2970,9 +2970,9 @@ dependencies = [ [[package]] name = "zerocopy-derive" -version = "0.6.6" +version = "0.7.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "125139de3f6b9d625c39e2efdd73d41bdac468ccd556556440e322be0e1bbd91" +checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", diff --git a/Cargo.toml b/Cargo.toml index 79c2167..7cf2f77 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 = { version = "0.3.18", features = ["json"] } -tsp-toolkit-kic-lib = { git = "https://github.com/tektronix/tsp-toolkit-kic-lib.git", tag = "v0.16.1" } +tsp-toolkit-kic-lib = { git = "https://github.com/tektronix/tsp-toolkit-kic-lib.git", tag = "v0.17.0-0" } [workspace.lints.rust] warnings = "deny" @@ -57,3 +57,6 @@ arithmetic_side_effects = "deny" all = "warn" missing_doc_code_examples = "warn" + +[patch."https://github.com/tektronix/tsp-toolkit-kic-lib.git"] +tsp-toolkit-kic-lib = { path = "../tsp-toolkit-kic-lib" } From 216df6c2e5eca797d191519f954fcee04c2a7ae0 Mon Sep 17 00:00:00 2001 From: "Sarver, Edwin" Date: Wed, 31 Jul 2024 08:24:01 -0400 Subject: [PATCH 10/10] Remove Patch in Cargo.toml --- Cargo.lock | 1 + Cargo.toml | 3 --- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 450fe3c..ffcb6a4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2586,6 +2586,7 @@ checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" [[package]] name = "tsp-toolkit-kic-lib" version = "0.17.0" +source = "git+https://github.com/tektronix/tsp-toolkit-kic-lib.git?tag=v0.17.0-0#20eda1be9df9ca9ce3b8a9b0a1f3e4e16b9894b7" dependencies = [ "bytes", "chrono", diff --git a/Cargo.toml b/Cargo.toml index 7cf2f77..6690934 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -57,6 +57,3 @@ arithmetic_side_effects = "deny" all = "warn" missing_doc_code_examples = "warn" - -[patch."https://github.com/tektronix/tsp-toolkit-kic-lib.git"] -tsp-toolkit-kic-lib = { path = "../tsp-toolkit-kic-lib" }