ao_monitoring

Active object sampling sensors and emitting validated measurement events.

Inherited Component

Inherited Requirements

Relationship Diagram

UML class diagram for ao_monitoring

SW Unit Relations

Outgoing Relations

Relation

UML Type

Visibility

Target Unit

Description

SWR-017

dependency

private

hal_event_adapter

Monitoring consumes hardware-adapted sensor events.

SWR-021

association

public

ao_control

Monitoring publishes validated sensor snapshots to control for decision logic.

SWR-022

association

public

ao_safety

Monitoring publishes validated sensor snapshots to safety for protective evaluation.

Incoming Relations

Relation

UML Type

Visibility

Source Unit

Description

SWR-007

dependency

public

ao_runtime_supervisor

Runtime supervisor dispatches monitoring events.

Data Types

ao_monitoring_contextstruct

Internal runtime context for ao_monitoring.

Struct Members

Name

Type

Description

sample_period_ms

uint32_t

Sampling period.

last_sample_tick

uint32_t

Last sampling tick.

rpm_sampling_enabled

bool

RPM sampling enable state.

bounds_valid

bool

Last bounds validation result.

ao_monitoring_eventstruct

Event payload handled by ao_monitoring.

Struct Members

Name

Type

Description

signal_id

uint16_t

Monitoring event signal id.

temperature_c

int16_t

Measured temperature.

supply_voltage_mv

uint16_t

Measured supply voltage.

fan_rpm

uint16_t

Measured fan speed.

ao_monitoring_resultenum

Result code for ao_monitoring operations.

Enum Members

Name

Value

Description

OK

0

Monitoring snapshot published.

SENSOR_RANGE_ERROR

1

Sample out of bounds.

HAL_DATA_MISSING

2

Required HAL data unavailable.

Attributes

Attribute

Type

Visibility

Description

ctx

ao_monitoring_context

private

Runtime context for ao_monitoring state timing and error tracking.

Methods

dispatch

  • Return Type: ao_monitoring_result

  • Visibility: public

  • Description: Process one ao_monitoring event and update runtime outputs.

Parameters

Name

Type

Direction

Description

event

ao_monitoring_event

in

Process one ao_monitoring event and update runtime outputs.

init

  • Return Type: ao_monitoring_result

  • Visibility: public

  • Description: Initialize ao_monitoring runtime state and dependencies.

Dynamic Behaviour

Activity Diagrams

ao_monitoring_activity

@startuml
start
:Trigger periodic sampling;
:Read temperature;
:Read supply voltage;
if (fan command ON?) then (yes)
  :Read fan RPM;
endif
:Validate physical bounds;
if (any value invalid?) then (yes)
  :Set validity flags false;
else (no)
  :Set validity flags true;
endif
:Publish IF_SensorSnapshot;
stop
@enduml

This activity diagram defines ao_monitoring control flow for one acquisition cycle including trigger source conditional RPM acquisition physical range validation and IF SensorSnapshot publication with validity flags used by downstream control and safety logic.

Timing Diagrams

ao_monitoring_timing

@startuml
robust "ao_monitoring" as MON
scale max 1200 width
concise "500ms scheduler" as S

@0
S is tick
MON is sample_temp

@120
MON is sample_voltage

@250
MON is sample_rpm_if_needed

@380
MON is validate

@500
MON is publish_snapshot
S is tick

@enduml

This timing diagram decomposes the 500 ms monitoring cadence into sensor read stages validation and publish phase so requirement conformance can be checked against worst case execution and scheduling jitter.

Sequence Diagrams

SEQ-001_Runtime_Event_Orchestration

@startuml

hide footbox
title Runtime Event Orchestration

participant ao_runtime_supervisor
participant evt_timer_service
participant evt_dispatcher
participant ao_monitoring
participant ao_control
participant ao_safety
participant ao_diagnostics
participant ao_modbus_server

ao_runtime_supervisor -> evt_timer_service : init periodic tick
ao_runtime_supervisor -> evt_dispatcher : init event loop
loop each scheduler tick
  evt_timer_service -> ao_runtime_supervisor : tick event
  ao_runtime_supervisor -> evt_dispatcher : dispatch cycle
  evt_dispatcher -> ao_monitoring : monitor_event
  evt_dispatcher -> ao_control : control_event
  evt_dispatcher -> ao_safety : safety_event
  evt_dispatcher -> ao_diagnostics : diagnostics_event
  evt_dispatcher -> ao_modbus_server : comms_event
end

@enduml

Primary runtime interoperability sequence showing scheduler tick propagation through dispatcher fan-out and deterministic active-object processing order across monitoring control safety diagnostics and communication units.

SEQ-005_Startup_To_Ready

@startuml
hide footbox
participant ao_runtime_supervisor
participant evt_timer_service
participant evt_dispatcher
participant ao_monitoring
participant ao_control
participant ao_safety
participant ao_diagnostics
participant ao_modbus_server

ao_runtime_supervisor -> evt_timer_service : init()
ao_runtime_supervisor -> evt_dispatcher : init()
ao_runtime_supervisor -> ao_monitoring : init()
ao_runtime_supervisor -> ao_control : init()
ao_runtime_supervisor -> ao_safety : init()
ao_runtime_supervisor -> ao_diagnostics : init()
ao_runtime_supervisor -> ao_modbus_server : init()

group readiness gates
  evt_timer_service --> ao_runtime_supervisor : EVT_TIMER_READY
  evt_dispatcher --> ao_runtime_supervisor : EVT_DISPATCH_READY
  ao_monitoring --> ao_runtime_supervisor : EVT_AO_READY
  ao_control --> ao_runtime_supervisor : EVT_AO_READY
  ao_safety --> ao_runtime_supervisor : EVT_AO_READY
  ao_diagnostics --> ao_runtime_supervisor : EVT_AO_READY
  ao_modbus_server --> ao_runtime_supervisor : EVT_AO_READY
end

ao_runtime_supervisor -> evt_dispatcher : EVT_INIT_OK / start Run
@enduml

Startup lifecycle sequence with explicit readiness gates before entering Run state.