mw/com: Update event slot size based on field tags#746
Conversation
e8f58d6 to
50076f0
Compare
50076f0 to
15806fc
Compare
15806fc to
94153a6
Compare
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>
94153a6 to
39ebb93
Compare
| { | ||
| } | ||
|
|
||
| /// \brief Returns the total number of slots configured for the event (or field) configured by the user (via |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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.", |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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(); |
There was a problem hiding this comment.
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 |
| `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 |
| EXPECT_TRUE(store.HasNotifier()); | ||
| EXPECT_TRUE(store.HasSetter()); | ||
| EXPECT_TRUE(store.HasGetter()); | ||
| } |
There was a problem hiding this comment.
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?
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