Diese Seite wurde vollständig KI-generiert auf Basis von SWS Firewall (R25-11) — kein offizieller AUTOSAR-Text und keine automatisch extrahierte API-Seite wie die übrigen Module. Als Interpretation gekennzeichnete Aussagen sind Schlussfolgerungen aus den Quellen.
[AP_SWS_Fw_82001] wording not yet imported · Header ara/fw/firewall_state.h
template <typename EnumT> class FirewallStateSwitchInterface final {...};
Interface to switch between firewall states, i.e. between different firewall filter-rule sets.
Header-Datei
#include "ara/fw/firewall_state.h"
Scope
namespace ara::fw
Port-Interface
FirewallStateSwitchInterface
User GuideAI-GENERATED
Enables asynchronous switching between different Firewall states and filter rule sets.
AI-GENERATEDunreviewedModel: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: 36188daebfa3ProvenanceOpen questions (2)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original
Enables asynchronous switching between different Firewall states and filter rule sets.
The template class ara::fw::FirewallStateSwitchInterface is used in AUTOSAR Adaptive to switch between different Firewall states and associated filter rule sets. Following thread-safe creation via a ara::core::InstanceSpecifier[AP_SWS_Fw_82002], the state switch is initiated asynchronously using SwitchFirewallState and monitored via a ara::core::Future<void>[AP_SWS_Fw_82008]. The class enforces pure move semantics without copy capability, where the destructor and move operations are not thread-safe and errors are signaled asynchronously via the future.
Context
The template class ara::fw::FirewallStateSwitchInterface serves within the functional cluster fw (Firewall) of the AUTOSAR Adaptive Platform as the primary interface for switching between different Firewall states. A Firewall state is understood to be a defined configuration of filter rule sets that secure network traffic. The template parameter EnumT represents an application-specific enumeration of all permitted Firewall states. Typical interaction partners are likely higher-level platform entities such as Mode Management, which adapt the filter rules to changed vehicle or operating modes. Question Q-5424cd3802d53915 (open)
Lifecycle
An instance is created explicitly via the constructor by specifying a ara::core::InstanceSpecifier[AP_SWS_Fw_82002]. This construction step is specified as thread-safe. The concrete mapping to a Firewall instance modeled in the platform manifest is presumably resolved via the InstanceSpecifier. Question Q-97db4416453c9885 (open)
The class is declared as final and implements pure move semantics: The copy constructor [AP_SWS_Fw_82004] and the copy assignment operator [AP_SWS_Fw_82005] are deleted (=delete), preventing duplication. Instead, move constructor [AP_SWS_Fw_82006] and move assignment operator [AP_SWS_Fw_82007] are provided, both defined as noexcept. Important for concurrency is that both the destructor [AP_SWS_Fw_82003] and the move operations are not thread-safe. The calling application must therefore ensure that lifecycle operations and ownership transfers run thread-locally or are synchronized.
Usage Path
The regular sequence for switching rule sets is divided into the following steps:
Initialization: The interface object is created specifying the target InstanceSpecifier[AP_SWS_Fw_82002].
Request state switch: The desired target state of type EnumT is passed via the method SwitchFirewallState[AP_SWS_Fw_82008].
Await asynchronous confirmation: The method returns a ara::core::Future<void>[AP_SWS_Fw_82008]. Callers can resolve the future in a blocking manner or monitor it asynchronously until the underlying rule set switch has been completed.
The method SwitchFirewallState is declared with noexcept and does not throw any C++ exceptions [AP_SWS_Fw_82008]. Errors during switching are encapsulated in the returned ara::core::Future<void>. The following error codes are specified for the call [AP_SWS_Fw_82008]:
FwErrc::kServiceNotAvailable: The responsible Firewall service is not available or does not respond [AP_SWS_Fw_82008].
FwErrc::kInvalidStateDependentFirewall: The requested state is invalid for the referenced Firewall or not provided in the configuration [AP_SWS_Fw_82008].
As a precondition for switching, the interface object must be validly instantiated and a connection to the Firewall service must exist. As a postcondition, the new filter rule set is active in the event of success, whereas in the event of an error, the previous state remains unchanged.
This class guide relies exclusively on the specification requirements of module fw of the AUTOSAR Adaptive Platform R25-11.
AI-GENERATEDunreviewedModel: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: 0a930dc12144ProvenanceOpen questions (1)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original
The function SwitchFirewallState of interface ara::fw::FirewallStateSwitchInterface serves to switch between Firewall states [AP_SWS_Fw_82008]. The declaration is available via the header ara/fw/firewall_state.h[AP_SWS_Fw_82008].
As a transfer value, the function expects the parameter firewallState of type EnumT, which specifies the desired target state of the Firewall [AP_SWS_Fw_82008]. The call is executed asynchronously and returns a ara::core::Future<void>, which the caller can use to synchronize or query the completion of the state transition [AP_SWS_Fw_82008]. The function is specified as noexcept and does not throw any C++ exceptions [AP_SWS_Fw_82008].
Possible error situations are defined by specific error codes [AP_SWS_Fw_82008]:
FwErrc::kServiceNotAvailable: Indicates that the Firewall service is not available.
FwErrc::kInvalidStateDependentFirewall: Signals that an invalid state-dependent Firewall is present.
Interpretation: These errors are presumably not thrown as exceptions, but provided via the resulting ara::core::Future<void>. Question Q-8baa266f2c17d200 (open)
This usage note was generated automatically by an AI based on the AUTOSAR Adaptive R25-11 specification.
gemini-3.8-flash-low· 2026-10-13 · German original