Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,168 @@
/********************************************************************************
* Copyright (c) 2026 Contributors to the Eclipse Foundation
*
* See the NOTICE file(s) distributed with this work for additional
* information regarding copyright ownership.
*
* This program and the accompanying materials are made available under the
* terms of the Apache License Version 2.0 which is available at
* https://www.apache.org/licenses/LICENSE-2.0
*
* SPDX-License-Identifier: Apache-2.0
********************************************************************************/
package Communication

import ScoreReq

section "com" {
section "Public_API_Requirements" {

ScoreReq.CompReq FieldGetAndSetInterfaceDefinition{

description = """
On the interface definition level of a field it shall be possible to specify for each of the following
functionalities, whether they are enabled or not:
- support for a `Get()` call to retrieve the current field value
- support for a `Set()` call to set the current field value
- support for a notification to registered consumers to a field update.
"""
safety = ScoreReq.Asil.B
derived_from = [Communication.Field@1]
version = 1
}


ScoreReq.CompReq NoSupportForNotificationInSharedMemoryBinding {

description = """For the field implementation in our shared-memory-binding implementation, we shall ignore the setting for "support for a notification" specified in [[FieldGetAndSetInterfaceDefinition]]. Since, in the shared-memory-binding implementation support for an update notification does not imply any performance drawbacks, opposed to e.g. a network binding."""
Copy link
Contributor

Choose a reason for hiding this comment

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

For the field implementation in the shared-memory-binding implementation, the setting for "support for a notification" specified in [[FieldGetAndSetInterfaceDefinition]] shall be ignored. This is because, in the shared-memory-binding implementation, support for update notifications does not imply any performance drawbacks, unlike, for example, a network binding.

safety = ScoreReq.Asil.B
derived_from = [Communication.Field@1, Communication.MultiBindingSupport@1]
version = 1
}

}

section "Field_member_representation_at_the_Proxy_side" {

ScoreReq.CompReq GetMethodOnlyIfEnabledInInterfaceDefinition {
description="""It shall provide a public `Get` method only in the case, that 'support for a `Get()`' has been enabled in the underlying interface definition (see [[FieldGetAndSetInterfaceDefinition]])"""
derived_from = [Communication.Field@1]
version = 1

}

ScoreReq.CompReq GetMethodSignature {
description=""" The signature of the `Get` method shall be: `bmw::Result<MethodReturnTypePtr<SampleDataType>> Get()`."""
Copy link
Member Author

Choose a reason for hiding this comment

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

Suggested change
description=""" The signature of the `Get` method shall be: `bmw::Result<MethodReturnTypePtr<SampleDataType>> Get()`."""
description=""" The signature of the `Get` method shall be: `score::Result<MethodReturnTypePtr<SampleDataType>> Get()`."""

derived_from = [Communication.Field@1]
version = 1

}


ScoreReq.CompReq GetMethodReturnValue {
description="""It shall return the field value, which has been updated last by the provider in success case in the form of a `MethodReturnTypePtr` to the value."""
Copy link
Contributor

Choose a reason for hiding this comment

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

It shall return the provider's most recently updated field value as a MethodReturnTypePtr upon success.

derived_from = [Communication.Field@1, Communication.ProducerConsumerPattern@1]
version = 1

}

ScoreReq.CompReq SetMethodOnlyIfEnabledInInterfaceDefinition {
description="""It shall provide a public `Set` method only in the case, that "support for a Set()" has been enabled in the underlying interface definition (see [[FieldGetAndSetInterfaceDefinition]])."""
derived_from = [Communication.Field@1]
version = 1
}

ScoreReq.CompReq SetMethodSignature {
description=""" The signature of the `Set` method shall be: `bmw::Result<MethodReturnTypePtr<SampleDataType>> Set(MethodInArgPtr<SampleDataType>)`"""
Copy link
Member Author

Choose a reason for hiding this comment

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

Suggested change
description=""" The signature of the `Set` method shall be: `bmw::Result<MethodReturnTypePtr<SampleDataType>> Set(MethodInArgPtr<SampleDataType>)`"""
description=""" The signature of the `Set` method shall be: `score::Result<MethodReturnTypePtr<SampleDataType>> Set(MethodInArgPtr<SampleDataType>)`"""

derived_from = [Communication.Field@1]
version = 1
}

ScoreReq.CompReq SetMethodReturnValue {
description="""`Set` method shall return the field value, which has been updated last by the provider in success case in the form of a MethodReturnTypePtr to the value."""
Copy link
Contributor

Choose a reason for hiding this comment

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

The Set method shall return the provider’s latest updated field value as a MethodReturnTypePtr on success

derived_from = [Communication.Field@1, Communication.ProducerConsumerPattern@1]
version = 1
}

ScoreReq.CompReq AllocateMethodForZeroCopySet {
description="""It shall provide a `Allocate()` method for the zero-copy Set call variant."""
derived_from = [Communication.Field@1, Communication.ZeroCopy@1]
version = 1
}

ScoreReq.CompReq AllocateMethodSignature {
description="""The signature of the `Allocate()` method shall be: `bmw::Result<impl::MethodInArgPtr<SampleDataType>> Allocate()`."""
Copy link
Member Author

Choose a reason for hiding this comment

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

Suggested change
description="""The signature of the `Allocate()` method shall be: `bmw::Result<impl::MethodInArgPtr<SampleDataType>> Allocate()`."""
description="""The signature of the `Allocate()` method shall be: `score::Result<impl::MethodInArgPtr<SampleDataType>> Allocate()`."""

derived_from = [Communication.Field@1, Communication.ZeroCopy@1]
version = 1
}


ScoreReq.CompReq ZeroCopySetMethodOnlyIfEnabledInInterfaceDefinition {
description="""It shall provide a public `Set` method with zero copy semantics only in the case, that "support for a Set()" has been enabled in the underlying interface definition (see [[FieldGetAndSetInterfaceDefinition]])."""
derived_from = [Communication.Field@1, Communication.ZeroCopy@1]
version = 1
}

ScoreReq.CompReq ZeroCopySetMethodSignature {
description="""The signature of the `Set` method shall be: `bmw::Result<MethodReturnTypePtr<SampleDataType>> Set(MethodInArgPtr<SampleDataType>)`"""
Copy link
Member Author

Choose a reason for hiding this comment

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

Suggested change
description="""The signature of the `Set` method shall be: `bmw::Result<MethodReturnTypePtr<SampleDataType>> Set(MethodInArgPtr<SampleDataType>)`"""
description="""The signature of the `Set` method shall be: `score::Result<MethodReturnTypePtr<SampleDataType>> Set(MethodInArgPtr<SampleDataType>)`"""

derived_from = [Communication.Field@1, Communication.ZeroCopy@1]
version = 1
}

}

section "Field_member_representation_at_the_Skeleton_side" {

ScoreReq.CompReq RegisterGetHandlerOnlyIfEnabledInInterfaceDefinition {
description="""It shall provide a public `RegisterGetHandler` method only in the case, that 'support for a Get()' has been enabled in the underlying interface definition (see [[FieldGetAndSetInterfaceDefinition]])"""
Copy link
Contributor

Choose a reason for hiding this comment

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

As of the last sync, LoLa handles Get functionality internally.
On a Get call from a proxy, Skeleton returns the latest sample. Has this approach changed?
If not, a public RegisterGetHandler is unnecessary.

derived_from = [Communication.Field@1]
version = 1

}

ScoreReq.CompReq RegisterSetHandlerOnlyIfEnabledInInterfaceDefinition {
description="""It shall provide a public `RegisterSetHandler` method only in the case, that "support for a Set()" has been enabled in the underlying interface definition (see [[FieldGetAndSetInterfaceDefinition]])"""
derived_from = [Communication.Field@1]
version = 1
}


ScoreReq.CompReq RegisterGetHandlerSignature {
description=""" The signature of the `RegisterGetHandler` method shall be: `bmw::ResultBlank RegisterGetHandler(GetHandlerType)`"""
Copy link
Member Author

Choose a reason for hiding this comment

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

Suggested change
description=""" The signature of the `RegisterGetHandler` method shall be: `bmw::ResultBlank RegisterGetHandler(GetHandlerType)`"""
description=""" The signature of the `RegisterGetHandler` method shall be: `score::ResultBlank RegisterGetHandler(GetHandlerType)`"""

Copy link
Contributor

Choose a reason for hiding this comment

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

In my view, the requirement for RegisterGetHandler on the Skeleton side is not needed. The RegisterGetHandler function will not be exposed to the user, as it is managed internally by LoLa. Therefore, it should be considered an implementation detail.

derived_from = [Communication.Field@1]
version = 1

}

ScoreReq.CompReq RegisterSetHandlerSignature {
description=""" The signature of the `RegisterSetHandler` method shall be: `bmw::ResultBlank RegisterSetHandler(SetHandlerType)`"""
Copy link
Member Author

Choose a reason for hiding this comment

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

Suggested change
description=""" The signature of the `RegisterSetHandler` method shall be: `bmw::ResultBlank RegisterSetHandler(SetHandlerType)`"""
description=""" The signature of the `RegisterSetHandler` method shall be: `score::ResultBlank RegisterSetHandler(SetHandlerType)`"""

derived_from = [Communication.Field@1]
version = 1
}

ScoreReq.CompReq SetHandlerTypeDefinition {
description="""The `SetHandlerType` shall be a callable of this type: using SetHandlerType = amp::callback<void(SampleDataType&)>;`"""
derived_from = [Communication.Field@1]
version = 1
}

ScoreReq.CompReq SetHandlerTypeDefinition {
description="""It is mandatory to register a `SetHandler` for a `SkeletonField` instance. If the user has not registered a handler before calling `Offer()` on the enclosing skeleton, the call to `Offer()` shall fail with an error."""
Copy link
Contributor

Choose a reason for hiding this comment

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

only if Set is enabled in the interface Definition. right?

derived_from = [Communication.Field@1, Communication.ServiceInstance@1]
version = 1
}


ScoreReq.CompReq SetHandlerTypeDefinition {
description="""After the user provided `SetHandler` has returned, the (potentially updated) field value has to:
- be stored as the latest value.
- if enabled, notifier for the updated value has to be called to inform subscribers of the field about the updated value.
Copy link
Contributor

Choose a reason for hiding this comment

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

what does if enable means?
where is it enabled?

what if the value is not changed?

- be returned as the result of the `get()` method call to the proxy side."""
derived_from = [Communication.Field@1, Communication.ProducerConsumerPattern@1]
version = 1
}

}

}

Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,13 @@ ScoreReq.FeatReq Method {
version = 1
}

ScoreReq.FeatReq Field {
description = "A field is part of a communication interface and has a name and a data type, as wall as special getter and setter methods. The producer can assign a value to it. Consumers can subscribe to value-changed fields of the element or poll unseen, cached fields. Consumers can also retrieve the current value of the field through its getter or set a new value to it through the setter method."
Copy link
Contributor

Choose a reason for hiding this comment

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

A field is a component of a communication interface and is defined by a name and a data type, along with dedicated getter and setter methods. The producer has the ability to assign a value to the field. Consumers can either subscribe to receive notifications when the field’s value changes or poll the cached values of fields that have not yet been seen. Additionally, consumers can retrieve the current value of the field using the getter method or update the field’s value through the setter method.

safety = ScoreReq.Asil.B
derived_from = [ AssumedSystemRequirements.InterProcessCommunication@1, AssumedSystemRequirements.SupportForRequestDrivenArchitecture@1, AssumedSystemRequirements.SafeCommunication@1 ]
version = 1
}

ScoreReq.FeatReq Signal {
description = "A signal is part of a communication interface and has a name. A client can trigger the signal. The service instance offering the trigger can wait for the signal to be triggered or check if the signal was triggered. Signals can not transport data."
safety = ScoreReq.Asil.QM
Expand Down
Loading