Skip to content

Add requirements for GenericSkeleton#453

Draft
SebSparrowHawk wants to merge 1 commit into
eclipse-score:mainfrom
SebSparrowHawk:ssp_requirements_generic_skeleton
Draft

Add requirements for GenericSkeleton#453
SebSparrowHawk wants to merge 1 commit into
eclipse-score:mainfrom
SebSparrowHawk:ssp_requirements_generic_skeleton

Conversation

@SebSparrowHawk
Copy link
Copy Markdown
Contributor

No description provided.

@SebSparrowHawk SebSparrowHawk force-pushed the ssp_requirements_generic_skeleton branch from 6c035cd to 581ca2c Compare May 20, 2026 13:03


ScoreReq.CompReq GenericSkeletonEventListSource {
description = '''A {{GenericSkeleton}} instance shall deduce its supported events from the {{LoLa}} JSON configuration containing deployment information.
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.

Hm. Not sure?
The GenericSkeleton gets the list of events/fields (and at some point also methods - we haven't implemented this yet, but need to do soonish) via parameter in Create(). So the TRUTH is in this parameter of type GenericSkeletonServiceElementInfo ... the related existance of these elements (events/fields) in the mw_com_config.json is also a requirement ... but I would then have a separate req!
The separate req. says, that the GenericSkeleton::Create() shall fail, if for one of the elements in GenericSkeletonServiceElementInfo there is no correlated type/deployment info ...

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Changed the description of this ticket and introduced an extra requirement for the verification if elements exist in mw_com_config.json.

version = 1
}

ScoreReq.CompReq GenericSkeletonGetEvents {
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.

You could already create/duplicate these reqs. for fields! Even if it is currently not implemented ... but should be done soonish and then we already have the reqs.


}

section "Generic_Skeleton_Event" {
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.

You can "copy" this section for Fields - do a simple 1:1 copy - which means, that right now we would not have get/set functionality for the GenericField ... this we will add later on req. level, when we now, how we want to deal with methods at all.

}
}

ScoreReq.CompReq DataTypeMetaInfo {
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.

please double-check with Brendan! Afaik we also have/use {{score::memory::DataTypeSizeInfo}}, which is almost identically! Maybe we have to refactor/clean-up code

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Sounds good (also for Brendan) and I removed this requirement and replaced it in the other requirements. I also added a TODO at the definition of DataTypeMetaInfo to replace it with the DataTypeSizeInfo type.

@SebSparrowHawk SebSparrowHawk force-pushed the ssp_requirements_generic_skeleton branch from 581ca2c to 28c6611 Compare May 27, 2026 08:21
}

ScoreReq.CompReq GenericSkeletonExceptionLessCreation {
description = '''The {{GenericSkeleton}} class shall provide a non-throwing constructor using the Named Constructor idom (See Creation of an object using Named Constructor approach.
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.

closing ")" missing ;)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Good catch ;)

* on success, a {{GenericSkeleton}}

* {{score::result::Error}} containing the value {{ComErrc::kInstanceIDCouldNotBeResolved}} if the instance identifier could not be resolved from the instance specifier
* {{score::result::Error}} containing the value {{ComErrc::kBindingFailure}} if the binding could not be created
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.

kBindingFailure is "bad", because the user has to guess, what is the issue. FYI: Back then (beginnings of LoLa) we had to resort to the usage of kBindingFailure, because we had to follow AUTOSAR, which only provided/defined a fixed set of errors!. Whenever we had additional errors not yet foreseen by AUTOSAR, we had to fall back to kBindingFailure. This is not needed anymore! We aren't AUTOSAR slaves anymore :D
So please introduce new/descriptive error-codes if you need to. (and yes - we might need to fix the code then :P )

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I introduced some new error codes for those specific errors, because the existing ones did not 100% match.

version = 1
}

ScoreReq.CompReq GenericSkeletonInterfaceElementInConfigurationVerification {
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.

Wouldn't we then also specify with what error we fail?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Added the return code specification.

ScoreReq.CompReq GenericSkeletonCopySemantics {
description = '''The {{GenericSkeleton}} class shall neither be copy-constructable nor copy-assignable.'''
safety = ScoreReq.Asil.B
derived_from = [Communication.DataLoss@1, Communication.ZeroCopy@1]
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.

What says "Communication.ZeroCopy@1"? I would be curious from what high-level requirement we deduce "non-copyable" semantics ...

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Removed the link to that feature requirement wherever it was used to "justify" non-copy semantics.

ScoreReq.CompReq GenericSkeletonGetEvents {
description = '''The {{GenericSkeleton}} class shall contain a {{public}} method:

{{{const GenericSkeleton::EventMap& GenericSkeleton::GetEvents() const noexcept }}}
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.

Comment thread score/mw/com/impl/service_element_map.h Outdated

/// \brief Map that will be used in GenericProxies to store GenericProxyEvents and possibly GenericProxyFields and
/// GenericProxyMethods once they're supported by LoLa.
/// \brief Map that will be used in GenericProxies/GenericSkeletons to store the Generic interface elements
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.

You can leave these changes out ... I'm currently refactoring it: #475

ScoreReq.CompReq GenericSkeletonEventSetReceiveHandlerChangedHandler {
description = '''A {{{GenericSkeletonEvent}}} class shall provide a public method:

{{{score::Result<void> GenericSkeletonEvent::SetReceiveHandlerChangedHandler(ReceiveHandlerRegistrationChangedCallback callback) noexcept; }}}
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.

ScoreReq.CompReq GenericSkeletonEventUnsetReceiveHandlerChangedHandler {
description = '''A {{{GenericSkeletonEvent}}} class shall provide a public method:

{{{score::Result<void> GenericSkeletonEvent::UnsetReceiveHandlerChangedHandler() noexcept; }}}
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.

ScoreReq.CompReq GenericSkeletonFieldSetReceiveHandlerChangedHandler {
description = '''A {{{GenericSkeletonField}}} class shall provide a public method:

{{{score::Result<void> GenericSkeletonField::SetReceiveHandlerChangedHandler(ReceiveHandlerRegistrationChangedCallback callback) noexcept; }}}
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.

see above in the event

ScoreReq.CompReq GenericSkeletonFieldUnsetReceiveHandlerChangedHandler {
description = '''A {{{GenericSkeletonField}}} class shall provide a public method:

{{{score::Result<void> GenericSkeletonField::UnsetReceiveHandlerChangedHandler() noexcept; }}}
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.

see above in the event

@SebSparrowHawk SebSparrowHawk force-pushed the ssp_requirements_generic_skeleton branch 2 times, most recently from 90c5ee6 to 9accea1 Compare May 29, 2026 11:33
- Added requirements for GenericSkeleton and its service elements
- Added requirements for GenericProxyField
- Cleanup of Communication.ZeroCopy requirement linkage in the context of disabled copy-constructors
- Changed requirements where EventMap, FieldMap was used to EventMapView and FieldMapView
@SebSparrowHawk SebSparrowHawk force-pushed the ssp_requirements_generic_skeleton branch from 9accea1 to 81e876f Compare May 29, 2026 11:59
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.

3 participants