diff --git a/src/slic3r/Utils/BBLNetworkPlugin.cpp b/src/slic3r/Utils/BBLNetworkPlugin.cpp index 5cffe6468d..bae9ce85a8 100644 --- a/src/slic3r/Utils/BBLNetworkPlugin.cpp +++ b/src/slic3r/Utils/BBLNetworkPlugin.cpp @@ -596,7 +596,8 @@ PrintParams_Legacy BBLNetworkPlugin::as_legacy(PrintParams& param) } // Every PrintParams field except the four the 02.08.01 series added -// (task_timelapse_use_internal, extruder_cali_manual_mode, svc_context, slicer_uid). +// (task_timelapse_use_internal, extruder_cali_manual_mode, svc_context, slicer_uid) and the +// queue_plate_id 02.08.02 appended. PrintParams_0203 BBLNetworkPlugin::as_0203(PrintParams& param) { PrintParams_0203 p; diff --git a/src/slic3r/Utils/bambu_networking.hpp b/src/slic3r/Utils/bambu_networking.hpp index 30c33c6c73..54079ee0bd 100644 --- a/src/slic3r/Utils/bambu_networking.hpp +++ b/src/slic3r/Utils/bambu_networking.hpp @@ -336,6 +336,7 @@ struct PrintParams { bool try_emmc_print; std::string svc_context; std::string slicer_uid; + std::string queue_plate_id; }; struct TaskQueryParams @@ -412,7 +413,7 @@ enum class NetworkAbi { Unsupported, // no generation in this build can call it - never dispatch through it Legacy, // 01.10.01: PrintParams_Legacy; send_message/send_message_to_printer take no flag V0203, // 02.03.00: PrintParams_0203; bind takes no dev_model - Current, // 02.08.01: the layouts and signatures this build declares directly + Current, // 02.08.04: the layouts and signatures this build declares directly }; struct NetworkLibraryVersion { @@ -425,10 +426,12 @@ struct NetworkLibraryVersion { }; // Every row names the generation that can call it, so a series can never be offered without a -// host-side ABI for it. Series with no generation - 02.01.01, 02.00.02 and older - must stay out; -// is_supported_network_version() is the gate that keeps them from loading. +// host-side ABI for it. Series with no generation - 02.08.01 (whose PrintParams lacks the +// queue_plate_id that 02.08.02 appended, and whose malformed bind table macOS 27 refuses to +// load), 02.01.01, 02.00.02 and older - must stay out; is_supported_network_version() is the +// gate that keeps them from loading. static const NetworkLibraryVersion AVAILABLE_NETWORK_VERSIONS[] = { - {"02.08.01", "02.08.01", nullptr, true, nullptr, NetworkAbi::Current}, + {"02.08.04", "02.08.04", nullptr, true, nullptr, NetworkAbi::Current}, {"02.03.00", "02.03.00", nullptr, false, "An older plug-in series. Features that need newer plug-in support, such as print-failure " "snapshots in the device error dialog, are unavailable.", NetworkAbi::V0203}, diff --git a/tests/slic3rutils/test_network_versions.cpp b/tests/slic3rutils/test_network_versions.cpp index ad352e0bfa..cac2c1543e 100644 --- a/tests/slic3rutils/test_network_versions.cpp +++ b/tests/slic3rutils/test_network_versions.cpp @@ -78,31 +78,34 @@ TEST_CASE("Series and managed classification", "[NetworkVersions]") TEST_CASE_METHOD(PluginFolderFixture, "Managed builds fold into the series; customs are surfaced", "[NetworkVersions]") { - add_plugin("02.08.01.55"); // managed, same series -> folded into the 02.08.01 row + add_plugin("02.08.04.60"); // managed, same series -> folded into the 02.08.04 row add_plugin("02.09.00.10"); // managed, unknown series -> not listed + add_plugin("02.08.01.55"); // managed, series this build no longer has an ABI for -> not listed add_plugin("02.03.00.62"); // managed, older whitelisted series -> folded into 02.03.00 add_plugin("02.01.01.52"); // managed, series with no ABI in this build -> not listed - add_plugin("02.08.01_custom"); // custom, whitelisted series -> listed under it - add_plugin("02.08.01.52-dev"); // custom (dash-suffixed), whitelisted series -> listed + add_plugin("02.08.04_custom"); // custom, whitelisted series -> listed under it + add_plugin("02.08.04.52-dev"); // custom (dash-suffixed), whitelisted series -> listed auto versions = get_all_available_versions(); // The specific managed build never gets its own row - the series represents it. - REQUIRE(count_version(versions, "02.08.01.55") == 0); - REQUIRE(count_version(versions, "02.08.01") == 1); + REQUIRE(count_version(versions, "02.08.04.60") == 0); + REQUIRE(count_version(versions, "02.08.04") == 1); REQUIRE(count_version(versions, "02.09.00.10") == 0); + REQUIRE(count_version(versions, "02.08.01.55") == 0); + REQUIRE(count_version(versions, "02.08.01") == 0); REQUIRE(count_version(versions, "02.03.00.62") == 0); REQUIRE(count_version(versions, "02.03.00") == 1); REQUIRE(count_version(versions, "02.01.01.52") == 0); // Custom-named builds are distinct files kept under their own name. - REQUIRE(count_version(versions, "02.08.01_custom") == 1); - REQUIRE(count_version(versions, "02.08.01.52-dev") == 1); + REQUIRE(count_version(versions, "02.08.04_custom") == 1); + REQUIRE(count_version(versions, "02.08.04.52-dev") == 1); // Newest series first, its customs nested under it (suffix sort: "" < ".52-dev" < "_custom"), // then older series, legacy last. - REQUIRE(versions[0].version == "02.08.01"); - REQUIRE(versions[1].version == "02.08.01.52-dev"); - REQUIRE(versions[2].version == "02.08.01_custom"); + REQUIRE(versions[0].version == "02.08.04"); + REQUIRE(versions[1].version == "02.08.04.52-dev"); + REQUIRE(versions[2].version == "02.08.04_custom"); REQUIRE(versions[3].version == "02.03.00"); REQUIRE(versions.back().version == BAMBU_NETWORK_AGENT_VERSION_LEGACY); @@ -111,9 +114,9 @@ TEST_CASE_METHOD(PluginFolderFixture, "Managed builds fold into the series; cust REQUIRE_FALSE(versions[3].is_latest); // Customs sort/render nested under their series (non-empty suffix, base = the series). - REQUIRE(versions[1].base_version == "02.08.01"); + REQUIRE(versions[1].base_version == "02.08.04"); REQUIRE_FALSE(versions[1].suffix.empty()); - REQUIRE(versions[2].base_version == "02.08.01"); + REQUIRE(versions[2].base_version == "02.08.04"); REQUIRE_FALSE(versions[2].suffix.empty()); // "(Latest)" is the series row, never a nested custom build. @@ -123,20 +126,20 @@ TEST_CASE_METHOD(PluginFolderFixture, "Managed builds fold into the series; cust REQUIRE_FALSE(versions[2].is_latest); // The stored default that drives download and update-check decisions is now the series. - REQUIRE(std::string(get_latest_network_version()) == "02.08.01"); + REQUIRE(std::string(get_latest_network_version()) == "02.08.04"); } TEST_CASE_METHOD(PluginFolderFixture, "Only the loaded series is marked installed", "[NetworkVersions]") { - add_plugin("02.08.01.55"); - add_plugin("02.08.01_custom"); + add_plugin("02.08.04.60"); + add_plugin("02.08.04_custom"); - // The loaded plug-in reports its full build (02.08.01.55); the series row is what gets marked. + // The loaded plug-in reports its full build (02.08.04.60); the series row is what gets marked. { - auto versions = get_all_available_versions("02.08.01.55"); + auto versions = get_all_available_versions("02.08.04.60"); int marked = 0; for (const auto& info : versions) - if (info.is_loaded) { ++marked; REQUIRE(info.version == "02.08.01"); } + if (info.is_loaded) { ++marked; REQUIRE(info.version == "02.08.04"); } REQUIRE(marked == 1); } @@ -152,10 +155,10 @@ TEST_CASE_METHOD(PluginFolderFixture, "Only the loaded series is marked installe // A loaded custom build matches its own row, never the bare series. { - auto versions = get_all_available_versions("02.08.01_custom"); + auto versions = get_all_available_versions("02.08.04_custom"); int marked = 0; for (const auto& info : versions) - if (info.is_loaded) { ++marked; REQUIRE(info.version == "02.08.01_custom"); } + if (info.is_loaded) { ++marked; REQUIRE(info.version == "02.08.04_custom"); } REQUIRE(marked == 1); } @@ -167,11 +170,11 @@ TEST_CASE_METHOD(PluginFolderFixture, "Only the loaded series is marked installe TEST_CASE("Only whitelisted series pass the load gate", "[NetworkVersions]") { // Each whitelisted series, its builds, and custom-named builds of that series. - REQUIRE(is_supported_network_version("02.08.01")); - REQUIRE(is_supported_network_version("02.08.01.52")); - REQUIRE(is_supported_network_version("02.08.01.55")); - REQUIRE(is_supported_network_version("02.08.01_custom")); - REQUIRE(is_supported_network_version("02.08.01.52-dev")); + REQUIRE(is_supported_network_version("02.08.04")); + REQUIRE(is_supported_network_version("02.08.04.52")); + REQUIRE(is_supported_network_version("02.08.04.60")); + REQUIRE(is_supported_network_version("02.08.04_custom")); + REQUIRE(is_supported_network_version("02.08.04.52-dev")); REQUIRE(is_supported_network_version("02.03.00")); REQUIRE(is_supported_network_version("02.03.00.62")); REQUIRE(is_supported_network_version("02.03.00.70")); @@ -179,6 +182,9 @@ TEST_CASE("Only whitelisted series pass the load gate", "[NetworkVersions]") REQUIRE(is_supported_network_version(BAMBU_NETWORK_AGENT_VERSION_LEGACY)); // Series whitelisted by previous Orca releases that no generation here can call. + REQUIRE_FALSE(is_supported_network_version("02.08.01")); + REQUIRE_FALSE(is_supported_network_version("02.08.01.55")); + REQUIRE_FALSE(is_supported_network_version("02.08.01_custom")); REQUIRE_FALSE(is_supported_network_version("02.01.01.52")); REQUIRE_FALSE(is_supported_network_version("02.00.02.50")); @@ -198,9 +204,9 @@ TEST_CASE("Each version resolves to the ABI generation that can call it", "[Netw { // The generation is keyed on the series, so every build of a series - including the // custom-named ones - resolves to the same one. - CHECK(network_plugin_abi("02.08.01") == NetworkAbi::Current); - CHECK(network_plugin_abi("02.08.01.55") == NetworkAbi::Current); - CHECK(network_plugin_abi("02.08.01.52-dev") == NetworkAbi::Current); + CHECK(network_plugin_abi("02.08.04") == NetworkAbi::Current); + CHECK(network_plugin_abi("02.08.04.60") == NetworkAbi::Current); + CHECK(network_plugin_abi("02.08.04.52-dev") == NetworkAbi::Current); CHECK(network_plugin_abi("02.03.00") == NetworkAbi::V0203); CHECK(network_plugin_abi("02.03.00.62") == NetworkAbi::V0203); CHECK(network_plugin_abi("02.03.00_custom") == NetworkAbi::V0203); @@ -208,6 +214,7 @@ TEST_CASE("Each version resolves to the ABI generation that can call it", "[Netw // Anything the load gate rejects must dispatch through nothing at all, rather than // defaulting to a layout it does not share. + CHECK(network_plugin_abi("02.08.01.55") == NetworkAbi::Unsupported); CHECK(network_plugin_abi("02.01.01.52") == NetworkAbi::Unsupported); CHECK(network_plugin_abi("02.00.02.50") == NetworkAbi::Unsupported); CHECK(network_plugin_abi("02.09.00.10") == NetworkAbi::Unsupported); @@ -234,7 +241,7 @@ TEST_CASE_METHOD(PluginFolderFixture, "Legacy series never adopts discovered bui // With nothing else on disk, the series holds "(Latest)" even though its library is // not installed. for (const auto& info : versions) { - if (info.version == "02.08.01") { + if (info.version == "02.08.04") { REQUIRE(info.is_latest); REQUIRE_FALSE(info.is_loaded); }