fprime/Svc/Health/Health.fpp
Rob Bocchino 02a351c600
FPP v2.3.0a1 (#3066)
* Update requirements to use new fpp version

* Removed unneeded files

* update FppTest for new autocoder changes

* Get unit tests updated and working for fpp state machines phase 1 delivery

* Rename Fw/SMTest to Fw/Sm

* Update STARS to use FW_ASSERT

* Rename SMSignalBuffer to SmSignalBuffer

* Fix spelling issues with CI

* Update requirements to the FPP alpha release v2.2.0a3

* Fix requirements.txt

* Fix requirements.txt

* Initialize data in the constructor of SmSignalBuffer

* Add constructor list to all the constructors in SmSignalBuffer

* Reorganize FppTest directories

Move external state machine tests to state_machine/external

* Add missing file

* Reorganize FppTest/state_machine

external --> external_instance

* Add state machine test harness

* Revise SmGuard

* Fix include guard

* Add header file for test harness

* Revise Basic state machine

* Revise Basic test

* Add Junction test

* Add missing file

* Refactor internal state machine tests

* Add Nested state machine

* Revise Nested test

* Revise state machine tests

* Fix issues in string utils

* Revise FppTest

Add signals to state machine tests

* Refactor state machine test harness

* Revise autocode for Basic test

Replace with actual autocode

* Update fpp version

Fix F Prime to match
Switch initial/basic test from checked-in to auto-generated

* Revise FppTest

Make state machine guards const

* Update fpp version

Convert initial/Junction test to autocode

* Update fpp version

Make initial/nested test use autocode

* Start to add State/Basic test

* Revise FppTest

Revise namespaces in state machine tests

* Revise SmState::Basic test

* Update fpp version

Convert SmState/Basic test to use autocoding

* Update FppTest

* Add SmState/BasicSelf test

* Add state/BasicGuard test

* Add SmState/BasicU32 test

* Revise state machine tests

* Refactor state machine tests

* Revise FppTest

* Revise comments

* Refactor state machine tests

* Refactor state machine tests

* Refactor state machine tests

* Refactor state machine tests

* Revise state machine tests

* Revise state machine tests

* Revise state machine tests

* Revise state machine tests

* Revise fpp tests

* Revise state machine tests

* Revise state machine tests

* Revise state machine tests

* Revise state machine tests

* Revise state machine tests

* Add README files to FPP tests

* Start to add StateToState test

* Revise StateToState test

* Revise StateToState test

* Revise StateToState test

* Revise StateToState test

* Revise StateToState test

Remove hand-generated files

* Revise StateToState tests

* Add BasicInternal test

* Update fpp version

* Revise state machine tests

* Add state-to-junction test

* Add Internal state machine test

* Add Polymorphism test

* Add StateToChild test

* Revise README files

* Add junction/Basic test

* Revise FppTest build

* Update fpp version; revise Basic test

* Revise junction tests

* Add BasicGuardU32 test

* Add BasicGuardString test

* Add BasicGuardTestAbsType test

* Add BasicGuardTestArray test

* Add BasicGuardTestEnum test

* Add BasicGuardTestStruct test

* Add junction/Sequence test

* Add junction/SequenceU32 test

* Add junction/InputPairU16U32 test

* Add JunctionToState.fpp

* Add junction/JunctionToState test

* Add junction/JunctionToJunction test

* Update fpp version

* Update fpp version

Revise test code to match

* Update fpp version

* Update fpp version

* Fix CMakeLists

* Update fpp version

* Update fpp version

* Refactor sm tests

* Refactor sm tests

* Refactor sm tests

* Update fpp version

* Start to add internal_instance tests

* Add missing files

* Revise state machine tests

* Revise state machine tests

* Revise sm instance initial tests

* Revise sm instance init tests

* Revise sm instance initial tests

* Revise sm instance initial tests

* Add sm instance state tests

* Revise sm instance state tests

* Revise sm instance state tests

* Revise sm instance state tests

* Revise sm instance state tests

* Revise internal instance state tests

* Revise sm instance state tests

* Revise sm instance state tests

* Revsie BasicGuardTestAbsType

* Revise sm instance state tests

* Revise BasicGuardTestAbsType

* Add BasicGuardTestArray

* Add BasicGuardTestEnum

* Add BasicGuardTestStruct

* Add BasicGuardU32

* Add BasicInternal

* Revise BasicInternal

* Add BasicSelf

* Reformat code

* Add BasicString test

* Add BasicTestAbsType

* Add BasicTestArray

* Add BasicTestEnum

* Add BasicTestStruct

* Add BasicU32

* Remove extraneous file

* Remove extraneous files

* Revise sm tests

* Revise state machine tests

* Add Internal test

* Add Polymorphism test

* Add StateToChild test

* Add StateToJunction test

* Add StateToSelf test

* Add StateToState test

* Add junction/Basic

* Add BasicU32 test

* Add InputPairU16U32

* Add JunctionToJunction

* Revise comments

* Add JunctionToState

* Revise JunctionToState

* Revise JunctionToJunction

* Add Sequence test

* Add Sequence test

* Revise SequenceU32 test

* Revise state machine tests

Add tests for queued components

* Revise Basic test

Add schedIn handler

* Revise junction/Basic test

Add schedIn handler

* Revise state/Basic test

Add schedIn handler

* Revise initial/Basic test

Add multiple instances of the same state machine

* Revise state/Basic test

Add multiple instances of the same state machine

* Reformat code

* Update fpp version

* Update fpp; revise FppTest

* Refactor internal/initial tests

* Revise state machine tests

* Revise internal/state tests

* Revise state-machine/internal tests

Rename junction to choice

* Revise state-machine/internal tests

* Reformat C++ files

* Revise state-machine/internal_instance/initial tests

* Revise internal_instance/state tests

* Format code

* Revise internal_instance/choice tests

* Update fpp version

* Format code

* Update fpp version

* Improve const correctness in Fw/Port

* Update design

* Revise state machines design

* Revise state machine design

* Revise state machine design

* Revise state machine design

* Revise state machine design

* Revise state machines design

* Revise state machines design

* Revise state machines design

* Revise state machines design

* Revise state machines design

* Revise state machines design

* Revise state machines design

* Revise state machines design

* Revise state machines design

* Revise state machines design

* Revise state machines design

* Revise state machines design

* Revise state machines design

* Revise state machines design

* Revise state machines design

* Revise state machines design

* Revise state machines design

* Revise state machines design

* Revise state machines design

* Revise state machines design

* Revise state machines design

* Revise state machines design

* Revise state machines design

* Revise state machines design

* Revise state machines design

* Revise state machines design

* Revise state machines design

* Revise state machines design

* Revise state machine instances design

* Revise state machines design

* Revise state machines design

* Revise state machines design

* Update fpp version

* Update fpp version; revise code to match

* Update fpp version

* Revise state machines design

* Revise state machines design

Add class diagram

* Revise state machines design

* Revise state machines design

* Revise typography

Close up spaces in names with embedded variables

* Revise state machines design

* Revise state machines design

* Revise state machines design

* Revise state machine unit tests

* Revise state machine tests

Increase code coverage

* Revise state machine tests

Increase code coverage

* Update fpp version

* Update spelling

* Remove Design directory

This directory no longer exists in fprime/devel

* Update mkdocs

---------

Co-authored-by: watney <garth.j.watney@jpl.nasa.gov>
Co-authored-by: garthwatney <160269551+garthwatney@users.noreply.github.com>
Co-authored-by: M Starch <LeStarch@googlemail.com>
2025-01-06 14:58:54 -08:00

163 lines
5.4 KiB
Fortran

module Svc {
@ A component for checking the health of active components
queued component Health {
# ----------------------------------------------------------------------
# General ports
# ----------------------------------------------------------------------
@ Ping output port
output port PingSend: [HealthPingPorts] Svc.Ping
@ Ping return port
async input port PingReturn: [HealthPingPorts] Svc.Ping
@ Run port
sync input port Run: Svc.Sched
@ Run port
output port WdogStroke: Svc.WatchDog
# ----------------------------------------------------------------------
# Port matching specifiers
# ----------------------------------------------------------------------
match PingSend with PingReturn
# ----------------------------------------------------------------------
# Special ports
# ----------------------------------------------------------------------
@ Command receive port
command recv port CmdDisp
@ Command registration port
command reg port CmdReg
@ Command response port
command resp port CmdStatus
@ Event port
event port Log
@ Text event port
text event port LogText
@ Time get port
time get port Time
@ Telemetry port
telemetry port Tlm
# ----------------------------------------------------------------------
# Commands
# ----------------------------------------------------------------------
@ A command to enable or disable health checks
async command HLTH_ENABLE(
enable: Fw.Enabled @< whether or not health checks are enabled
) \
opcode 0x0
@ Ignore a particular ping entry
async command HLTH_PING_ENABLE(
$entry: string size 40 @< The entry to enable/disable
enable: Fw.Enabled @< whether or not a port is pinged
) \
opcode 0x1
@ Change ping value
async command HLTH_CHNG_PING(
$entry: string size 40 @< The entry to modify
warningValue: U32 @< Ping warning threshold
fatalValue: U32 @< Ping fatal threshold
) \
opcode 0x2
# ----------------------------------------------------------------------
# Events
# ----------------------------------------------------------------------
@ Warn that a ping target is longer than the warning value
event HLTH_PING_WARN(
$entry: string size 40 @< The entry passing the warning level
) \
severity warning high \
id 0x0 \
format "Ping entry {} late warning"
@ Declare FATAL since task is no longer responding
event HLTH_PING_LATE(
$entry: string size 40 @< The entry passing the warning level
) \
severity fatal \
id 0x1 \
format "Ping entry {} did not respond"
@ Declare FATAL since task is no longer responding
event HLTH_PING_WRONG_KEY(
$entry: string size 40 @< The entry passing the warning level
badKey: U32 @< The incorrect key value
) \
severity fatal \
id 0x2 \
format "Ping entry {} responded with wrong key 0x{x}"
@ Report checking turned on or off
event HLTH_CHECK_ENABLE(
enabled: Fw.Enabled @< If health checking is enabled
) \
severity activity high \
id 0x3 \
format "Health checking set to {}"
@ Report a particular entry on or off
event HLTH_CHECK_PING(
enabled: Fw.Enabled @< If health pinging is enabled for a particular entry
$entry: string size 40 @< The entry passing the warning level
) \
severity activity high \
id 0x4 \
format "Health checking set to {} for {}"
@ Entry was not found
event HLTH_CHECK_LOOKUP_ERROR(
$entry: string size 40 @< The entry passing the warning level
) \
severity warning low \
id 0x5 \
format "Couldn't find entry {}"
@ Report changed ping
event HLTH_PING_UPDATED(
$entry: string size 40 @< The entry changed
warn: U32 @< The new warning value
$fatal: U32 @< The new FATAL value
) \
severity activity high \
id 0x6 \
format "Health ping for {} changed to WARN {} FATAL {}"
@ Report changed ping
event HLTH_PING_INVALID_VALUES(
$entry: string size 40 @< The entry changed
warn: U32 @< The new warning value
$fatal: U32 @< The new FATAL value
) \
severity warning high \
id 0x7 \
format "Health ping for {} invalid values: WARN {} FATAL {}"
# ----------------------------------------------------------------------
# Telemetry
# ----------------------------------------------------------------------
@ Number of overrun warnings
telemetry PingLateWarnings: U32 id 0x0
}
}