Skip to content

mw/com: Update event slot size based on field tags#746

Open
bemerybmw wants to merge 4 commits into
mainfrom
brem_fields_update_slot_counts
Open

mw/com: Update event slot size based on field tags#746
bemerybmw wants to merge 4 commits into
mainfrom
brem_fields_update_slot_counts

Conversation

@bemerybmw

@bemerybmw bemerybmw commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

mw/com: Update event slot size based on field tags

The number of slots required for a field now takes into account the
slot requirements for different combinations of WithNotifier, WithGetter
and WithSetter. These are stored in SkeletonEventProperties which is
passed down to the lola binding. These values are used both to size the
event slot vectors and also by the lola::SkeletonEventCommon to
determine whether a getter was enabled or not. Further details are
documented in score/mw/com/design/events_fields/README.md.

Co-Authored-By: Krishna Satish Deshkulkarni Shankaranarayana krishna-satish.deshkulkarni-shankaranarayana@bmw.de

@bemerybmw
bemerybmw force-pushed the brem_fields_update_slot_counts branch 3 times, most recently from e8f58d6 to 50076f0 Compare July 23, 2026 07:24
@bemerybmw bemerybmw changed the title Brem fields update slot counts mw/com: Update event slot size based on field tags Jul 23, 2026
@bemerybmw
bemerybmw force-pushed the brem_fields_update_slot_counts branch from 50076f0 to 15806fc Compare July 23, 2026 11:36
@bemerybmw
bemerybmw force-pushed the brem_fields_update_slot_counts branch from 15806fc to 94153a6 Compare July 23, 2026 13:24
bemerybmw and others added 4 commits July 24, 2026 09:08
Co-Authored-By: Krishna Satish Deshkulkarni Shankaranarayana <krishna-satish.deshkulkarni-shankaranarayana@bmw.de>
Co-Authored-By: Krishna Satish Deshkulkarni Shankaranarayana <krishna-satish.deshkulkarni-shankaranarayana@bmw.de>
Co-Authored-By: Krishna Satish Deshkulkarni Shankaranarayana <krishna-satish.deshkulkarni-shankaranarayana@bmw.de>
The number of slots required for a field now takes into account the
slot requirements for different combinations of WithNotifier, WithGetter
and WithSetter. These are stored in SkeletonEventProperties which is
passed down to the lola binding. These values are used both to size the
event slot vectors and also by the lola::SkeletonEventCommon to
determine whether a getter was enabled or not. Further details are
documented in score/mw/com/design/events_fields/README.md.

Co-Authored-By: Krishna Satish Deshkulkarni Shankaranarayana <krishna-satish.deshkulkarni-shankaranarayana@bmw.de>
@bemerybmw
bemerybmw force-pushed the brem_fields_update_slot_counts branch from 94153a6 to 39ebb93 Compare July 24, 2026 07:08
@bemerybmw
bemerybmw marked this pull request as ready for review July 24, 2026 07:41
{
}

/// \brief Returns the total number of slots configured for the event (or field) configured by the user (via

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

one of the configured words can be removed :)

}

/// \brief Returns the total number of slots configured for the event (or field) configured by the user (via
/// numberOfSampleSlots and numberOfIpcTracingSlots configuration properties) and required to support field Getter

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to support field Getter

to support field Getter and Setter ?

"title": "Number of sample slots",
"description": "Mandatory LoLa specific provider/skeleton side setting, how many sample slots shall be allocated. Value needs to be between 1 and 65535!",
"minimum": 1,
"description": "Mandatory LoLa specific provider/skeleton side setting, how many sample slots shall be allocated. Value needs to be between 1 and 65535 wheth the field has Notifier enabled! For a field with Notifier disabled, this value denotes the number of SampleAllocateePtrs that can be held (from a call to Allocate() on the Skeleton Field) at one time while the maximum supported number of concurrent getter calls are being processed. A value of 0 can therefore be provided which means that Allocate() can not be called while the getter calls are being processed. A value of 1 is recommended for most use cases.",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wheth the field ...
->
when the field

`numberOfSampleSlots` is taken into account. The configured value should be calculated based on the total number of subscribers
and the max number of samples they subscribe with (see [here for details](#sizing-of-event_slots-and-state_slots-vectors)).
If `WithNotifier` is not present, then `WithGetter` must be present (otherwise a consumer has no way of getting a field value).
In this case, `numberOfSampleSlots` should be configured according to the number of SampleAllocateePtrs (can be allocated via a

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SampleAllocateePtrs -> SampleAllocateePtrs

... other than that: I really like your very concise documentation here about the slot-sizing!

const SkeletonEventProperties event_properties) noexcept
{
bool inserted;
const auto total_number_of_slots = event_properties.GetTotalNumberOfSlots();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why this explicit extraction into a tmp variable? To be 100% sure to use the same value in EventControl and EventDataStorage?

`numberOfSampleSlots`. I.e. The sum of all `maxSamples` values of all subscribing consumers must not exceed
`numberOfSampleSlots`. Otherwise, the subscribe call will be rejected. However, this check is not ASIL level
overarching. See explanation in the `maxSubscribers` section below.
**Note**: In case of a field without `WithNotifier` this property is rather the number the number of

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove one "the number"

`numberOfSampleSlots`. Otherwise, the subscribe call will be rejected. However, this check is not ASIL level
overarching. See explanation in the `maxSubscribers` section below.
**Note**: In case of a field without `WithNotifier` this property is rather the number the number of
SampleAllocateePtrs (can be allocated via a call to `Allocate()` on the `SkeletonField`) which can be made

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove "made"?

EXPECT_TRUE(store.HasNotifier());
EXPECT_TRUE(store.HasSetter());
EXPECT_TRUE(store.HasGetter());
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So:
auto store = FieldTagsStore::Create<int>();

would "work" ... and return a FieldTagsStore with all bools being set to false?
Do we want this behaviour?
Shall we explicitly test for it?

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