Adopt/prepared packet v0 - #535
Conversation
2c67397 to
eea4e01
Compare
Co-authored-by: Cursor <cursoragent@cursor.com>
eea4e01 to
b6f2516
Compare
| prepared, std::move(api_context_), *byte_stream_); | ||
|
|
||
| if (!result) { | ||
| std::cerr << "FastTx EncodePacket failed: " |
There was a problem hiding this comment.
It also should be #ifdef'ed with user_config.h and counted in the prepared block variable with probably counting data processed and packets count so telemetry then sends it to the cloud
| std::array<uint8_t, sizeof(base_station.target_bssid)> debug_bssid; | ||
| memcpy(debug_bssid.data(), base_station.target_bssid, | ||
| sizeof(base_station.target_bssid)); | ||
| AE_TELED_DEBUG("Restored from cash BSSID:{} CHN:{}", debug_bssid, |
There was a problem hiding this comment.
The information also should be passed into the prepared block or other "stats" block so when a normal ae client patch is used it is inserted into tele allowing to check how often wifi opts were used
There was a problem hiding this comment.
Didn't make prepared block for wifi yet.
Again I don't think we should store telemetry for prepared blocks.
Either we use as small and fast implementation as possible or use full aether client implementation.
There was a problem hiding this comment.
We still need a separate minimal RTC-resident statistics block, independent of the prepared message block. The full Aether client should import these numeric counters into normal telemetry on the next full-path run and then clear them. Keep only Aether-related data: successful channel-cache/BSSID/static-IP uses (we want to count devices where each optimization works) and the total number of prepared sends, which we can compare with the number received by the server to estimate loss. Do not collect socket/sendto success, failures, retries, or would-block events: that code is external to Aether. nonce_exhausted is also unnecessary because the reserved block size is already known.
add endpoint() property for channel add method to get cached cloud
|
@NikolayChirkov you've reviewed old version. I completely rebuild it. |
NikolayChirkov
left a comment
There was a problem hiding this comment.
Two additional issues in the current head.
| if ((cached != cloud_cache_.end()) && cached->second.cloud.is_valid()) { | ||
| return {}; | ||
| } | ||
| return cached->second.cloud; |
There was a problem hiding this comment.
This condition is inverted. A valid cached cloud currently returns an empty pointer, while a missing entry falls through and dereferences end(). Return empty when cached == cloud_cache_.end() or the cached cloud is invalid; otherwise return cached->second.cloud.
| Protocol protocol; | ||
| }; | ||
|
|
||
| struct PreparedSendMessageBlock : BlockBase { |
There was a problem hiding this comment.
sender_uid is not read by EncodePacket() or by prepared-path selection. Please remove it from the RTC-resident block unless there is a concrete consumer; the block should contain only data required after wake-up.
THis is continuation of work from branch #531
Code was rebased on last
mainand conflict was fixed.