You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The StartupManager component manages boot counting, quiescence waiting periods, and automatic dispatch of startup sequences.
6
+
7
+
## Purpose
8
+
9
+
The StartupManager serves three primary functions:
10
+
1. Boot Counting: Tracks the number of system boots persistently across power cycles
11
+
2. Implements a configurable waiting period (default 45 minutes) before allowing full system startup, useful for missions requiring initial stabilization
12
+
3. Automatically dispatches and monitors the execution of startup command sequences
4
13
5
14
## Usage Examples
6
15
Add usage examples here
@@ -9,58 +18,100 @@ Add usage examples here
9
18
Add diagrams here
10
19
11
20
### Typical Usage
12
-
And the typical usage of the component here
13
21
14
-
## Class Diagram
15
-
Add a class diagram here
22
+
## How to Run
23
+
24
+
1. Uplink a sequence start file. we have one in TODO location
25
+
2. STARTUP_SEQUENCE_FILE_PRM_SET to the file you uplinked and STARTUP_SEQUENCE_FILE_PRM_SAVE
26
+
3. FileHandling.prmDb.PRM_SAVE_FILE
27
+
28
+
29
+
The StartupManager maintains internal state tracking its lifecycle:
30
+
31
+
| State | Description | Trigger |
32
+
|-------|-------------|---------|
33
+
|**Uninitialized**| Initial state before first `run` call. `m_boot_count == 0`| System initialization |
34
+
|**Initialized**| Boot count and quiescence start time have been loaded/set | First `run` call |
35
+
|**Waiting for Quiescence**|`m_waiting == true`, awaiting quiescence period expiration or disarm |`WAIT_FOR_QUIESCENCE` command received |
36
+
|**Running**| Normal operation, updating telemetry on each `run` call | Continuous after initialization |
37
+
38
+
**State Transitions:**
39
+
40
+
```
41
+
Uninitialized → Initialized (first run call)
42
+
Initialized → Waiting for Quiescence (WAIT_FOR_QUIESCENCE command)
43
+
Waiting for Quiescence → Running (quiescence period expires OR ARMED=false)
44
+
```
16
45
17
46
## Port Descriptions
18
-
| Name | Description |
19
-
|---|---|
20
-
|---|---|
47
+
48
+
| Port Name | Type | Direction | Description |
49
+
|-----------|------|-----------|-------------|
50
+
|`run`|`Svc.Sched`| Input (sync) | Scheduled execution port called by rate group. Manages boot initialization and quiescence monitoring |
51
+
|`runSequence`|`Svc.CmdSeqIn`| Output | Port for dispatching command sequences to the command sequencer |
52
+
|`completeSequence`|`Fw.CmdResponse`| Input (sync) | Receives completion status from the command sequencer after startup sequence execution |
21
53
22
54
## Component States
23
-
Add component states in the chart below
24
-
| Name | Description |
25
-
|---|---|
26
-
|---|---|
55
+
56
+
| State Variable | Type | Description |
57
+
|----------------|------|-------------|
58
+
|`m_boot_count`|`FwSizeType`| Current boot count. Zero indicates uninitialized state |
59
+
|`m_quiescence_start`|`Fw::Time`| Time when quiescence period started (mission epoch) |
60
+
|`m_waiting`|`std::atomic<bool>`| True when waiting for quiescence period to elapse |
61
+
|`m_stored_opcode`|`FwOpcodeType`| Opcode of pending `WAIT_FOR_QUIESCENCE` command |
62
+
|`m_stored_sequence`|`U32`| Sequence number of pending `WAIT_FOR_QUIESCENCE` command |
27
63
28
64
## Sequence Diagrams
29
-
Add sequence diagrams here
30
65
31
66
## Parameters
32
-
| Name | Description |
33
-
|---|---|
34
-
|---|---|
67
+
68
+
| Name | Type | Default Value | Description |
69
+
|------|------|---------------|-------------|
70
+
|`ARMED`|`bool`|`true`| When true, system waits for quiescence period. When false, quiescence is bypassed |
71
+
|`QUIESCENCE_TIME`|`Fw.TimeIntervalValue`|`{seconds = 45 * 60, useconds = 0}`| Duration to wait for quiescence (45 minutes by default) |
72
+
|`QUIESCENCE_START_FILE`|`string`|`"/quiescence_start.bin"`| File path for storing the mission-wide quiescence start time |
73
+
|`STARTUP_SEQUENCE_FILE`|`string`|`"/startup.bin"`| Path to the command sequence file to run at startup |
74
+
|`BOOT_COUNT_FILE`|`string`|`"/boot_count.bin"`| File path for storing the boot count |
35
75
36
76
## Commands
37
-
| Name | Description |
38
-
|---|---|
39
-
|---|---|
77
+
78
+
| Name | Description |
79
+
|------|-------------|
80
+
|`WAIT_FOR_QUIESCENCE`| Lets you start with opcode cmdseq and whether or not waiting |
40
81
41
82
## Events
42
-
| Name | Description |
43
-
|---|---|
44
-
|---|---|
83
+
84
+
| Name | Severity | Arguments | Description |
85
+
|------|----------|-----------|-------------|
86
+
|`BootCountUpdateFailure`| WARNING_LO | None | Emitted when the boot count file cannot be updated. Boot count was incremented in memory but not persisted |
87
+
|`QuiescenceFileInitFailure`| WARNING_LO | None | Emitted when the quiescence start time file cannot be initialized. System will use current time but cannot persist it |
88
+
|`StartupSequenceFinished`| ACTIVITY_LO | None | Emitted when the startup sequence completes successfully |
89
+
|`StartupSequenceFailed`| WARNING_LO |`response: Fw.CmdResponse`| Emitted when the startup sequence fails, includes the failure response code |
45
90
46
91
## Telemetry
47
-
| Name | Description |
48
-
|---|---|
49
-
|---|---|
50
92
51
-
## Unit Tests
52
-
Add unit test descriptions in the chart below
53
-
| Name | Description | Output | Coverage |
54
-
|---|---|---|---|
55
-
|---|---|---|---|
93
+
| Name | Type | Update Policy | Description |
94
+
|------|------|---------------|-------------|
95
+
|`BootCount`|`FwSizeType`| Update on change | Current boot count. Increments on each system boot |
96
+
|`QuiescenceEndTime`|`Fw.TimeValue`| Update on change | Absolute time when the quiescence period will end. Updated on each `run` call |
56
97
57
98
## Requirements
58
-
Add requirements in the chart below
59
-
| Name | Description | Validation |
60
-
|---|---|---|
61
-
|---|---|---|
99
+
100
+
| Requirement ID | Description | Validation Method |
0 commit comments