diff --git a/components/Cargo.lock b/components/Cargo.lock index 4777dac..b808d1a 100644 --- a/components/Cargo.lock +++ b/components/Cargo.lock @@ -2,21 +2,6 @@ # It is not intended for manual editing. version = 4 -[[package]] -name = "addr2line" -version = "0.24.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfbe277e56a376000877090da837660b4427aad530e3028d44e0bffe4f89a1c1" -dependencies = [ - "gimli", -] - -[[package]] -name = "adler2" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" - [[package]] name = "aes" version = "0.8.4" @@ -56,12 +41,6 @@ version = "0.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5c6cb57a04249c6480766f7f7cef5467412af1490f8d1e243141daddada3264f" -[[package]] -name = "android-tzdata" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" - [[package]] name = "android_system_properties" version = "0.1.5" @@ -162,7 +141,7 @@ checksum = "965c2d33e53cb6b267e148a4cb0760bc01f4904c1cd4bb4002a085bb016d1490" dependencies = [ "proc-macro2", "quote", - "syn 2.0.87", + "syn 2.0.111", "synstructure", ] @@ -174,7 +153,7 @@ checksum = "7b18050c2cd6fe86c3a76584ef5e0baf286d038cda203eb6223df2cc413565f7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.87", + "syn 2.0.111", ] [[package]] @@ -189,21 +168,37 @@ dependencies = [ ] [[package]] -name = "async-trait" -version = "0.1.86" +name = "async-stream" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "644dd749086bf3771a2fbc5f256fdb982d53f011c7d5d560304eafeecebce79d" +checksum = "0b5a71a6f37880a80d1d7f19efd781e4b5de42c88f0722cc13bcb6cc2cfe8476" +dependencies = [ + "async-stream-impl", + "futures-core", + "pin-project-lite", +] + +[[package]] +name = "async-stream-impl" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7c24de15d275a1ecfd47a380fb4d5ec9bfe0933f309ed5e705b775596a3574d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.87", + "syn 2.0.111", ] [[package]] -name = "atomic-waker" -version = "1.1.2" +name = "async-trait" +version = "0.1.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" +checksum = "9035ad2d096bed7955a320ee7e2230574d28fd3c3a0f186cbea1ff3c7eed5dbb" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.111", +] [[package]] name = "autocfg" @@ -211,23 +206,60 @@ version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" +[[package]] +name = "autotools" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef941527c41b0fc0dd48511a8154cd5fc7e29200a0ff8b7203c5d777dbc795cf" +dependencies = [ + "cc", +] + +[[package]] +name = "axum" +version = "0.6.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b829e4e32b91e643de6eafe82b1d90675f5874230191a4ffbc1b336dec4d6bf" +dependencies = [ + "async-trait", + "axum-core 0.3.4", + "bitflags 1.3.2", + "bytes", + "futures-util", + "http 0.2.12", + "http-body 0.4.6", + "hyper 0.14.32", + "itoa", + "matchit 0.7.3", + "memchr", + "mime", + "percent-encoding", + "pin-project-lite", + "rustversion", + "serde", + "sync_wrapper 0.1.2", + "tower 0.4.13", + "tower-layer", + "tower-service", +] + [[package]] name = "axum" version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6d6fd624c75e18b3b4c6b9caf42b1afe24437daaee904069137d8bab077be8b8" dependencies = [ - "axum-core", + "axum-core 0.5.0", "bytes", "form_urlencoded", "futures-util", "http 1.1.0", - "http-body", + "http-body 1.0.1", "http-body-util", - "hyper", + "hyper 1.5.0", "hyper-util", "itoa", - "matchit", + "matchit 0.8.4", "memchr", "mime", "percent-encoding", @@ -237,7 +269,7 @@ dependencies = [ "serde_json", "serde_path_to_error", "serde_urlencoded", - "sync_wrapper", + "sync_wrapper 1.0.1", "tokio", "tower 0.5.2", "tower-layer", @@ -245,6 +277,23 @@ dependencies = [ "tracing", ] +[[package]] +name = "axum-core" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "759fa577a247914fd3f7f76d62972792636412fbfd634cd452f6a385a74d2d2c" +dependencies = [ + "async-trait", + "bytes", + "futures-util", + "http 0.2.12", + "http-body 0.4.6", + "mime", + "rustversion", + "tower-layer", + "tower-service", +] + [[package]] name = "axum-core" version = "0.5.0" @@ -254,32 +303,17 @@ dependencies = [ "bytes", "futures-util", "http 1.1.0", - "http-body", + "http-body 1.0.1", "http-body-util", "mime", "pin-project-lite", "rustversion", - "sync_wrapper", + "sync_wrapper 1.0.1", "tower-layer", "tower-service", "tracing", ] -[[package]] -name = "backtrace" -version = "0.3.74" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d82cb332cdfaed17ae235a638438ac4d4839913cc2af585c3c6746e8f8bee1a" -dependencies = [ - "addr2line", - "cfg-if", - "libc", - "miniz_oxide", - "object", - "rustc-demangle", - "windows-targets 0.52.6", -] - [[package]] name = "base64" version = "0.21.7" @@ -381,15 +415,14 @@ checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" [[package]] name = "chrono" -version = "0.4.39" +version = "0.4.42" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e36cc9d416881d2e24f9a963be5fb1cd90966419ac844274161d10488b3e825" +checksum = "145052bdd345b87320e369255277e3fb5152762ad123a901ef5c262dd38fe8d2" dependencies = [ - "android-tzdata", "iana-time-zone", "num-traits", "serde", - "windows-targets 0.52.6", + "windows-link", ] [[package]] @@ -404,9 +437,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.29" +version = "4.5.53" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8acebd8ad879283633b343856142139f2da2317c96b05b4dd6181c61e2480184" +checksum = "c9e340e012a1bf4935f5282ed1436d1489548e8f72308207ea5df0e23d2d03f8" dependencies = [ "clap_builder", "clap_derive", @@ -414,9 +447,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.29" +version = "4.5.53" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6ba32cbda51c7e1dfd49acc1457ba1a7dec5b64fe360e828acb13ca8dc9c2f9" +checksum = "d76b5d13eaa18c901fd2f7fca939fefe3a0727a953561fefdf3b2922b8569d00" dependencies = [ "anstream", "anstyle", @@ -426,14 +459,14 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.5.28" +version = "4.5.49" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf4ced95c6f4a675af3da73304b9ac4ed991640c36374e4b46795c49e17cf1ed" +checksum = "2a0b5487afeab2deb2ff4e03a807ad1a03ac532ff5a2cee5d86884440c7f7671" dependencies = [ - "heck", + "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.87", + "syn 2.0.111", ] [[package]] @@ -584,7 +617,7 @@ dependencies = [ "openssl-probe", "openssl-sys", "schannel", - "socket2", + "socket2 0.5.7", "windows-sys 0.52.0", ] @@ -685,7 +718,7 @@ checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.87", + "syn 2.0.111", ] [[package]] @@ -732,12 +765,12 @@ dependencies = [ [[package]] name = "env_logger" -version = "0.11.6" +version = "0.11.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcaee3d8e3cfc3fd92428d477bc97fc29ec8716d180c0d74c643bb26166660e0" +checksum = "13c863f0904021b108aa8b2f55046443e6b1ebde8fd4a15c399893aae4fa069f" dependencies = [ "env_filter", - "humantime", + "jiff", "log", ] @@ -835,15 +868,11 @@ dependencies = [ "env_logger", "fms-proto", "fms-zenoh", - "influx-client", + "http 0.2.12", + "kuksa-rust-sdk", "log", - "prost", - "prost-types", "protobuf", - "protoc-bin-vendored", "tokio", - "tonic", - "tonic-build", "up-rust", "up-transport-hono-mqtt", "up-transport-zenoh", @@ -863,7 +892,7 @@ name = "fms-server" version = "0.1.0-SNAPSHOT" dependencies = [ "async-trait", - "axum", + "axum 0.8.1", "chrono", "clap", "const_format", @@ -971,7 +1000,7 @@ checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" dependencies = [ "proc-macro2", "quote", - "syn 2.0.87", + "syn 2.0.111", ] [[package]] @@ -1033,12 +1062,6 @@ dependencies = [ "wasm-bindgen", ] -[[package]] -name = "gimli" -version = "0.31.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" - [[package]] name = "git-version" version = "0.3.9" @@ -1056,21 +1079,21 @@ checksum = "53010ccb100b96a67bc32c0175f0ed1426b31b655d562898e57325f81c023ac0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.87", + "syn 2.0.111", ] [[package]] name = "h2" -version = "0.4.6" +version = "0.3.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "524e8ac6999421f49a846c2d4411f337e53497d8ec55d67753beffa43c5d9205" +checksum = "81fe527a889e1532da5c525686d96d4c2e74cdd345badf8dfef9f6b39dd5f5e8" dependencies = [ - "atomic-waker", "bytes", "fnv", "futures-core", "futures-sink", - "http 1.1.0", + "futures-util", + "http 0.2.12", "indexmap 2.6.0", "slab", "tokio", @@ -1100,6 +1123,12 @@ version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e087f84d4f86bf4b218b927129862374b72199ae7d8657835f1e89000eea4fb" +[[package]] +name = "heck" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" + [[package]] name = "heck" version = "0.5.0" @@ -1152,6 +1181,17 @@ dependencies = [ "itoa", ] +[[package]] +name = "http-body" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" +dependencies = [ + "bytes", + "http 0.2.12", + "pin-project-lite", +] + [[package]] name = "http-body" version = "1.0.1" @@ -1171,7 +1211,7 @@ dependencies = [ "bytes", "futures-util", "http 1.1.0", - "http-body", + "http-body 1.0.1", "pin-project-lite", ] @@ -1193,6 +1233,30 @@ version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" +[[package]] +name = "hyper" +version = "0.14.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41dfc780fdec9373c01bae43289ea34c972e40ee3c9f6b3c8801a35f35586ce7" +dependencies = [ + "bytes", + "futures-channel", + "futures-core", + "futures-util", + "h2", + "http 0.2.12", + "http-body 0.4.6", + "httparse", + "httpdate", + "itoa", + "pin-project-lite", + "socket2 0.5.7", + "tokio", + "tower-service", + "tracing", + "want", +] + [[package]] name = "hyper" version = "1.5.0" @@ -1202,29 +1266,26 @@ dependencies = [ "bytes", "futures-channel", "futures-util", - "h2", "http 1.1.0", - "http-body", + "http-body 1.0.1", "httparse", "httpdate", "itoa", "pin-project-lite", "smallvec", "tokio", - "want", ] [[package]] name = "hyper-timeout" -version = "0.5.1" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3203a961e5c83b6f5498933e78b6b263e208c197b63e9c6c53cc82ffd3f63793" +checksum = "bbb958482e8c7be4bc3cf272a766a2b0bf1a6755e7a6ae777f017a31d11b13b1" dependencies = [ - "hyper", - "hyper-util", + "hyper 0.14.32", "pin-project-lite", "tokio", - "tower-service", + "tokio-io-timeout", ] [[package]] @@ -1234,16 +1295,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "df2dcfbe0677734ab2f3ffa7fa7bfd4706bfdc1ef393f2ee30184aed67e631b4" dependencies = [ "bytes", - "futures-channel", "futures-util", "http 1.1.0", - "http-body", - "hyper", + "http-body 1.0.1", + "hyper 1.5.0", "pin-project-lite", - "socket2", "tokio", "tower-service", - "tracing", ] [[package]] @@ -1383,6 +1441,24 @@ dependencies = [ "waker-fn", ] +[[package]] +name = "itertools" +version = "0.10.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" +dependencies = [ + "either", +] + +[[package]] +name = "itertools" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" +dependencies = [ + "either", +] + [[package]] name = "itertools" version = "0.13.0" @@ -1398,6 +1474,30 @@ version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" +[[package]] +name = "jiff" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49cce2b81f2098e7e3efc35bc2e0a6b7abec9d34128283d7a26fa8f32a6dbb35" +dependencies = [ + "jiff-static", + "log", + "portable-atomic", + "portable-atomic-util", + "serde_core", +] + +[[package]] +name = "jiff-static" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "980af8b43c3ad5d8d349ace167ec8170839f753a42d233ba19e08afe1850fa69" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.111", +] + [[package]] name = "jni" version = "0.19.0" @@ -1456,6 +1556,24 @@ dependencies = [ "hashbrown 0.14.5", ] +[[package]] +name = "kuksa-rust-sdk" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "647702509420c86836ad2cd6eeaeb486319207caf0cbfcf11a69cfbb6190e183" +dependencies = [ + "futures-core", + "http 0.2.12", + "log", + "prost 0.12.6", + "prost-types 0.12.6", + "protobuf-src", + "tokio", + "tokio-stream", + "tonic", + "tonic-build", +] + [[package]] name = "lazy_static" version = "1.5.0" @@ -1467,9 +1585,9 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.169" +version = "0.2.177" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5aba8db14291edd000dfcc4d620c7ebfb122c613afb886ca8803fa4e128a20a" +checksum = "2874a2af47a2325c2001a6e6fad9b16a53b802102b528163885171cf92b15976" [[package]] name = "libloading" @@ -1537,9 +1655,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.25" +version = "0.4.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04cbf5b083de1c7e0222a7a51dbfdba1cbe1c6ab0b15e29fff3f6c077fd9cd9f" +checksum = "34080505efa8e45a4b816c349525ebe327ceaa8559756f0356cba97ef3bf7432" [[package]] name = "lz4_flex" @@ -1559,6 +1677,12 @@ dependencies = [ "regex-automata 0.1.10", ] +[[package]] +name = "matchit" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e7465ac9959cc2b1404e8e2367b43684a6d13790fe23056cc8c6c5a6b7bcb94" + [[package]] name = "matchit" version = "0.8.4" @@ -1589,15 +1713,6 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" -[[package]] -name = "miniz_oxide" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2d80299ef12ff69b16a84bb182e3b9df68b5a91574d3d4fa6e41b65deec4df1" -dependencies = [ - "adler2", -] - [[package]] name = "mio" version = "1.0.2" @@ -1612,9 +1727,9 @@ dependencies = [ [[package]] name = "multimap" -version = "0.10.0" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "defc4c55412d89136f966bbb339008b474350e5e6e78d2714439c386b3137a03" +checksum = "e5ce46fe64a9d73be07dcbe690a38ce1b293be448fd8ce1e6c1b8062c9f72c6a" [[package]] name = "nanorand" @@ -1754,16 +1869,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.87", -] - -[[package]] -name = "object" -version = "0.36.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aedf0a2d09c573ed1d8d85b30c119153926a2b36dce0ab28322c09a117a4683e" -dependencies = [ - "memchr", + "syn 2.0.111", ] [[package]] @@ -1911,7 +2017,7 @@ dependencies = [ "pest_meta", "proc-macro2", "quote", - "syn 2.0.87", + "syn 2.0.111", ] [[package]] @@ -1965,7 +2071,7 @@ dependencies = [ "phf_shared", "proc-macro2", "quote", - "syn 2.0.87", + "syn 2.0.111", ] [[package]] @@ -1994,7 +2100,7 @@ checksum = "3c0f5fad0874fc7abcd4d750e76917eaebbecaa2c20bde22e1dbeeba8beb758c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.87", + "syn 2.0.111", ] [[package]] @@ -2084,6 +2190,21 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "portable-atomic" +version = "1.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f84267b20a16ea918e43c6a88433c2d54fa145c92a811b5b047ccbe153674483" + +[[package]] +name = "portable-atomic-util" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8a2f0d8d040d7848a709caf78912debcc3f33ee4b3cac47d73d1e1069e83507" +dependencies = [ + "portable-atomic", +] + [[package]] name = "powerfmt" version = "0.2.0" @@ -2101,12 +2222,12 @@ dependencies = [ [[package]] name = "prettyplease" -version = "0.2.25" +version = "0.1.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64d1ec885c64d0457d564db4ec299b2dae3f9c02808b8ad9c3a089c591b18033" +checksum = "6c8646e95016a7a6c4adea95bafa8a16baab64b583356217f2c85db4a39d9a86" dependencies = [ "proc-macro2", - "syn 2.0.87", + "syn 1.0.109", ] [[package]] @@ -2121,71 +2242,104 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.89" +version = "1.0.103" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f139b0662de085916d1fb67d2b4169d1addddda1919e696f3252b740b629986e" +checksum = "5ee95bc4ef87b8d5ba32e8b7714ccc834865276eab0aed5c9958d00ec45f49e8" dependencies = [ "unicode-ident", ] [[package]] name = "prost" -version = "0.13.3" +version = "0.11.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b82eaa1d779e9a4bc1c3217db8ffbeabaae1dca241bf70183242128d48681cd" +dependencies = [ + "bytes", + "prost-derive 0.11.9", +] + +[[package]] +name = "prost" +version = "0.12.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b0487d90e047de87f984913713b85c601c05609aad5b0df4b4573fbf69aa13f" +checksum = "deb1435c188b76130da55f17a466d252ff7b1418b2ad3e037d127b94e3411f29" dependencies = [ "bytes", - "prost-derive", + "prost-derive 0.12.6", ] [[package]] name = "prost-build" -version = "0.13.3" +version = "0.11.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c1318b19085f08681016926435853bbf7858f9c082d0999b80550ff5d9abe15" +checksum = "119533552c9a7ffacc21e099c24a0ac8bb19c2a2a3f363de84cd9b844feab270" dependencies = [ "bytes", - "heck", - "itertools", + "heck 0.4.1", + "itertools 0.10.5", + "lazy_static", "log", "multimap", - "once_cell", "petgraph", "prettyplease", - "prost", - "prost-types", + "prost 0.11.9", + "prost-types 0.11.9", "regex", - "syn 2.0.87", + "syn 1.0.109", "tempfile", + "which", ] [[package]] name = "prost-derive" -version = "0.13.3" +version = "0.11.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9552f850d5f0964a4e4d0bf306459ac29323ddfbae05e35a7c0d35cb0803cc5" +checksum = "e5d2d8d10f3c6ded6da8b05b5fb3b8a5082514344d56c9f871412d29b4e075b4" dependencies = [ "anyhow", - "itertools", + "itertools 0.10.5", "proc-macro2", "quote", - "syn 2.0.87", + "syn 1.0.109", +] + +[[package]] +name = "prost-derive" +version = "0.12.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81bddcdb20abf9501610992b6759a4c888aef7d1a7247ef75e2404275ac24af1" +dependencies = [ + "anyhow", + "itertools 0.12.1", + "proc-macro2", + "quote", + "syn 2.0.111", +] + +[[package]] +name = "prost-types" +version = "0.11.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "213622a1460818959ac1181aaeb2dc9c7f63df720db7d788b3e24eacd1983e13" +dependencies = [ + "prost 0.11.9", ] [[package]] name = "prost-types" -version = "0.13.3" +version = "0.12.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4759aa0d3a6232fb8dbdb97b61de2c20047c68aca932c7ed76da9d788508d670" +checksum = "9091c90b0a32608e984ff2fa4091273cbdd755d54935c51d520887f4a1dbd5b0" dependencies = [ - "prost", + "prost 0.12.6", ] [[package]] name = "protobuf" -version = "3.7.1" +version = "3.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3a7c64d9bf75b1b8d981124c14c179074e8caa7dfe7b6a12e6222ddcd0c8f72" +checksum = "d65a1d4ddae7d8b5de68153b48f6aa3bba8cb002b243dbdbc55a5afbc98f99f4" dependencies = [ "bytes", "once_cell", @@ -2195,9 +2349,9 @@ dependencies = [ [[package]] name = "protobuf-codegen" -version = "3.7.1" +version = "3.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e26b833f144769a30e04b1db0146b2aaa53fd2fd83acf10a6b5f996606c18144" +checksum = "5d3976825c0014bbd2f3b34f0001876604fe87e0c86cd8fa54251530f1544ace" dependencies = [ "anyhow", "once_cell", @@ -2210,9 +2364,9 @@ dependencies = [ [[package]] name = "protobuf-parse" -version = "3.7.1" +version = "3.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "322330e133eab455718444b4e033ebfac7c6528972c784fcde28d2cc783c6257" +checksum = "b4aeaa1f2460f1d348eeaeed86aea999ce98c1bded6f089ff8514c9d9dbdc973" dependencies = [ "anyhow", "indexmap 2.6.0", @@ -2224,23 +2378,33 @@ dependencies = [ "which", ] +[[package]] +name = "protobuf-src" +version = "1.1.0+21.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7ac8852baeb3cc6fb83b93646fb93c0ffe5d14bf138c945ceb4b9948ee0e3c1" +dependencies = [ + "autotools", +] + [[package]] name = "protobuf-support" -version = "3.7.1" +version = "3.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b088fd20b938a875ea00843b6faf48579462630015c3788d397ad6a786663252" +checksum = "3e36c2f31e0a47f9280fb347ef5e461ffcd2c52dd520d8e216b52f93b0b0d7d6" dependencies = [ "thiserror 1.0.65", ] [[package]] name = "protoc-bin-vendored" -version = "3.1.0" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd89a830d0eab2502c81a9b8226d446a52998bb78e5e33cb2637c0cdd6068d99" +checksum = "d1c381df33c98266b5f08186583660090a4ffa0889e76c7e9a5e175f645a67fa" dependencies = [ "protoc-bin-vendored-linux-aarch_64", "protoc-bin-vendored-linux-ppcle_64", + "protoc-bin-vendored-linux-s390_64", "protoc-bin-vendored-linux-x86_32", "protoc-bin-vendored-linux-x86_64", "protoc-bin-vendored-macos-aarch_64", @@ -2250,45 +2414,51 @@ dependencies = [ [[package]] name = "protoc-bin-vendored-linux-aarch_64" -version = "3.1.0" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f563627339f1653ea1453dfbcb4398a7369b768925eb14499457aeaa45afe22c" +checksum = "c350df4d49b5b9e3ca79f7e646fde2377b199e13cfa87320308397e1f37e1a4c" [[package]] name = "protoc-bin-vendored-linux-ppcle_64" -version = "3.1.0" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5025c949a02cd3b60c02501dd0f348c16e8fff464f2a7f27db8a9732c608b746" +checksum = "a55a63e6c7244f19b5c6393f025017eb5d793fd5467823a099740a7a4222440c" + +[[package]] +name = "protoc-bin-vendored-linux-s390_64" +version = "3.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1dba5565db4288e935d5330a07c264a4ee8e4a5b4a4e6f4e83fad824cc32f3b0" [[package]] name = "protoc-bin-vendored-linux-x86_32" -version = "3.1.0" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c9500ce67d132c2f3b572504088712db715755eb9adf69d55641caa2cb68a07" +checksum = "8854774b24ee28b7868cd71dccaae8e02a2365e67a4a87a6cd11ee6cdbdf9cf5" [[package]] name = "protoc-bin-vendored-linux-x86_64" -version = "3.1.0" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5462592380cefdc9f1f14635bcce70ba9c91c1c2464c7feb2ce564726614cc41" +checksum = "b38b07546580df720fa464ce124c4b03630a6fb83e05c336fea2a241df7e5d78" [[package]] name = "protoc-bin-vendored-macos-aarch_64" -version = "3.1.0" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c637745681b68b4435484543667a37606c95ddacf15e917710801a0877506030" +checksum = "89278a9926ce312e51f1d999fee8825d324d603213344a9a706daa009f1d8092" [[package]] name = "protoc-bin-vendored-macos-x86_64" -version = "3.1.0" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38943f3c90319d522f94a6dfd4a134ba5e36148b9506d2d9723a82ebc57c8b55" +checksum = "81745feda7ccfb9471d7a4de888f0652e806d5795b61480605d4943176299756" [[package]] name = "protoc-bin-vendored-win32" -version = "3.1.0" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7dc55d7dec32ecaf61e0bd90b3d2392d721a28b95cfd23c3e176eccefbeab2f2" +checksum = "95067976aca6421a523e491fce939a3e65249bac4b977adee0ee9771568e8aa3" [[package]] name = "quinn" @@ -2302,7 +2472,7 @@ dependencies = [ "quinn-udp", "rustc-hash", "rustls", - "socket2", + "socket2 0.5.7", "thiserror 1.0.65", "tokio", "tracing", @@ -2335,16 +2505,16 @@ dependencies = [ "cfg_aliases", "libc", "once_cell", - "socket2", + "socket2 0.5.7", "tracing", "windows-sys 0.59.0", ] [[package]] name = "quote" -version = "1.0.37" +version = "1.0.42" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" +checksum = "a338cc41d27e6cc6dce6cefc13a0729dfbb81c262b1f519331575dd80ef3067f" dependencies = [ "proc-macro2", ] @@ -2439,7 +2609,7 @@ checksum = "bcc303e793d3734489387d205e9b186fac9c6cfacedd98cbb2e8a5943595f3e6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.87", + "syn 2.0.111", ] [[package]] @@ -2553,12 +2723,6 @@ dependencies = [ "num-traits", ] -[[package]] -name = "rustc-demangle" -version = "0.1.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" - [[package]] name = "rustc-hash" version = "2.0.0" @@ -2729,7 +2893,7 @@ dependencies = [ "proc-macro2", "quote", "serde_derive_internals", - "syn 2.0.87", + "syn 2.0.111", ] [[package]] @@ -2780,22 +2944,32 @@ checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" [[package]] name = "serde" -version = "1.0.214" +version = "1.0.228" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f55c3193aca71c12ad7890f1785d2b73e1b9f63a0bbc353c08ef26fe03fc56b5" +checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e" +dependencies = [ + "serde_core", + "serde_derive", +] + +[[package]] +name = "serde_core" +version = "1.0.228" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.214" +version = "1.0.228" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de523f781f095e28fa605cdce0f8307e451cc0fd14e2eb4cd2e98a355b147766" +checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79" dependencies = [ "proc-macro2", "quote", - "syn 2.0.87", + "syn 2.0.111", ] [[package]] @@ -2806,7 +2980,7 @@ checksum = "18d26a20a969b9e3fdf2fc2d9f21eda6c40e2de84c9408bb5d3b05d499aae711" dependencies = [ "proc-macro2", "quote", - "syn 2.0.87", + "syn 2.0.111", ] [[package]] @@ -2964,6 +3138,16 @@ dependencies = [ "windows-sys 0.52.0", ] +[[package]] +name = "socket2" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "17129e116933cf371d018bb80ae557e889637989d8638274fb25622827b03881" +dependencies = [ + "libc", + "windows-sys 0.60.2", +] + [[package]] name = "spin" version = "0.9.8" @@ -3014,15 +3198,21 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.87" +version = "2.0.111" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25aa4ce346d03a6dcd68dd8b4010bcb74e54e62c90c573f394c46eae99aba32d" +checksum = "390cc9a294ab71bdb1aa2e99d13be9c753cd2d7bd6560c77118597410c4d2e87" dependencies = [ "proc-macro2", "quote", "unicode-ident", ] +[[package]] +name = "sync_wrapper" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" + [[package]] name = "sync_wrapper" version = "1.0.1" @@ -3037,7 +3227,7 @@ checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" dependencies = [ "proc-macro2", "quote", - "syn 2.0.87", + "syn 2.0.111", ] [[package]] @@ -3079,7 +3269,7 @@ checksum = "ae71770322cbd277e69d762a16c444af02aa0575ac0d174f0b9562d3b37f8602" dependencies = [ "proc-macro2", "quote", - "syn 2.0.87", + "syn 2.0.111", ] [[package]] @@ -3090,7 +3280,7 @@ checksum = "26afc1baea8a989337eeb52b6e72a039780ce45c3edfcc9c5b9d112feeb173c2" dependencies = [ "proc-macro2", "quote", - "syn 2.0.87", + "syn 2.0.111", ] [[package]] @@ -3173,29 +3363,38 @@ dependencies = [ [[package]] name = "tokio" -version = "1.43.0" +version = "1.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d61fa4ffa3de412bfea335c6ecff681de2b609ba3c77ef3e00e521813a9ed9e" +checksum = "ff360e02eab121e0bc37a2d3b4d4dc622e6eda3a8e5253d5435ecf5bd4c68408" dependencies = [ - "backtrace", "bytes", "libc", "mio", "pin-project-lite", - "socket2", + "socket2 0.6.1", "tokio-macros", - "windows-sys 0.52.0", + "windows-sys 0.61.2", +] + +[[package]] +name = "tokio-io-timeout" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30b74022ada614a1b4834de765f9bb43877f910cc8ce4be40e89042c9223a8bf" +dependencies = [ + "pin-project-lite", + "tokio", ] [[package]] name = "tokio-macros" -version = "2.5.0" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e06d43f1345a3bcd39f6a56dbb7dcab2ba47e68e8ac134855e7e2bdbaf8cab8" +checksum = "af407857209536a95c8e56f8231ef2c2e2aff839b22e07a1ffcbc617e9db9fa5" dependencies = [ "proc-macro2", "quote", - "syn 2.0.87", + "syn 2.0.111", ] [[package]] @@ -3218,6 +3417,7 @@ dependencies = [ "futures-core", "pin-project-lite", "tokio", + "tokio-util", ] [[package]] @@ -3266,25 +3466,24 @@ dependencies = [ [[package]] name = "tonic" -version = "0.12.3" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "877c5b330756d856ffcc4553ab34a5684481ade925ecc54bcd1bf02b1d0d4d52" +checksum = "76c4eb7a4e9ef9d4763600161f12f5070b92a578e1b634db88a6887844c91a13" dependencies = [ + "async-stream", "async-trait", - "base64 0.22.1", + "axum 0.6.20", + "base64 0.21.7", "bytes", - "http 1.1.0", - "http-body", - "http-body-util", - "hyper", + "h2", + "http 0.2.12", + "http-body 0.4.6", + "hyper 0.14.32", "hyper-timeout", - "hyper-util", "percent-encoding", "pin-project", - "prost", - "rustls-pemfile", + "prost 0.12.6", "tokio", - "tokio-rustls", "tokio-stream", "tower 0.4.13", "tower-layer", @@ -3294,16 +3493,15 @@ dependencies = [ [[package]] name = "tonic-build" -version = "0.12.3" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9557ce109ea773b399c9b9e5dca39294110b74f1f342cb347a80d1fce8c26a11" +checksum = "5bf5e9b9c0f7e0a7c027dcfaba7b2c60816c7049171f679d99ee2ff65d0de8c4" dependencies = [ "prettyplease", "proc-macro2", "prost-build", - "prost-types", "quote", - "syn 2.0.87", + "syn 1.0.109", ] [[package]] @@ -3335,7 +3533,7 @@ dependencies = [ "futures-core", "futures-util", "pin-project-lite", - "sync_wrapper", + "sync_wrapper 1.0.1", "tokio", "tower-layer", "tower-service", @@ -3374,7 +3572,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.87", + "syn 2.0.111", ] [[package]] @@ -3782,7 +3980,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.87", + "syn 2.0.111", "wasm-bindgen-shared", ] @@ -3804,7 +4002,7 @@ checksum = "26c6ab57572f7a24a4985830b120de1594465e5d500f24afe89e16b4e833ef68" dependencies = [ "proc-macro2", "quote", - "syn 2.0.87", + "syn 2.0.111", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -3876,6 +4074,12 @@ dependencies = [ "windows-targets 0.52.6", ] +[[package]] +name = "windows-link" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" + [[package]] name = "windows-sys" version = "0.48.0" @@ -3903,6 +4107,24 @@ dependencies = [ "windows-targets 0.52.6", ] +[[package]] +name = "windows-sys" +version = "0.60.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2f500e4d28234f72040990ec9d39e3a6b950f9f22d3dba18416c35882612bcb" +dependencies = [ + "windows-targets 0.53.5", +] + +[[package]] +name = "windows-sys" +version = "0.61.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc" +dependencies = [ + "windows-link", +] + [[package]] name = "windows-targets" version = "0.48.5" @@ -3927,13 +4149,30 @@ dependencies = [ "windows_aarch64_gnullvm 0.52.6", "windows_aarch64_msvc 0.52.6", "windows_i686_gnu 0.52.6", - "windows_i686_gnullvm", + "windows_i686_gnullvm 0.52.6", "windows_i686_msvc 0.52.6", "windows_x86_64_gnu 0.52.6", "windows_x86_64_gnullvm 0.52.6", "windows_x86_64_msvc 0.52.6", ] +[[package]] +name = "windows-targets" +version = "0.53.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4945f9f551b88e0d65f3db0bc25c33b8acea4d9e41163edf90dcd0b19f9069f3" +dependencies = [ + "windows-link", + "windows_aarch64_gnullvm 0.53.1", + "windows_aarch64_msvc 0.53.1", + "windows_i686_gnu 0.53.1", + "windows_i686_gnullvm 0.53.1", + "windows_i686_msvc 0.53.1", + "windows_x86_64_gnu 0.53.1", + "windows_x86_64_gnullvm 0.53.1", + "windows_x86_64_msvc 0.53.1", +] + [[package]] name = "windows_aarch64_gnullvm" version = "0.48.5" @@ -3946,6 +4185,12 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9d8416fa8b42f5c947f8482c43e7d89e73a173cead56d044f6a56104a6d1b53" + [[package]] name = "windows_aarch64_msvc" version = "0.48.5" @@ -3958,6 +4203,12 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" +[[package]] +name = "windows_aarch64_msvc" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9d782e804c2f632e395708e99a94275910eb9100b2114651e04744e9b125006" + [[package]] name = "windows_i686_gnu" version = "0.48.5" @@ -3970,12 +4221,24 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" +[[package]] +name = "windows_i686_gnu" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "960e6da069d81e09becb0ca57a65220ddff016ff2d6af6a223cf372a506593a3" + [[package]] name = "windows_i686_gnullvm" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" +[[package]] +name = "windows_i686_gnullvm" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa7359d10048f68ab8b09fa71c3daccfb0e9b559aed648a8f95469c27057180c" + [[package]] name = "windows_i686_msvc" version = "0.48.5" @@ -3988,6 +4251,12 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" +[[package]] +name = "windows_i686_msvc" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e7ac75179f18232fe9c285163565a57ef8d3c89254a30685b57d83a38d326c2" + [[package]] name = "windows_x86_64_gnu" version = "0.48.5" @@ -4000,6 +4269,12 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" +[[package]] +name = "windows_x86_64_gnu" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c3842cdd74a865a8066ab39c8a7a473c0778a3f29370b5fd6b4b9aa7df4a499" + [[package]] name = "windows_x86_64_gnullvm" version = "0.48.5" @@ -4012,6 +4287,12 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ffa179e2d07eee8ad8f57493436566c7cc30ac536a3379fdf008f47f6bb7ae1" + [[package]] name = "windows_x86_64_msvc" version = "0.48.5" @@ -4024,6 +4305,12 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" +[[package]] +name = "windows_x86_64_msvc" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6bbff5f0aada427a1e5a6da5f1f98158182f26556f345ac9e04d36d0ebed650" + [[package]] name = "winnow" version = "0.5.40" @@ -4071,7 +4358,7 @@ dependencies = [ "flume", "futures", "git-version", - "itertools", + "itertools 0.13.0", "json5", "lazy_static", "once_cell", @@ -4083,7 +4370,7 @@ dependencies = [ "rustc_version", "serde", "serde_json", - "socket2", + "socket2 0.5.7", "tokio", "tokio-util", "tracing", @@ -4277,7 +4564,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "43c7691c934f17d8d709f0e669dd1802da339509303b92f2448af0f95a482e3d" dependencies = [ "async-trait", - "socket2", + "socket2 0.5.7", "tokio", "tokio-util", "tracing", @@ -4301,7 +4588,7 @@ dependencies = [ "rustls-pki-types", "rustls-webpki", "secrecy", - "socket2", + "socket2 0.5.7", "time", "tls-listener", "tokio", @@ -4325,7 +4612,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "58826b0f1c878f72e86af9c0cc9f1f9379e9d4cdc8d21dee7063c2552c83388c" dependencies = [ "async-trait", - "socket2", + "socket2 0.5.7", "tokio", "tokio-util", "tracing", @@ -4386,7 +4673,7 @@ checksum = "5aa21d01ec1ea1cb5c6988e5ec2ac67d80ebd8ba007dc11434fbd00cea51e137" dependencies = [ "proc-macro2", "quote", - "syn 2.0.87", + "syn 2.0.111", "zenoh-keyexpr", ] @@ -4552,7 +4839,7 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.87", + "syn 2.0.111", ] [[package]] diff --git a/components/Cargo.toml b/components/Cargo.toml index b34d036..04c7406 100644 --- a/components/Cargo.toml +++ b/components/Cargo.toml @@ -38,23 +38,21 @@ edition = "2021" documentation = "https://eclipse-sdv-blueprints.github.io/blueprints-website/" [workspace.dependencies] -async-trait = { version = "0.1.86" } -bytes = { version = "1.7.0" } -chrono = { version = "0.4.39", default-features = false } -clap = { version = "4.5.29", default-features = false } -env_logger = { version = "0.11.6", default-features = false, features = [ +async-trait = { version = "0.1.89" } +bytes = { version = "1.11.0" } +chrono = { version = "0.4.42", default-features = false } +clap = { version = "4.5.53", default-features = false } +env_logger = { version = "0.11.8", default-features = false, features = [ "humantime", ] } fms-proto = { path = "fms-proto" } fms-zenoh = { path = "fms-zenoh" } influx-client = { path = "influx-client", default-features = false } influxrs = { version = "3.0.1", default-features = false } -log = { version = "0.4.25" } -protobuf = { version = "3.5.1" } -protobuf-codegen = { version = "3.5.1" } -protoc-bin-vendored = { version = "3.0" } +log = { version = "0.4.28" } +protobuf = { version = "3.7.2" } # tokio does not enable features by default -tokio = { version = "1.43" } +tokio = { version = "1.48" } up-rust = { version = "0.4.0", default-features = false } up-transport-hono-kafka = { path = "up-transport-hono-kafka" } up-transport-hono-mqtt = { path = "up-transport-hono-mqtt" } diff --git a/components/fms-forwarder/Cargo.toml b/components/fms-forwarder/Cargo.toml index a48c56d..c93e027 100644 --- a/components/fms-forwarder/Cargo.toml +++ b/components/fms-forwarder/Cargo.toml @@ -48,25 +48,11 @@ duration-str = { version = "0.12.0", default-features = false, features = [ env_logger = { workspace = true } fms-proto = { workspace = true } fms-zenoh = { workspace = true } -influx-client = { workspace = true, features = ["writer"] } +http = { version = "0.2" } +kuksa-rust-sdk = { version = "0.2.1" } log = { workspace = true } protobuf = { workspace = true } -prost = { version = "0.13" } -prost-types = { version = "0.13" } tokio = { workspace = true, features = ["macros", "rt-multi-thread", "time"] } -tonic = { version = "0.12.3", default-features = false, features = [ - "channel", - "codegen", - "tls", - "prost", -] } up-rust = { workspace = true, features = ["communication"] } up-transport-hono-mqtt = { workspace = true } up-transport-zenoh = { workspace = true } - -[build-dependencies] -protoc-bin-vendored = { workspace = true } -tonic-build = { version = "0.12.3", default-features = false, features = [ - "prost", - "transport", -] } diff --git a/components/fms-forwarder/build.rs b/components/fms-forwarder/build.rs deleted file mode 100644 index cd9dec4..0000000 --- a/components/fms-forwarder/build.rs +++ /dev/null @@ -1,32 +0,0 @@ -// SPDX-FileCopyrightText: 2023 Contributors to the Eclipse Foundation -// -// See the NOTICE file(s) distributed with this work for additional -// information regarding copyright ownership. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// SPDX-License-Identifier: Apache-2.0 - -fn main() -> Result<(), Box> { - // use vendored protoc instead of relying on user provided protobuf installation - std::env::set_var("PROTOC", protoc_bin_vendored::protoc_bin_path().unwrap()); - - tonic_build::configure() - .compile_well_known_types(false) - .build_server(false) - .compile_protos( - &["proto/kuksa/val/v1/val.proto"], - &["proto", "proto/kuksa/val/v1"], - )?; - Ok(()) -} diff --git a/components/fms-forwarder/proto/kuksa/val/v1/types.proto b/components/fms-forwarder/proto/kuksa/val/v1/types.proto deleted file mode 100644 index 21ddc33..0000000 --- a/components/fms-forwarder/proto/kuksa/val/v1/types.proto +++ /dev/null @@ -1,284 +0,0 @@ -// Copyright Robert Bosch GmbH, 2022. Part of the Eclipse Kuksa Project. -// -// All rights reserved. This configuration file is provided to you under the -// terms and conditions of the Eclipse Distribution License v1.0 which -// accompanies this distribution, and is available at -// http://www.eclipse.org/org/documents/edl-v10.php - -syntax = "proto3"; - -// I added V1 as in databroker. Is this good practice? -package kuksa.val.v1; -import "google/protobuf/timestamp.proto"; - -// Should probably be changed to something like: -// option go_package = "github.com/eclipse/kuksa.val/proto/v1"; -option go_package = "/kuksa_grpc_proto"; - -// Describes a VSS entry -// When requesting an entry, the amount of information returned can -// be controlled by specifying either a `View` or a set of `Field`s. -message DataEntry { - // Defines the full VSS path of the entry. - string path = 1; // [field: FIELD_PATH] - - // The value (datapoint) - Datapoint value = 2; // [field: FIELD_VALUE] - - // Actuator target (only used if the entry is an actuator) - Datapoint actuator_target = 3; // [field: FIELD_ACTUATOR_TARGET] - - // Metadata for this entry - Metadata metadata = 10; // [field: FIELD_METADATA] -} - -message Datapoint { - google.protobuf.Timestamp timestamp = 1; - - oneof value { - string string = 11; - bool bool = 12; - sint32 int32 = 13; - sint64 int64 = 14; - uint32 uint32 = 15; - uint64 uint64 = 16; - float float = 17; - double double = 18; - StringArray string_array = 21; - BoolArray bool_array = 22; - Int32Array int32_array = 23; - Int64Array int64_array = 24; - Uint32Array uint32_array = 25; - Uint64Array uint64_array = 26; - FloatArray float_array = 27; - DoubleArray double_array = 28; - } -} - -message Metadata { - // Data type - // The VSS data type of the entry (i.e. the value, min, max etc). - // - // NOTE: protobuf doesn't have int8, int16, uint8 or uint16 which means - // that these values must be serialized as int32 and uint32 respectively. - DataType data_type = 11; // [field: FIELD_METADATA_DATA_TYPE] - - // Entry type - EntryType entry_type = 12; // [field: FIELD_METADATA_ENTRY_TYPE] - - // Description - // Describes the meaning and content of the entry. - optional string description = 13; // [field: FIELD_METADATA_DESCRIPTION] - - // Comment [optional] - // A comment can be used to provide additional informal information - // on a entry. - optional string comment = 14; // [field: FIELD_METADATA_COMMENT] - - // Deprecation [optional] - // Whether this entry is deprecated. Can contain recommendations of what - // to use instead. - optional string deprecation = 15; // [field: FIELD_METADATA_DEPRECATION] - - // Unit [optional] - // The unit of measurement - optional string unit = 16; // [field: FIELD_METADATA_UNIT] - - // Value restrictions [optional] - // Restrict which values are allowed. - // Only restrictions matching the DataType {datatype} above are valid. - ValueRestriction value_restriction = 17; // [field: FIELD_METADATA_VALUE_RESTRICTION] - - // Entry type specific metadata - oneof entry_specific { - Actuator actuator = 20; // [field: FIELD_METADATA_ACTUATOR] - Sensor sensor = 30; // [field: FIELD_METADATA_SENSOR] - Attribute attribute = 40; // [field: FIELD_METADATA_ATTRIBUTE] - } -} - -/////////////////////// -// Actuator specific fields -message Actuator { - // Nothing for now -} - -//////////////////////// -// Sensor specific -message Sensor { - // Nothing for now -} - -//////////////////////// -// Attribute specific -message Attribute { - // Nothing for now. -} - -// Value restriction -// -// One ValueRestriction{type} for each type, since -// they don't make sense unless the types match -// -message ValueRestriction { - oneof type { - ValueRestrictionString string = 21; - // For signed VSS integers - ValueRestrictionInt signed = 22; - // For unsigned VSS integers - ValueRestrictionUint unsigned = 23; - // For floating point VSS values (float and double) - ValueRestrictionFloat floating_point = 24; - } -} - -message ValueRestrictionInt { - optional sint64 min = 1; - optional sint64 max = 2; - repeated sint64 allowed_values = 3; -} - -message ValueRestrictionUint { - optional uint64 min = 1; - optional uint64 max = 2; - repeated uint64 allowed_values = 3; -} - -message ValueRestrictionFloat { - optional double min = 1; - optional double max = 2; - - // allowed for doubles/floats not recommended - repeated double allowed_values = 3; -} - -// min, max doesn't make much sense for a string -message ValueRestrictionString { - repeated string allowed_values = 3; -} - -// VSS Data type of a signal -// -// Protobuf doesn't support int8, int16, uint8 or uint16. -// These are mapped to int32 and uint32 respectively. -// -enum DataType { - DATA_TYPE_UNSPECIFIED = 0; - DATA_TYPE_STRING = 1; - DATA_TYPE_BOOLEAN = 2; - DATA_TYPE_INT8 = 3; - DATA_TYPE_INT16 = 4; - DATA_TYPE_INT32 = 5; - DATA_TYPE_INT64 = 6; - DATA_TYPE_UINT8 = 7; - DATA_TYPE_UINT16 = 8; - DATA_TYPE_UINT32 = 9; - DATA_TYPE_UINT64 = 10; - DATA_TYPE_FLOAT = 11; - DATA_TYPE_DOUBLE = 12; - DATA_TYPE_TIMESTAMP = 13; - DATA_TYPE_STRING_ARRAY = 20; - DATA_TYPE_BOOLEAN_ARRAY = 21; - DATA_TYPE_INT8_ARRAY = 22; - DATA_TYPE_INT16_ARRAY = 23; - DATA_TYPE_INT32_ARRAY = 24; - DATA_TYPE_INT64_ARRAY = 25; - DATA_TYPE_UINT8_ARRAY = 26; - DATA_TYPE_UINT16_ARRAY = 27; - DATA_TYPE_UINT32_ARRAY = 28; - DATA_TYPE_UINT64_ARRAY = 29; - DATA_TYPE_FLOAT_ARRAY = 30; - DATA_TYPE_DOUBLE_ARRAY = 31; - DATA_TYPE_TIMESTAMP_ARRAY = 32; -} - -// Entry type -enum EntryType { - ENTRY_TYPE_UNSPECIFIED = 0; - ENTRY_TYPE_ATTRIBUTE = 1; - ENTRY_TYPE_SENSOR = 2; - ENTRY_TYPE_ACTUATOR = 3; -} - -// A `View` specifies a set of fields which should -// be populated in a `DataEntry` (in a response message) -enum View { - VIEW_UNSPECIFIED = 0; // Unspecified. Equivalent to VIEW_CURRENT_VALUE unless `fields` are explicitly set. - VIEW_CURRENT_VALUE = 1; // Populate DataEntry with value. - VIEW_TARGET_VALUE = 2; // Populate DataEntry with actuator target. - VIEW_METADATA = 3; // Populate DataEntry with metadata. - VIEW_FIELDS = 10; // Populate DataEntry only with requested fields. - VIEW_ALL = 20; // Populate DataEntry with everything. -} - -// A `Field` corresponds to a specific field of a `DataEntry`. -// -// It can be used to: -// * populate only specific fields of a `DataEntry` response. -// * specify which fields of a `DataEntry` should be set as -// part of a `Set` request. -// * subscribe to only specific fields of a data entry. -// * convey which fields of an updated `DataEntry` have changed. -enum Field { - FIELD_UNSPECIFIED = 0; // "*" i.e. everything - FIELD_PATH = 1; // path - FIELD_VALUE = 2; // value - FIELD_ACTUATOR_TARGET = 3; // actuator_target - FIELD_METADATA = 10; // metadata.* - FIELD_METADATA_DATA_TYPE = 11; // metadata.data_type - FIELD_METADATA_DESCRIPTION = 12; // metadata.description - FIELD_METADATA_ENTRY_TYPE = 13; // metadata.entry_type - FIELD_METADATA_COMMENT = 14; // metadata.comment - FIELD_METADATA_DEPRECATION = 15; // metadata.deprecation - FIELD_METADATA_UNIT = 16; // metadata.unit - FIELD_METADATA_VALUE_RESTRICTION = 17; // metadata.value_restriction.* - FIELD_METADATA_ACTUATOR = 20; // metadata.actuator.* - FIELD_METADATA_SENSOR = 30; // metadata.sensor.* - FIELD_METADATA_ATTRIBUTE = 40; // metadata.attribute.* -} - -// Error response shall be an HTTP-like code. -// Should follow https://www.w3.org/TR/viss2-transport/#status-codes. -message Error { - uint32 code = 1; - string reason = 2; - string message = 3; -} - -// Used in get/set requests to report errors for specific entries -message DataEntryError { - string path = 1; // vss path - Error error = 2; -} - -message StringArray { - repeated string values = 1; -} - -message BoolArray { - repeated bool values = 1; -} - -message Int32Array { - repeated sint32 values = 1; -} - -message Int64Array { - repeated sint64 values = 1; -} - -message Uint32Array { - repeated uint32 values = 1; -} - -message Uint64Array { - repeated uint64 values = 1; -} - -message FloatArray { - repeated float values = 1; -} - -message DoubleArray { - repeated double values = 1; -} diff --git a/components/fms-forwarder/proto/kuksa/val/v1/val.proto b/components/fms-forwarder/proto/kuksa/val/v1/val.proto deleted file mode 100644 index 948cd71..0000000 --- a/components/fms-forwarder/proto/kuksa/val/v1/val.proto +++ /dev/null @@ -1,114 +0,0 @@ -// Copyright Robert Bosch GmbH, 2022. Part of the Eclipse Kuksa Project. -// -// All rights reserved. This configuration file is provided to you under the -// terms and conditions of the Eclipse Distribution License v1.0 which -// accompanies this distribution, and is available at -// http://www.eclipse.org/org/documents/edl-v10.php - -// This is a base proto file for databroker and kuksa-val-basic -// function set - -syntax = "proto3"; - -package kuksa.val.v1; - -import "types.proto"; - -// Should probably be changed to something like: -// option go_package = "github.com/eclipse/kuksa.val/proto/v1"; -option go_package = "/kuksa_grpc_proto"; - -// Note on authorization: -// Tokens (auth-token or auth-uuid) are sent as (GRPC / http2) metadata. -// -// The auth-token is a JWT compliant token as the examples found here: -// https://github.com/eclipse/kuksa.val/tree/master/kuksa_certificates/jwt -// -// See also https://github.com/eclipse/kuksa.val/blob/master/doc/jwt.md -// -// Upon reception of auth-token, server shall generate an auth-uuid in metadata -// that the client can use instead of auth-token in subsequent calls. - -service VAL { - // Get entries - rpc Get(GetRequest) returns (GetResponse); - - // Set entries - rpc Set(SetRequest) returns (SetResponse); - - // Subscribe to a set of entries - // - // Returns a stream of notifications. - // - // InvalidArgument is returned if the request is malformed. - rpc Subscribe(SubscribeRequest) returns (stream SubscribeResponse); - - // Shall return information that allows the client to determine - // what server/server implementation/version it is talking to - // eg. kuksa-databroker 0.5.1 - rpc GetServerInfo(GetServerInfoRequest) returns (GetServerInfoResponse); -} - -// Define which data we want -message EntryRequest { - string path = 1; - View view = 2; - repeated Field fields = 3; -} - -// Request a set of entries. -message GetRequest { - repeated EntryRequest entries = 1; -} - -// Global errors are specified in `error`. -// Errors for individual entries are specified in `errors`. -message GetResponse { - repeated DataEntry entries = 1; - repeated DataEntryError errors = 2; - Error error = 3; -} - -// Define the data we want to set -message EntryUpdate { - DataEntry entry = 1; - repeated Field fields = 2; -} - -// A list of entries to be updated -message SetRequest { - repeated EntryUpdate updates = 1; -} - -// Global errors are specified in `error`. -// Errors for individual entries are specified in `errors`. -message SetResponse { - Error error = 1; - repeated DataEntryError errors = 2; -} - -// Define what to subscribe to -message SubscribeEntry { - string path = 1; - View view = 2; - repeated Field fields = 3; -} - -// Subscribe to changes in datapoints. -message SubscribeRequest { - repeated SubscribeEntry entries = 1; -} - -// A subscription response -message SubscribeResponse { - repeated EntryUpdate updates = 1; -} - -message GetServerInfoRequest { - // Nothing yet -} - -message GetServerInfoResponse { - string name = 1; - string version = 2; -} \ No newline at end of file diff --git a/components/fms-forwarder/src/vehicle_abstraction.rs b/components/fms-forwarder/src/vehicle_abstraction.rs index fa24603..9c5b846 100644 --- a/components/fms-forwarder/src/vehicle_abstraction.rs +++ b/components/fms-forwarder/src/vehicle_abstraction.rs @@ -20,22 +20,18 @@ //! An abstraction of a vehicle's (current) status based on //! [Eclipse kuksa.val Databroker](https://github.com/eclipse/kuksa.val). //! +use std::{collections::HashMap, error::Error, fmt::Display, time::Duration}; + use clap::Args; +use http::Uri; +use kuksa_rust_sdk::kuksa::{common::ClientTraitV2, val::v2::KuksaClientV2}; +use kuksa_rust_sdk::v2_proto::value::TypedValue; +use kuksa_rust_sdk::v2_proto::IncompatibleValueTypeError; use log::{debug, error, info, warn}; use protobuf::MessageField; use tokio::sync::mpsc::Sender; -use std::{collections::HashMap, error::Error, fmt::Display, time::Duration}; - -use tonic::{ - transport::{Channel, Endpoint}, - Request, -}; - use fms_proto::fms::{TellTaleInfo, Trigger, VehicleStatus}; -use kuksa::{datapoint::Value, val_client::ValClient, EntryRequest, Field, GetRequest, View}; - -use self::kuksa::{DataEntry, SubscribeEntry, SubscribeRequest, UnsupportedValueTypeError}; const SNAPSHOT_VSS_PATHS: &[&str] = &[ vss::VSS_VEHICLE_CHASSIS_PARKINGBRAKE_ISENGAGED, @@ -180,72 +176,57 @@ impl FmsTrigger { } fn new_tell_tale_trigger( - data_entry: DataEntry, + value: &TypedValue, name: &str, - ) -> Result { - if let Some(value) = data_entry.clone().value.and_then(|v| v.value) { - match String::try_from(value) { - Ok(status) => { - let mut tell_tale_info = TellTaleInfo::new(); - tell_tale_info.tell_tale = name.to_string(); - tell_tale_info.status = status; - Ok(FmsTrigger::TellTale(tell_tale_info)) - } - Err(e) => Err(e), - } - } else { - Err(UnsupportedValueTypeError {}) - } + ) -> Result { + String::try_from(value).map(|status| { + let mut tell_tale_info = TellTaleInfo::new(); + tell_tale_info.tell_tale = name.to_string(); + tell_tale_info.status = status; + FmsTrigger::TellTale(tell_tale_info) + }) } fn new_boolean_trigger FmsTrigger>( - data_entry: DataEntry, + value: &TypedValue, trigger_producer: P, - ) -> Result { - if let Some(data_point) = data_entry.clone().value { - bool::try_from(data_point.value.unwrap()).map(trigger_producer) - } else { - Err(UnsupportedValueTypeError {}) - } + ) -> Result { + bool::try_from(value).map(trigger_producer) } fn new_string_value_trigger FmsTrigger>( - data_entry: DataEntry, + value: &TypedValue, trigger_producer: P, - ) -> Result { - if let Some(data_point) = data_entry.clone().value { - String::try_from(data_point.value.unwrap()).map(trigger_producer) - } else { - Err(UnsupportedValueTypeError {}) - } + ) -> Result { + String::try_from(value).map(trigger_producer) } } -impl TryFrom for FmsTrigger { - type Error = UnsupportedValueTypeError; +impl TryFrom<(String, &TypedValue)> for FmsTrigger { + type Error = IncompatibleValueTypeError; - fn try_from(data_entry: DataEntry) -> Result { - match data_entry.path.as_str() { + fn try_from(value: (String, &TypedValue)) -> Result { + match value.0.as_str() { vss::FMS_VEHICLE_CABIN_TELLTALE_ECT_STATUS => { - FmsTrigger::new_tell_tale_trigger(data_entry, TELL_TALE_NAME_ECT) + FmsTrigger::new_tell_tale_trigger(value.1, TELL_TALE_NAME_ECT) } vss::FMS_VEHICLE_CABIN_TELLTALE_ENGINEOIL_STATUS => { - FmsTrigger::new_tell_tale_trigger(data_entry, TELL_TALE_NAME_ENGINE_OIL) + FmsTrigger::new_tell_tale_trigger(value.1, TELL_TALE_NAME_ENGINE_OIL) } vss::FMS_VEHICLE_CABIN_TELLTALE_ENGINE_STATUS => { - FmsTrigger::new_tell_tale_trigger(data_entry, TELL_TALE_NAME_ENGINE_MIL_INDICATOR) + FmsTrigger::new_tell_tale_trigger(value.1, TELL_TALE_NAME_ENGINE_MIL_INDICATOR) } vss::FMS_VEHICLE_CABIN_TELLTALE_FUELLEVEL_STATUS => { - FmsTrigger::new_tell_tale_trigger(data_entry, TELL_TALE_NAME_FUEL_LEVEL) + FmsTrigger::new_tell_tale_trigger(value.1, TELL_TALE_NAME_FUEL_LEVEL) } vss::FMS_VEHICLE_CABIN_TELLTALE_PARKINGBRAKE_STATUS => { - FmsTrigger::new_tell_tale_trigger(data_entry, TELL_TALE_NAME_PARKING_BRAKE) + FmsTrigger::new_tell_tale_trigger(value.1, TELL_TALE_NAME_PARKING_BRAKE) } vss::VSS_VEHICLE_CHASSIS_PARKINGBRAKE_ISENGAGED => { - FmsTrigger::new_boolean_trigger(data_entry, FmsTrigger::ParkingBreakSwitchChanged) + FmsTrigger::new_boolean_trigger(value.1, FmsTrigger::ParkingBreakSwitchChanged) } vss::VSS_VEHICLE_POWERTRAIN_COMBUSTIONENGINE_ISRUNNING => { - FmsTrigger::new_boolean_trigger(data_entry, |is_running| { + FmsTrigger::new_boolean_trigger(value.1, |is_running| { if is_running { FmsTrigger::EngineOn } else { @@ -254,7 +235,7 @@ impl TryFrom for FmsTrigger { }) } vss::FMS_VEHICLE_TACHOGRAPH_DRIVER1_ISCARDPRESENT => { - FmsTrigger::new_boolean_trigger(data_entry, |card_is_present| { + FmsTrigger::new_boolean_trigger(value.1, |card_is_present| { if card_is_present { FmsTrigger::Driver1Login } else { @@ -264,12 +245,12 @@ impl TryFrom for FmsTrigger { } vss::FMS_VEHICLE_TACHOGRAPH_DRIVER1_WORKINGSTATE => { FmsTrigger::new_string_value_trigger( - data_entry, + value.1, FmsTrigger::Driver1WorkingStateChanged, ) } vss::FMS_VEHICLE_TACHOGRAPH_DRIVER2_ISCARDPRESENT => { - FmsTrigger::new_boolean_trigger(data_entry, |card_is_present| { + FmsTrigger::new_boolean_trigger(value.1, |card_is_present| { if card_is_present { FmsTrigger::Driver2Login } else { @@ -279,17 +260,17 @@ impl TryFrom for FmsTrigger { } vss::FMS_VEHICLE_TACHOGRAPH_DRIVER2_WORKINGSTATE => { FmsTrigger::new_string_value_trigger( - data_entry, + value.1, FmsTrigger::Driver2WorkingStateChanged, ) } - _ => Err(UnsupportedValueTypeError {}), + _ => Err(IncompatibleValueTypeError {}), } } } struct KuksaValDatabroker { - client: Box>, + client: Box, } impl KuksaValDatabroker { @@ -298,19 +279,15 @@ impl KuksaValDatabroker { "creating client for Eclipse Kuksa Databroker at {}", config.databroker_uri ); - Endpoint::from_shared(config.databroker_uri.to_owned()) - .map_err(|e| { - error!("invalid Databroker URI: {}", e); + Uri::try_from(config.databroker_uri.clone()) + .map_err(|err| { + error!("invalid Databroker URI: {err}"); DatabrokerError { - description: e.to_string(), + description: err.to_string(), } }) - .map(|builder| { - let channel = builder - .connect_timeout(Duration::from_secs(5)) - .timeout(Duration::from_secs(5)) - .connect_lazy(); - let client = ValClient::new(channel); + .map(|uri| { + let client = KuksaClientV2::new(uri); KuksaValDatabroker { client: Box::new(client), } @@ -318,56 +295,46 @@ impl KuksaValDatabroker { } pub async fn get_vehicle_status(&mut self) -> Result { - let entry_requests: Vec = SNAPSHOT_VSS_PATHS - .iter() - .map(|path| EntryRequest { - path: path.to_string(), - view: View::CurrentValue as i32, - fields: vec![Field::Value as i32], - }) - .collect(); - - let mut vss_data: HashMap = HashMap::new(); - match self - .client - .get(Request::new(GetRequest { - entries: entry_requests, - })) - .await - .map(|res| res.into_inner()) - { - Err(status) => { - warn!("failed to retrieve snapshot data points from Databroker {status}"); + let paths = SNAPSHOT_VSS_PATHS.iter().map(|v| v.to_string()).collect(); + + match self.client.get_values(paths).await { + Err(kuksa_rust_sdk::kuksa::common::ClientError::Connection(msg)) => { + warn!("failed to retrieve snapshot data points from Databroker: {msg}"); + Err(DatabrokerError { description: msg }) + } + Err(kuksa_rust_sdk::kuksa::common::ClientError::Status(status)) => { + warn!( + "failed to retrieve snapshot data points from Databroker: {}", + status.message() + ); Err(DatabrokerError { - description: format!("status code {}", status.code()), + description: status.message().to_string(), + }) + } + Err(kuksa_rust_sdk::kuksa::common::ClientError::Function(errors)) => { + errors.iter().for_each(|error| { + warn!("failed to retrieve snapshot data points from Databroker: {error:?}"); + }); + Err(DatabrokerError { + description: "multiple errors while retrieving snapshot data".to_string(), }) } Ok(get_response) => { - if let Some(error) = get_response.error { - warn!( - "response from Databroker contains global error [code: {}, message: {}]", - error.code, error.message - ); - } else { - get_response - .errors - .into_iter() - .for_each(|data_entry_error| { - if let Some(err) = data_entry_error.error { - warn!( - "response from Databroker contains error [path: {}, error: {:?}]", - data_entry_error.path, err - ); - } - }); - get_response.entries.into_iter().for_each(|data_entry| { - let name = data_entry.path.to_owned(); - if let Some(value) = data_entry.value.and_then(|dp| dp.value) { - debug!("got value [path: {}]: {:?}", name, value); - vss_data.insert(name, value); - } - }); - } + let mut vss_data = HashMap::new(); + let mut idx = 0usize; + get_response.iter().for_each(|data_entry| { + if let (name, Some(value)) = ( + SNAPSHOT_VSS_PATHS[idx], + data_entry + .value + .as_ref() + .and_then(|v| v.typed_value.as_ref()), + ) { + debug!("got value [path: {name}]: {value:?}"); + vss_data.insert(name.to_owned(), value.to_owned()); + } + idx += 1; + }); kuksa::new_vehicle_status(vss_data) } } @@ -377,37 +344,26 @@ impl KuksaValDatabroker { &mut self, sender: Sender, ) -> Result<(), DatabrokerError> { - let subscribe_entries: Vec = TRIGGER_VSS_PATHS - .iter() - .map(|path| SubscribeEntry { - path: path.to_string(), - view: View::CurrentValue as i32, - fields: vec![Field::Value as i32], - }) - .collect(); - - let req = SubscribeRequest { - entries: subscribe_entries, - }; + let paths = TRIGGER_VSS_PATHS.iter().map(|v| v.to_string()).collect(); - match self.client.subscribe(req).await { - Ok(response) => { - let mut stream = response.into_inner(); + match self.client.subscribe(paths, None, None).await { + Ok(mut response) => { tokio::task::spawn(async move { - while let Ok(message) = stream.message().await { + while let Ok(message) = response.message().await { if let Some(response) = message { - for update in response.updates { - match update.entry { - Some(data_entry) => { - if let Ok(trigger) = FmsTrigger::try_from(data_entry) { - let _ = sender.send(trigger).await; - } - } - None => { - debug!( - "ignoring notification from Databroker containing no data" - ); + for (path, datapoint) in response.entries { + if let Some(value) = datapoint + .value + .as_ref() + .and_then(|v| v.typed_value.as_ref()) + { + if let Ok(trigger) = FmsTrigger::try_from((path, value)) { + let _ = sender.send(trigger).await; } + } else { + debug!( + "ignoring notification from Databroker containing no data" + ); } } } @@ -415,10 +371,10 @@ impl KuksaValDatabroker { }); Ok(()) } - Err(e) => { - warn!("failed to register triggers for signals: {}", e); + Err(err) => { + warn!("failed to register triggers for signals: {err}"); Err(DatabrokerError { - description: e.message().to_string(), + description: err.to_string(), }) } } @@ -435,7 +391,7 @@ pub async fn init( let mut databroker = KuksaValDatabroker::new(config).await?; let (tx, mut rx) = tokio::sync::mpsc::channel::(50); - let _ = &databroker.register_triggers(tx.clone()).await?; + databroker.register_triggers(tx.clone()).await?; tokio::task::spawn(async move { let mut current_status = VehicleStatus::new(); diff --git a/components/fms-forwarder/src/vehicle_abstraction/kuksa.rs b/components/fms-forwarder/src/vehicle_abstraction/kuksa.rs index 9279d18..4921c4f 100644 --- a/components/fms-forwarder/src/vehicle_abstraction/kuksa.rs +++ b/components/fms-forwarder/src/vehicle_abstraction/kuksa.rs @@ -17,210 +17,23 @@ // // SPDX-License-Identifier: Apache-2.0 -tonic::include_proto!("kuksa.val.v1"); - +use kuksa_rust_sdk::v2_proto::value::TypedValue; use log::debug; use protobuf::{well_known_types::timestamp::Timestamp, MessageField}; use std::collections::HashMap; -use self::datapoint::Value; use crate::vehicle_abstraction::vss; use fms_proto::fms::VehicleStatus; use super::DatabrokerError; -#[derive(Debug)] -pub struct UnsupportedValueTypeError {} - -impl TryFrom for u32 { - type Error = UnsupportedValueTypeError; - fn try_from(value: Value) -> Result { - match value { - Value::Uint32(v) => Ok(v), - _ => Err(UnsupportedValueTypeError {}), - } - } -} - -impl TryFrom for Option { - type Error = UnsupportedValueTypeError; - fn try_from(value: Value) -> Result { - match value { - Value::Uint32(v) => Ok(Some(v)), - _ => Err(UnsupportedValueTypeError {}), - } - } -} - -impl TryFrom for u64 { - type Error = UnsupportedValueTypeError; - fn try_from(value: Value) -> Result { - match value { - Value::Uint32(v) => Ok(v as u64), - Value::Uint64(v) => Ok(v), - _ => Err(UnsupportedValueTypeError {}), - } - } -} - -impl TryFrom for Option { - type Error = UnsupportedValueTypeError; - fn try_from(value: Value) -> Result { - match value { - Value::Uint32(v) => Ok(Some(v as u64)), - Value::Uint64(v) => Ok(Some(v)), - _ => Err(UnsupportedValueTypeError {}), - } - } -} - -impl TryFrom for i32 { - type Error = UnsupportedValueTypeError; - fn try_from(value: Value) -> Result { - match value { - Value::Uint32(v) => Ok(v as i32), - Value::Int32(v) => Ok(v), - _ => Err(UnsupportedValueTypeError {}), - } - } -} - -impl TryFrom for Option { - type Error = UnsupportedValueTypeError; - fn try_from(value: Value) -> Result { - match value { - Value::Uint32(v) => Ok(Some(v as i32)), - Value::Int32(v) => Ok(Some(v)), - _ => Err(UnsupportedValueTypeError {}), - } - } -} - -impl TryFrom for i64 { - type Error = UnsupportedValueTypeError; - fn try_from(value: Value) -> Result { - match value { - Value::Uint32(v) => Ok(v as i64), - Value::Uint64(v) => Ok(v as i64), - Value::Int32(v) => Ok(v as i64), - Value::Int64(v) => Ok(v), - _ => Err(UnsupportedValueTypeError {}), - } - } -} - -impl TryFrom for Option { - type Error = UnsupportedValueTypeError; - fn try_from(value: Value) -> Result { - match value { - Value::Uint32(v) => Ok(Some(v as i64)), - Value::Uint64(v) => Ok(Some(v as i64)), - Value::Int32(v) => Ok(Some(v as i64)), - Value::Int64(v) => Ok(Some(v)), - _ => Err(UnsupportedValueTypeError {}), - } - } -} - -impl TryFrom for f32 { - type Error = UnsupportedValueTypeError; - fn try_from(value: Value) -> Result { - match value { - Value::Uint32(v) => Ok(v as f32), - Value::Int32(v) => Ok(v as f32), - Value::Float(v) => Ok(v), - _ => Err(UnsupportedValueTypeError {}), - } - } -} - -impl TryFrom for Option { - type Error = UnsupportedValueTypeError; - fn try_from(value: Value) -> Result { - match value { - Value::Uint32(v) => Ok(Some(v as f32)), - Value::Int32(v) => Ok(Some(v as f32)), - Value::Float(v) => Ok(Some(v)), - _ => Err(UnsupportedValueTypeError {}), - } - } -} - -impl TryFrom for f64 { - type Error = UnsupportedValueTypeError; - fn try_from(value: Value) -> Result { - match value { - Value::Uint32(v) => Ok(v as f64), - Value::Uint64(v) => Ok(v as f64), - Value::Int32(v) => Ok(v as f64), - Value::Int64(v) => Ok(v as f64), - Value::Double(v) => Ok(v), - Value::Float(v) => Ok(v as f64), - _ => Err(UnsupportedValueTypeError {}), - } - } -} - -impl TryFrom for Option { - type Error = UnsupportedValueTypeError; - fn try_from(value: Value) -> Result { - match value { - Value::Uint32(v) => Ok(Some(v as f64)), - Value::Uint64(v) => Ok(Some(v as f64)), - Value::Int32(v) => Ok(Some(v as f64)), - Value::Int64(v) => Ok(Some(v as f64)), - Value::Double(v) => Ok(Some(v)), - Value::Float(v) => Ok(Some(v as f64)), - _ => Err(UnsupportedValueTypeError {}), - } - } -} - -impl TryFrom for String { - type Error = UnsupportedValueTypeError; - fn try_from(value: Value) -> Result { - match value { - Value::String(v) => Ok(v), - _ => Err(UnsupportedValueTypeError {}), - } - } -} - -impl TryFrom for Option { - type Error = UnsupportedValueTypeError; - fn try_from(value: Value) -> Result { - match value { - Value::String(v) => Ok(Some(v)), - _ => Err(UnsupportedValueTypeError {}), - } - } -} - -impl TryFrom for bool { - type Error = UnsupportedValueTypeError; - fn try_from(value: Value) -> Result { - match value { - Value::Bool(v) => Ok(v), - _ => Err(UnsupportedValueTypeError {}), - } - } -} - -impl TryFrom for Option { - type Error = UnsupportedValueTypeError; - fn try_from(value: Value) -> Result { - match value { - Value::Bool(v) => Ok(Some(v)), - _ => Err(UnsupportedValueTypeError {}), - } - } -} - -pub fn new_vehicle_status(data: HashMap) -> Result { +pub fn new_vehicle_status( + data: HashMap, +) -> Result { let Some(vin) = data .get(vss::VSS_VEHICLE_VEHICLEIDENTIFICATION_VIN) - .map(|v| String::try_from(v.to_owned()).unwrap()) + .and_then(|v| String::try_from(v).ok()) else { return Err(DatabrokerError { description: "Databroker does not contain VIN (yet)".to_string(), @@ -235,7 +48,7 @@ pub fn new_vehicle_status(data: HashMap) -> Result) -> Result) -> Result) -> Result) -> Result) -> Result { let position_instant = vehicle_status @@ -299,14 +112,14 @@ pub fn new_vehicle_status(data: HashMap) -> Result) -> Result) -> Result) -> Result) -> Result, - - /// A description of the error - #[serde(rename = "error_description")] - #[serde(skip_serializing_if = "Option::is_none")] - pub error_description: Option, - - /// A URI providing more information - #[serde(rename = "error_uri")] - #[serde(skip_serializing_if = "Option::is_none")] - pub error_uri: Option, -} - #[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)] pub struct VehicleResponseObject { #[serde(rename = "vehicleResponse")] diff --git a/fms-blueprint-compose.yaml b/fms-blueprint-compose.yaml index ca36803..3974fa6 100644 --- a/fms-blueprint-compose.yaml +++ b/fms-blueprint-compose.yaml @@ -154,7 +154,7 @@ services: read_only: true databroker: - image: "quay.io/eclipse-kuksa/kuksa-databroker:0.4.6" + image: "quay.io/eclipse-kuksa/kuksa-databroker:0.6.0" container_name: "databroker" cap_drop: *default-drops networks: @@ -172,7 +172,7 @@ services: command: "--insecure" csv-provider: - image: "quay.io/eclipse-kuksa/csv-provider:0.4.4" + image: "quay.io/eclipse-kuksa/csv-provider:0.4.5" container_name: "csv-provider" cap_drop: *default-drops networks: