Attribute Access

This functionality enables proxies to read (get) and receive attribute notifications. Attributes (also called “fields”) behave like both methods (getter/setter operations) and events (notification delivery). The skeleton stores the attribute value and can notify client proxies when the application emits an attribute notification.

Static View

The following software units are involved in attribute access:

  • Transceiver Unit (Proxy side): Manages attribute get requests and receive-handler registration (see Proxy/Skeleton Base for its class diagram)

  • Transceiver Unit (Skeleton side): Stores attribute values and emits attribute notifications (see Proxy/Skeleton Base)

  • Request/Response Unit: Handles asynchronous getter responses (see Request/Response for its class diagram)

  • Cluster Connection Unit: Routes attribute requests and notifications between clusters

  • Message Queue Unit: Delivers attribute messages between participating clusters

' *******************************************************************************
' Copyright (c) 2026 BMW AG
'
' 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
' *******************************************************************************

@startuml

left to right direction
skinparam linetype ortho

package "Proxy Side" as attribute_access_proxy_side {
  component "Proxy/Skeleton Base" as attribute_access_proxy_skeleton_base
  component "Request/Response" as attribute_access_request_response
  component "Cluster Connection" as attribute_access_cluster_connection
}

component "Message Queue" as attribute_access_message_queue

attribute_access_proxy_skeleton_base --> attribute_access_request_response
attribute_access_proxy_skeleton_base --> attribute_access_cluster_connection
attribute_access_cluster_connection --> attribute_access_message_queue
attribute_access_cluster_connection --> attribute_access_proxy_skeleton_base

@enduml

Attribute access component view

Notes:

  • ProxyAttribute<T> provides a get(callback) method that sends a get request and keeps the callback until the getter response arrives.

  • SkeletonAttribute<T> stores the attribute value.

  • Getter responses use the Future mechanism (like method calls).

  • Change notifications use the event broadcast mechanism.

  • Attributes can have decorators based on the interface definition:

    • Default (no decorators) — setter, getter and event subscriptions allowed

    • readonly — getter and event subscriptions allowed

    • noSubscriptions — setter and getter allowed

    • readonly / noSubscriptions — getter allowed

Dynamic View

The dynamic view illustrates two attribute access patterns: asynchronous get and attribute notification.

Getter

' *******************************************************************************
' Copyright (c) 2026 BMW AG
'
' 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
' *******************************************************************************

@startuml

hide footbox

actor "Generated\nProxy" as generated_proxy
participant "Proxy/Skeleton Base" as proxy_skeleton_base_unit
participant "Request/Response" as request_response_unit
participant "Cluster Connection" as cluster_connection_unit
participant "Message Queue" as message_queue_unit
actor "Generated\nSkeleton" as generated_skeleton

activate proxy_skeleton_base_unit
activate request_response_unit

generated_proxy -> proxy_skeleton_base_unit : get(callback)
proxy_skeleton_base_unit -> request_response_unit : obtainRequestId(callback)
request_response_unit --> proxy_skeleton_base_unit : uint16_t
proxy_skeleton_base_unit -> cluster_connection_unit : sendMessage(GET_ATTRIBUTE)
activate cluster_connection_unit
cluster_connection_unit -> message_queue_unit : push(msg)
activate message_queue_unit
message_queue_unit --> cluster_connection_unit : success
deactivate message_queue_unit
cluster_connection_unit --> proxy_skeleton_base_unit : HRESULT::Ok
deactivate cluster_connection_unit

note over request_response_unit : Request id returned and callback registered.

note over proxy_skeleton_base_unit
  Skeleton side resolves the getter and prepares the response.
end note

cluster_connection_unit -> message_queue_unit : pop()
activate cluster_connection_unit
activate message_queue_unit
message_queue_unit --> cluster_connection_unit : msg
deactivate message_queue_unit
cluster_connection_unit -> proxy_skeleton_base_unit : dispatchMessage(msg)
proxy_skeleton_base_unit -> generated_skeleton : get<attribute>Attribute(response)
generated_skeleton -> generated_skeleton : read current attribute value
generated_skeleton --> proxy_skeleton_base_unit : respondGet<attribute>Attribute(response, attributeValue)
proxy_skeleton_base_unit -> cluster_connection_unit : sendMessage(GETTER_RESPONSE)
cluster_connection_unit -> message_queue_unit : push(response_msg)
activate message_queue_unit
message_queue_unit --> cluster_connection_unit : success
deactivate message_queue_unit
cluster_connection_unit --> proxy_skeleton_base_unit : HRESULT::Ok
deactivate cluster_connection_unit

note over proxy_skeleton_base_unit
  Proxy side receives the getter response and completes the pending future.
end note

cluster_connection_unit -> message_queue_unit : pop()
activate cluster_connection_unit
activate message_queue_unit
message_queue_unit --> cluster_connection_unit : response_msg
deactivate message_queue_unit
cluster_connection_unit -> proxy_skeleton_base_unit : onNewMessageReceived(response_msg)
proxy_skeleton_base_unit -> request_response_unit : answerRequest(msg)
request_response_unit -> request_response_unit : invoke callback
request_response_unit -> generated_proxy : callback(attributeValue)

note over request_response_unit : Application is notified via callback.

deactivate cluster_connection_unit
deactivate request_response_unit
deactivate proxy_skeleton_base_unit

@enduml

Attribute getter sequence

Change Notification

' *******************************************************************************
' Copyright (c) 2026 BMW AG
'
' 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
' *******************************************************************************

@startuml

hide footbox

actor "Generated\nSkeleton" as generated_skeleton
participant "Proxy/Skeleton Base" as proxy_skeleton_base_unit
participant "Cluster Connection" as cluster_connection_unit
participant "Message Queue" as message_queue_unit
actor "Generated\nProxy" as generated_proxy

activate proxy_skeleton_base_unit

generated_skeleton -> proxy_skeleton_base_unit : send(newValue)
proxy_skeleton_base_unit -> proxy_skeleton_base_unit : set(newValue)
proxy_skeleton_base_unit -> cluster_connection_unit : sendMessage(FIELD_NOTIFICATION)
activate cluster_connection_unit
cluster_connection_unit -> message_queue_unit : push(notification_msg)
activate message_queue_unit
message_queue_unit --> cluster_connection_unit : success
deactivate message_queue_unit
cluster_connection_unit --> proxy_skeleton_base_unit : HRESULT::Ok
deactivate cluster_connection_unit

note over proxy_skeleton_base_unit : All subscribed proxies are notified.

note over proxy_skeleton_base_unit
  Proxy side dispatches the field change to the registered callback.
end note

cluster_connection_unit -> message_queue_unit : pop()
activate cluster_connection_unit
activate message_queue_unit
message_queue_unit --> cluster_connection_unit : notification_msg
deactivate message_queue_unit
cluster_connection_unit -> proxy_skeleton_base_unit : dispatchMessage(notification_msg)
proxy_skeleton_base_unit -> proxy_skeleton_base_unit : onFieldChanged(newValue)
proxy_skeleton_base_unit -> generated_proxy : invoke callback(newValue)

note over generated_proxy : Application is notified of the attribute change.

deactivate cluster_connection_unit
deactivate proxy_skeleton_base_unit

@enduml

Attribute change notification sequence

Notes:

  • The skeleton can update attribute values at any time using attribute.set(newValue).

  • The application explicitly sends attribute notifications through the generated attribute send() operation. Updating the local value alone does not notify subscribed proxies.

  • Proxies must call attribute.setReceiveHandler(callback) to receive attribute notifications.

  • The proxy callback is invoked when the notification message is processed.