Add requirements for GenericSkeleton#453
Conversation
6c035cd to
581ca2c
Compare
|
|
||
|
|
||
| ScoreReq.CompReq GenericSkeletonEventListSource { | ||
| description = '''A {{GenericSkeleton}} instance shall deduce its supported events from the {{LoLa}} JSON configuration containing deployment information. |
There was a problem hiding this comment.
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 ...
There was a problem hiding this comment.
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 { |
There was a problem hiding this comment.
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" { |
There was a problem hiding this comment.
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 { |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
581ca2c to
28c6611
Compare
| } | ||
|
|
||
| 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. |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 )
There was a problem hiding this comment.
I introduced some new error codes for those specific errors, because the existing ones did not 100% match.
| version = 1 | ||
| } | ||
|
|
||
| ScoreReq.CompReq GenericSkeletonInterfaceElementInConfigurationVerification { |
There was a problem hiding this comment.
Wouldn't we then also specify with what error we fail?
There was a problem hiding this comment.
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] |
There was a problem hiding this comment.
What says "Communication.ZeroCopy@1"? I would be curious from what high-level requirement we deduce "non-copyable" semantics ...
There was a problem hiding this comment.
I took this over from the GenericProxy requirement: https://github.com/eclipse-score/communication/blob/main/score/mw/com/dependability/requirements/component_requirements/component_requirements_ipc.trlc#L1099
There was a problem hiding this comment.
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 }}} |
There was a problem hiding this comment.
Please adapt to the newest code (rofl) ... https://github.com/eclipse-score/communication/pull/475/changes#diff-da0c9333f8761ed2a0021cc3c1d6c755224f82bef5850f2d1ebcd8fdd38a29d2R74
|
|
||
| /// \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 |
There was a problem hiding this comment.
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; }}} |
There was a problem hiding this comment.
I guess the naming shall be rather like in your PR: https://cc-github.bmwgroup.net/oss/eclipse-score-communication/pull/218/files#diff-8f00a8b549d725cb8243dc7f673665fc0ccd567bf42667476bcce646564a1236R47 ?
| ScoreReq.CompReq GenericSkeletonEventUnsetReceiveHandlerChangedHandler { | ||
| description = '''A {{{GenericSkeletonEvent}}} class shall provide a public method: | ||
|
|
||
| {{{score::Result<void> GenericSkeletonEvent::UnsetReceiveHandlerChangedHandler() noexcept; }}} |
There was a problem hiding this comment.
| ScoreReq.CompReq GenericSkeletonFieldSetReceiveHandlerChangedHandler { | ||
| description = '''A {{{GenericSkeletonField}}} class shall provide a public method: | ||
|
|
||
| {{{score::Result<void> GenericSkeletonField::SetReceiveHandlerChangedHandler(ReceiveHandlerRegistrationChangedCallback callback) noexcept; }}} |
| ScoreReq.CompReq GenericSkeletonFieldUnsetReceiveHandlerChangedHandler { | ||
| description = '''A {{{GenericSkeletonField}}} class shall provide a public method: | ||
|
|
||
| {{{score::Result<void> GenericSkeletonField::UnsetReceiveHandlerChangedHandler() noexcept; }}} |
90c5ee6 to
9accea1
Compare
- 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
9accea1 to
81e876f
Compare
No description provided.