Skip to content

Mf type erased binding - #897

Open
crimson11 wants to merge 2 commits into
mainfrom
mf_type_erased_binding
Open

Mf type erased binding#897
crimson11 wants to merge 2 commits into
mainfrom
mf_type_erased_binding

Conversation

@crimson11

Copy link
Copy Markdown
Contributor

No description provided.

Comment thread score/mw/com/impl/bindings/lola/skeleton_memory_manager.cpp Fixed
@crimson11
crimson11 force-pushed the mf_type_erased_binding branch from 762d009 to 4e4dcd7 Compare August 15, 2026 23:12
SCORE_LANGUAGE_FUTURECPP_PRECONDITION_PRD_MESSAGE(
data_ != nullptr, "Proxy::GetEventDataStorage: Managed memory data pointer is Null");
auto& service_data_storage = detail_proxy::GetServiceDataStorage(*data_);
const auto event_entry = service_data_storage.events_.find(element_fq_id);
Comment thread score/mw/com/impl/bindings/lola/skeleton_memory_manager.cpp Fixed
@crimson11
crimson11 force-pushed the mf_type_erased_binding branch 6 times, most recently from c743b6f to f7c4b7f Compare August 17, 2026 07:24
std::optional<SendTraceCallback> send_trace_callback) noexcept
{
const impl::SampleAllocateePtrView<void> view{sample};
auto ptr = view.template As<lola::SampleAllocateePtr>();
// coverity[autosar_cpp14_a15_5_3_violation : FALSE]
Result<impl::SampleAllocateePtr<void>> SkeletonEvent::Allocate(SampleAllocateeGuard guard) noexcept
{
if (event_data_control_composite_.has_value() == false)
{
const QualityType event_quality_type = parent_.GetInstanceQualityType();
SCORE_LANGUAGE_FUTURECPP_PRECONDITION_PRD_MESSAGE(
!((event_quality_type == QualityType::kASIL_QM) && (quality_type == QualityType::kASIL_B)),
// ReferenceNextEvent returns the slot with the highest timestamp in the exclusive range (min, max).
// We pass 0 and TIMESTAMP_MAX to span the entire valid timestamp range, so it always returns the
// most recently written sample regardless of its timestamp.
const auto slot_result = consumer_event_data_control_local.ReferenceNextEvent(EventSlotStatus::EventTimeStamp{0U},
@crimson11
crimson11 force-pushed the mf_type_erased_binding branch 2 times, most recently from c4e56f1 to 7106182 Compare August 22, 2026 17:41
// Overload for SkeletonEvent (uses Attorney to bypass private access)
template <typename SampleType>
score::mw::com::impl::lola::ElementFqId ExtractId(const score::mw::com::impl::lola::SkeletonEvent<SampleType>* binding)
score::mw::com::impl::lola::ElementFqId ExtractId(const score::mw::com::impl::lola::SkeletonEvent* binding)
template <typename BindingType>
score::mw::com::impl::lola::ElementFqId ExtractId(const BindingType* binding)
template <typename SampleType>
score::mw::com::impl::lola::ElementFqId ExtractId(const score::mw::com::impl::lola::ProxyEvent<SampleType>* binding)
@crimson11
crimson11 force-pushed the mf_type_erased_binding branch 4 times, most recently from b7e51a5 to cd11c56 Compare August 23, 2026 16:14
@crimson11
crimson11 marked this pull request as ready for review August 23, 2026 16:51
Changed the previously typed EventDataStorage
now to a type-erased storage.
This commit bases on the previous commit, which
made the event/field data storage in the LoLa binding
type erased.
Now or general approach is, that the binding layer is
type-erased! This was already the case for methods, but
has now be changed for events/fields as well.
This commit only deals with the skeleton-side! Proxy-side
will be handled in a seperate commit.
Important: This change greatly simplfies our architecture!
I.e. on binding level we don't need any GenericSkeleton
specific entities anymore, because on binding level
Skeleton and SkeletonEvent are now type erased and therefore
"generic"! Because the skeleton side is (in specific cases)
also providing `SamplePtrs` (not only SampleAllocateePtrs), we
needed in this commit already some "void"/type-erased extensions
to the SamplePtr. This will be further adjusted in the upcoming
commit, which adapts the proxy-side (making it type-erased).
@crimson11
crimson11 force-pushed the mf_type_erased_binding branch from cd11c56 to c360e8d Compare August 24, 2026 16:25
@LittleHuba
LittleHuba marked this pull request as draft August 27, 2026 08:53
@crimson11
crimson11 marked this pull request as ready for review August 27, 2026 08:58
@crimson11

Copy link
Copy Markdown
Contributor Author

This PR is huge! No chance to break it down further. Thus, we will see conflicts popping up during review-phase. This is expected. Conflicts will be resolved after 1st review phase is done and then (obviously) before merge!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

2 participants