ao_status_indication
====================
Active object translating status and fault events into LED command events.
Inherited Component
-------------------
- :doc:`Status_Indication_Manager `
Inherited Requirements
----------------------
- :doc:`REQ-IFC-005 `
- :doc:`REQ-DIA-003 `
Relationship Diagram
--------------------
.. image:: /_static/sw_unit_uml/ao_status_indication_2f37d667-1c29-4f37-b12f-138196fec6b0_uml.svg
:alt: UML class diagram for ao_status_indication
:class: dblclick-open-image
SW Unit Relations
-----------------
Outgoing Relations
~~~~~~~~~~~~~~~~~~
.. list-table::
:header-rows: 1
* - Relation
- UML Type
- Visibility
- Target Unit
- Description
* - :doc:`SWR-006 `
- composition
- private
- :doc:`sm_led_indication `
- Status indication active object embeds LED indication state machine.
* - :doc:`SWR-016 `
- dependency
- public
- :doc:`drv_rgb_led `
- Status indication commands LED driver outputs.
Incoming Relations
~~~~~~~~~~~~~~~~~~
.. list-table::
:header-rows: 1
* - Relation
- UML Type
- Visibility
- Source Unit
- Description
* - :doc:`SWR-015 `
- association
- public
- :doc:`ao_diagnostics `
- Diagnostics publishes status events to indication.
Data Types
----------
.. _dt-7df91ba6-1a4f-4df9-a18b-79f13cfec6f3:
.. raw:: html
ao_status_indication_contextstruct
Internal runtime context for ao_status_indication.
.. rubric:: Struct Members
.. list-table::
:header-rows: 1
* - Name
- Type
- Description
* - indication_state
- :ref:`uint8_t `
- Indication state.
* - active_led_pattern
- :ref:`uint8_t `
- Current LED pattern code.
* - blink_enabled
- :ref:`bool `
- Blink mode state.
* - last_command_tick
- :ref:`uint32_t `
- Last LED command tick.
.. _dt-80016feb-8538-4001-a4f9-40b5092c0ea8:
.. raw:: html
ao_status_indication_eventstruct
Event payload handled by ao_status_indication.
.. rubric:: Struct Members
.. list-table::
:header-rows: 1
* - Name
- Type
- Description
* - signal_id
- :ref:`uint16_t `
- Status indication event id.
* - operating_mode
- :ref:`uint8_t `
- Operating mode input.
* - warning_active
- :ref:`bool `
- Warning input.
* - fault_active
- :ref:`bool `
- Fault input.
.. _dt-10119d1d-ba8a-4011-a877-7e9a8537ea68:
.. raw:: html
ao_status_indication_resultenum
Result code for ao_status_indication operations.
.. rubric:: Enum Members
.. list-table::
:header-rows: 1
* - Name
- Value
- Description
* - OK
- 0
- LED command produced.
* - PATTERN_CHANGED
- 1
- Pattern changed due to status transition.
* - OUTPUT_SUPPRESSED
- 2
- Indication output suppressed by policy.
Attributes
----------
.. list-table::
:header-rows: 1
* - Attribute
- Type
- Visibility
- Description
* - ctx
- :ref:`ao_status_indication_context `
- private
- Runtime context for ao_status_indication state timing and error tracking.
Methods
-------
dispatch
~~~~~~~~
- **Return Type:** :ref:`ao_status_indication_result `
- **Visibility:** public
- **Description:** Process one ao_status_indication event and update runtime outputs.
.. rubric:: Parameters
.. list-table::
:header-rows: 1
* - Name
- Type
- Direction
- Description
* - event
- :ref:`ao_status_indication_event `
- in
- Process one ao_status_indication event and update runtime outputs.
init
~~~~
- **Return Type:** :ref:`ao_status_indication_result `
- **Visibility:** public
- **Description:** Initialize ao_status_indication runtime state and dependencies.
Dynamic Behaviour
-----------------
Activity Diagrams
~~~~~~~~~~~~~~~~~
ao_status_indication_activity
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. uml::
@startuml
start
:Receive IF_OperatingStatus and IF_FaultEvent;
if (fault active?) then (yes)
:Select LED fault indication;
elseif (protective?) then (yes)
:Select LED protective indication;
elseif (warning?) then (yes)
:Select LED warning indication;
else (no)
:Select LED normal indication;
endif
:Dispatch sm_led_indication event;
:Publish IF_StatusLedCommand;
stop
@enduml
This activity diagram explains how ao_status_indication resolves status and fault context into a single prioritized LED intent and dispatches indication events that preserve consistent user visible system state.
Timing Diagrams
~~~~~~~~~~~~~~~
ao_status_indication_timing
^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. uml::
@startuml
robust "ao_status_indication" as IND
scale max 1200 width
concise "status event" as S
@0
S is rx
IND is evaluate_priority
@80
IND is select_pattern
@150
IND is command_ready
@220
IND is published
@enduml
This timing diagram captures indication decision latency from status intake to LED command publication and supports end to end response analysis for user visible fault and warning signaling.
Sequence Diagrams
~~~~~~~~~~~~~~~~~
SEQ-003_Status_To_LED_Indication
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. uml::
@startuml
hide footbox
title Diagnostic Status To LED Indication
participant ao_diagnostics
participant ao_status_indication
participant sm_led_indication
participant drv_rgb_led
ao_diagnostics -> ao_status_indication : IF_OperatingStatus(system_status)
ao_status_indication -> sm_led_indication : evaluate indication pattern
sm_led_indication -> ao_status_indication : resolved LED intent
ao_status_indication -> drv_rgb_led : IF_StatusLedCommand(led_command)
@enduml
Diagnostics status outputs are transformed by status indication logic into concrete LED driver commands.