File tree Expand file tree Collapse file tree 3 files changed +12
-1
lines changed
Expand file tree Collapse file tree 3 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -53,7 +53,7 @@ class FileDownloader final
5353
5454 state_.file_size = 0 ;
5555 state_.file_progress = 0 ;
56- state_.file_path = file_path;
56+ state_.file_path = { file_path. data (), file_path. size ()} ;
5757 state_.start_time = time_provider_.now ();
5858 state_.file_error .value = uavcan::file::Error_1_0::OK;
5959
Original file line number Diff line number Diff line change @@ -94,6 +94,8 @@ struct CommonHelpers
9494 }),
9595 report_var);
9696
97+ // "swallows" all transient failures, thus giving a chance
98+ // to other redundant media interfaces to continue.
9799 return cetl::nullopt ;
98100 }
99101
@@ -154,6 +156,8 @@ struct CommonHelpers
154156 }),
155157 report_var);
156158
159+ // "swallows" all transient failures, thus giving a chance
160+ // to other redundant media interfaces to continue.
157161 return cetl::nullopt ;
158162 }
159163
Original file line number Diff line number Diff line change @@ -65,6 +65,13 @@ struct TransportBagCan final
6565 const std::size_t block_size = mtu;
6666 const std::size_t pool_size = media_collection_.count () * TxQueueCapacity * block_size;
6767 media_block_mr_.setup (pool_size, block_size, block_alignment);
68+
69+ // To support redundancy (multiple homogeneous interfaces), it's important to have a non-default
70+ // handler which "swallows" expected transient failures (by returning `nullopt` result).
71+ // Otherwise, the default Cyphal behavior will fail/interrupt current and future transfers
72+ // if some of its media encounter transient failures - thus breaking the whole redundancy goal,
73+ // namely, maintain communication if at least one of the interfaces is still up and running.
74+ //
6875 transport_->setTransientErrorHandler ([](auto &) { return cetl::nullopt ; });
6976 // transport_->setTransientErrorHandler(platform::CommonHelpers::Can::transientErrorReporter);
7077
You can’t perform that action at this time.
0 commit comments