1111 * SPDX-License-Identifier: Apache-2.0
1212 ********************************************************************************/
1313#include " score/mw/com/impl/bindings/lola/event_data_control_composite.h"
14+
1415#include < utility>
1516
16- namespace score ::mw::com::impl::lola::detail_event_data_control_composite
17+ namespace score ::mw::com::impl::lola
1718{
1819
1920namespace
2021{
22+
2123constexpr std::size_t MAX_MULTI_ALLOCATE_RETRY_COUNT{100U };
24+
2225}
2326
2427// NOLINTNEXTLINE(cppcoreguidelines-pro-type-member-init): all members are initialized in the delegated constructor
2528template <template <class > class AtomicIndirectorType >
26- EventDataControlCompositeImpl<AtomicIndirectorType>::EventDataControlCompositeImpl(
27- EventDataControl* const asil_qm_control)
28- : EventDataControlCompositeImpl{asil_qm_control, nullptr }
29+ EventDataControlComposite<AtomicIndirectorType>::EventDataControlComposite(EventDataControl* const asil_qm_control)
30+ : EventDataControlComposite{asil_qm_control, nullptr }
2931{
3032}
3133
3234template <template <class > class AtomicIndirectorType >
33- EventDataControlCompositeImpl<AtomicIndirectorType>::EventDataControlCompositeImpl(
34- EventDataControl* const asil_qm_control,
35- EventDataControl* const asil_b_control)
35+ EventDataControlComposite<AtomicIndirectorType>::EventDataControlComposite(EventDataControl* const asil_qm_control,
36+ EventDataControl* const asil_b_control)
3637 : asil_qm_control_{asil_qm_control}, asil_b_control_{asil_b_control}, ignore_qm_control_{false }
3738{
3839 CheckForValidDataControls ();
@@ -45,7 +46,7 @@ template <template <class> class AtomicIndirectorType>
4546// throwing std::bad_optional_access which leds to std::terminate(). This suppression should be removed after fixing
4647// [Ticket-173043](broken_link_j/Ticket-173043)
4748// coverity[autosar_cpp14_a15_5_3_violation : FALSE]
48- auto EventDataControlCompositeImpl <AtomicIndirectorType>::GetNextFreeMultiSlot() const noexcept
49+ auto EventDataControlComposite <AtomicIndirectorType>::GetNextFreeMultiSlot() const noexcept
4950 -> ControlSlotCompositeIndicator
5051{
5152 EventSlotStatus::EventTimeStamp oldest_time_stamp{EventSlotStatus::TIMESTAMP_MAX};
@@ -120,8 +121,8 @@ template <template <class> class AtomicIndirectorType>
120121// in case the index goes outside the range. As we already do an index check before accessing, so no way for
121122// segmentation fault which leds to calling std::terminate().
122123// coverity[autosar_cpp14_a15_5_3_violation : FALSE]
123- auto EventDataControlCompositeImpl <AtomicIndirectorType>::TryLockSlot(
124- ControlSlotCompositeIndicator slot_indicator) noexcept -> bool
124+ auto EventDataControlComposite <AtomicIndirectorType>::TryLockSlot(ControlSlotCompositeIndicator slot_indicator) noexcept
125+ -> bool
125126{
126127 auto & slot_value_qm = slot_indicator.GetSlotQM ();
127128 auto & slot_value_asil_b = slot_indicator.GetSlotAsilB ();
@@ -163,8 +164,7 @@ template <template <class> class AtomicIndirectorType>
163164// have a value but as we check before with 'has_value()' so no way for throwing std::bad_optional_access which leds
164165// to std::terminate().
165166// coverity[autosar_cpp14_a15_5_3_violation : FALSE]
166- auto EventDataControlCompositeImpl<AtomicIndirectorType>::AllocateNextMultiSlot() noexcept
167- -> ControlSlotCompositeIndicator
167+ auto EventDataControlComposite<AtomicIndirectorType>::AllocateNextMultiSlot() noexcept -> ControlSlotCompositeIndicator
168168{
169169 // \todo we should also monitor retry counts in the multi-slot/EventDataControlComposite case, like we are doing in
170170 // EventDataControl! Currently we are "blind", if we have retries, because ASIL-QM/ASIL-B consumers do influence
@@ -185,7 +185,7 @@ auto EventDataControlCompositeImpl<AtomicIndirectorType>::AllocateNextMultiSlot(
185185}
186186
187187template <template <class > class AtomicIndirectorType >
188- auto EventDataControlCompositeImpl <AtomicIndirectorType>::AllocateNextSlot() noexcept -> ControlSlotCompositeIndicator
188+ auto EventDataControlComposite <AtomicIndirectorType>::AllocateNextSlot() noexcept -> ControlSlotCompositeIndicator
189189{
190190 if (asil_b_control_ == nullptr )
191191 {
@@ -233,9 +233,9 @@ auto EventDataControlCompositeImpl<AtomicIndirectorType>::AllocateNextSlot() noe
233233}
234234
235235template <template <class > class AtomicIndirectorType >
236- auto EventDataControlCompositeImpl <AtomicIndirectorType>::EventReady(
237- ControlSlotCompositeIndicator slot_indicator,
238- EventSlotStatus::EventTimeStamp time_stamp) noexcept -> void
236+ auto EventDataControlComposite <AtomicIndirectorType>::EventReady(ControlSlotCompositeIndicator slot_indicator,
237+ EventSlotStatus::EventTimeStamp time_stamp) noexcept
238+ -> void
239239{
240240 if (asil_b_control_ != nullptr )
241241 {
@@ -249,7 +249,7 @@ auto EventDataControlCompositeImpl<AtomicIndirectorType>::EventReady(
249249}
250250
251251template <template <class > class AtomicIndirectorType >
252- auto EventDataControlCompositeImpl <AtomicIndirectorType>::Discard(ControlSlotCompositeIndicator slot_indicator) -> void
252+ auto EventDataControlComposite <AtomicIndirectorType>::Discard(ControlSlotCompositeIndicator slot_indicator) -> void
253253{
254254 if (asil_b_control_ != nullptr )
255255 {
@@ -263,20 +263,19 @@ auto EventDataControlCompositeImpl<AtomicIndirectorType>::Discard(ControlSlotCom
263263}
264264
265265template <template <class > class AtomicIndirectorType >
266- bool EventDataControlCompositeImpl <AtomicIndirectorType>::IsQmControlDisconnected() const noexcept
266+ bool EventDataControlComposite <AtomicIndirectorType>::IsQmControlDisconnected() const noexcept
267267{
268268 return ignore_qm_control_;
269269}
270270
271271template <template <class > class AtomicIndirectorType >
272- EventDataControl& EventDataControlCompositeImpl <AtomicIndirectorType>::GetQmEventDataControl() const noexcept
272+ EventDataControl& EventDataControlComposite <AtomicIndirectorType>::GetQmEventDataControl() const noexcept
273273{
274274 return *asil_qm_control_;
275275}
276276
277277template <template <class > class AtomicIndirectorType >
278- std::optional<EventDataControl*>
279- EventDataControlCompositeImpl<AtomicIndirectorType>::GetAsilBEventDataControl() noexcept
278+ std::optional<EventDataControl*> EventDataControlComposite<AtomicIndirectorType>::GetAsilBEventDataControl() noexcept
280279{
281280 if (asil_b_control_ != nullptr )
282281 {
@@ -286,7 +285,7 @@ EventDataControlCompositeImpl<AtomicIndirectorType>::GetAsilBEventDataControl()
286285}
287286
288287template <template <class > class AtomicIndirectorType >
289- EventSlotStatus::EventTimeStamp EventDataControlCompositeImpl <AtomicIndirectorType>::GetEventSlotTimestamp(
288+ EventSlotStatus::EventTimeStamp EventDataControlComposite <AtomicIndirectorType>::GetEventSlotTimestamp(
290289 const SlotIndexType slot) const noexcept
291290{
292291 if (asil_b_control_ != nullptr )
@@ -304,7 +303,7 @@ EventSlotStatus::EventTimeStamp EventDataControlCompositeImpl<AtomicIndirectorTy
304303}
305304
306305template <template <class > class AtomicIndirectorType >
307- void EventDataControlCompositeImpl <AtomicIndirectorType>::CheckForValidDataControls() const noexcept
306+ void EventDataControlComposite <AtomicIndirectorType>::CheckForValidDataControls() const noexcept
308307{
309308 if (asil_qm_control_ == nullptr )
310309 {
@@ -318,7 +317,7 @@ template <template <class> class AtomicIndirectorType>
318317// in case the index goes outside the range. As we already do an index check before accessing, so no way for
319318// segmentation fault which leds to calling std::terminate().
320319// coverity[autosar_cpp14_a15_5_3_violation : FALSE]
321- EventSlotStatus::EventTimeStamp EventDataControlCompositeImpl <AtomicIndirectorType>::GetLatestTimestamp() const noexcept
320+ EventSlotStatus::EventTimeStamp EventDataControlComposite <AtomicIndirectorType>::GetLatestTimestamp() const noexcept
322321{
323322 EventSlotStatus::EventTimeStamp latest_time_stamp{1U };
324323 EventDataControl* control = (asil_b_control_ != nullptr ) ? asil_b_control_ : asil_qm_control_;
@@ -343,7 +342,7 @@ EventSlotStatus::EventTimeStamp EventDataControlCompositeImpl<AtomicIndirectorTy
343342 return latest_time_stamp;
344343}
345344
346- template class EventDataControlCompositeImpl <memory::shared::AtomicIndirectorReal>;
347- template class EventDataControlCompositeImpl <memory::shared::AtomicIndirectorMock>;
345+ template class EventDataControlComposite <memory::shared::AtomicIndirectorReal>;
346+ template class EventDataControlComposite <memory::shared::AtomicIndirectorMock>;
348347
349- } // namespace score::mw::com::impl::lola::detail_event_data_control_composite
348+ } // namespace score::mw::com::impl::lola
0 commit comments