Skip to content

Adds GetLatestSample function#3

Closed
saksham-chawla wants to merge 3 commits intocodex/replay-pr-204-basefrom
codex/replay-pr-204-head
Closed

Adds GetLatestSample function#3
saksham-chawla wants to merge 3 commits intocodex/replay-pr-204-basefrom
codex/replay-pr-204-head

Conversation

@saksham-chawla
Copy link
Collaborator

@saksham-chawla saksham-chawla commented Mar 18, 2026

Adds GetLatestSample function

This pull request introduces a new GetLatestSample() function to the SkeletonEventBinding interface and its lola::SkeletonEvent implementation. This function allows consumers to retrieve the most recently sent sample from an event. It also adds a new GetLatestSlot() function to EventDataControlCompositeImpl to find the latest readable slot, which is then utilized by GetLatestSample(). Extensive unit tests have been added to validate this new functionality across various scenarios.

Architecture Diagram:

flowchart TD
    subgraph API_Layer
        A["SkeletonEvent (+10 lines)"] --"delegates GetLatestSample"--> B["SkeletonEventBinding (+2 lines)"]
    end

    subgraph Service_Layer
        B["SkeletonEventBinding (+2 lines)"] --"implemented by"--> C["lola::SkeletonEvent (+38 lines)"]
        C --"calls GetLatestSlot"--> D["EventDataControlComposite (+2 lines)"]
        C --"accesses data"--> E[("EventDataStorage")]
    end

    subgraph Control_Layer
        D["EventDataControlComposite (+2 lines)"] --"manages"--> F["EventDataControl"]
        D --"uses"--> G["EventSlotStatus"]
        D --"finds latest slot"--> H["FindLatestReadableSlotIndex (+19 lines)"]
        D --"increments ref count"--> I["TryIncreaseReferenceCount (+13 lines)"]
    end

    subgraph Test_Layer
        J["lola::SkeletonEvent_test (+50 lines)"] --"tests"--> C
        K["EventDataControlComposite_test (+68 lines)"] --"tests"--> D
        L["SkeletonEvent_test (+54 lines)"] --"tests"--> A
        M["SkeletonEventBinding_test (+4 lines)"] --"tests"--> B
    end
Loading

This summary was automatically generated by @propel-code-bot

muhseth added 3 commits March 17, 2026 12:19
- Adds GetLatestSlot function to EventDataControlComposite

Issue: SWP-249517
- Adds GetLatestSampleFunction to SkeletonEvent
Issue: SWP-249517
- fixes clang format issues.
Issue: SWP-249517
saksham-chawla pushed a commit that referenced this pull request Mar 18, 2026
…_implementation_Feedback_Review

Address review feedback
@saksham-chawla saksham-chawla marked this pull request as ready for review March 18, 2026 18:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants