|
| 1 | +.. |
| 2 | + # ******************************************************************************* |
| 3 | + # Copyright (c) 2025 Contributors to the Eclipse Foundation |
| 4 | + # |
| 5 | + # See the NOTICE file(s) distributed with this work for additional |
| 6 | + # information regarding copyright ownership. |
| 7 | + # |
| 8 | + # This program and the accompanying materials are made available under the |
| 9 | + # terms of the Apache License Version 2.0 which is available at |
| 10 | + # https://www.apache.org/licenses/LICENSE-2.0 |
| 11 | + # |
| 12 | + # SPDX-License-Identifier: Apache-2.0 |
| 13 | + # ******************************************************************************* |
| 14 | +
|
| 15 | +Component Requirements: feo |
| 16 | +########################### |
| 17 | + |
| 18 | +.. comp_req:: Application Processes |
| 19 | + :id: comp_req__feo__application |
| 20 | + :reqtype: Functional |
| 21 | + :security: NO |
| 22 | + :safety: QM |
| 23 | + :satisfies: feat_req__feo__application |
| 24 | + :status: valid |
| 25 | + |
| 26 | + An application consists of one or more activities executed in one or multiple operating system processes. |
| 27 | + |
| 28 | + In particular it consists of the primary process which handles the lifecycle, configuration and execution management. |
| 29 | + It may optionally consist of one or more secondary processes. |
| 30 | + The purpose of secondary processes is to run code in separate address spaces (Freedom From Interference) for safety reasons. |
| 31 | + Each process (primary and secondary) belongs to exactly one application. |
| 32 | + Each process contains one ore more operating system threads. |
| 33 | + |
| 34 | + |
| 35 | +.. comp_req:: Activity |
| 36 | + :id: comp_req__feo__activity |
| 37 | + :reqtype: Functional |
| 38 | + :security: NO |
| 39 | + :safety: QM |
| 40 | + :satisfies: feat_req__feo__activity |
| 41 | + :status: valid |
| 42 | + |
| 43 | + Each activitiy is mapped to exactly one thread within the primary or one of the secondary processes. |
| 44 | + Each activity provides the following functions: |
| 45 | + |
| 46 | + * `init`: Initialization of the activity. |
| 47 | + * `step`: Execution of the activity. |
| 48 | + * `shutdown`: Shutdown of the activity. |
| 49 | + |
| 50 | + |
| 51 | +.. comp_req:: Task Chain |
| 52 | + :id: comp_req__feo__task_chain |
| 53 | + :reqtype: Functional |
| 54 | + :security: NO |
| 55 | + :safety: QM |
| 56 | + :satisfies: feat_req__feo__task_chain |
| 57 | + :status: valid |
| 58 | + |
| 59 | + All activities within an application are arranged within a `Task Chain`. |
| 60 | + There is exactly one task chain per application. |
| 61 | + |
| 62 | + The task chain configuration defines the execution order of the activities. |
| 63 | + In particular it defines when the task chain is activated (typically in a cyclic manner) and in which order the activities will run. |
| 64 | + |
| 65 | + Every task chain may have one or multiple input service activities which will run in the beginning. |
| 66 | + The purpose of an input service activity is to collect external input signals and provide them to the other activities during task chain execution. |
| 67 | + Every task may have one or more output service activities which will run in the end. |
| 68 | + The purpose of an output service activity is to collect signals produced by activities within the task chain and send them to external entities. |
| 69 | + |
| 70 | + |
| 71 | +.. comp_req:: Scheduler aka Executor |
| 72 | + :id: comp_req__feo__scheduler |
| 73 | + :reqtype: Functional |
| 74 | + :security: NO |
| 75 | + :safety: QM |
| 76 | + :satisfies: feat_req__feo__application, feat_req__feo__agent |
| 77 | + :status: valid |
| 78 | + |
| 79 | + The component shall implement a scheduler (aka executor) that manages the execution of activities in correct order. |
| 80 | + |
| 81 | + |
| 82 | +.. comp_req:: Service Activity |
| 83 | + :id: comp_req__feo__service_activity |
| 84 | + :reqtype: Functional |
| 85 | + :security: NO |
| 86 | + :safety: QM |
| 87 | + :satisfies: feat_req__feo__service_activity |
| 88 | + :status: valid |
| 89 | + |
| 90 | + The component shall enable the implementation and execution of Service Activities, which are a means to interact |
| 91 | + with the outside world, e.g. via network communication, direct sensor input or direct actuator output. |
| 92 | + |
| 93 | + A Service Activity shall be enabled to use APIs external to the framework (e.g. networking APIs, reading from |
| 94 | + external sensor devices, writing HW I/O, etc.) |
| 95 | + |
| 96 | + |
| 97 | +.. comp_req:: Agent |
| 98 | + :id: comp_req__feo__agent |
| 99 | + :reqtype: Functional |
| 100 | + :security: NO |
| 101 | + :safety: QM |
| 102 | + :satisfies: feat_req__feo__agent |
| 103 | + :status: valid |
| 104 | + |
| 105 | + In order to execute activities in secondary processes, the Scheduler shall use agents running in the secondary |
| 106 | + processes. There shall be exactly one agent for each secondary process. |
| 107 | + |
| 108 | + The Agent in a secondary process shall receive commands from the Scheduler, invoke actions on Activities within its |
| 109 | + process and report back to the Scheduler. Each Activity that is part of the task chain in a secondary process shall |
| 110 | + be associated with an Agent, which takes over the task to wait for a trigger from the Scheduler. When the Agent |
| 111 | + gets a step request from the Scheduler, it calls the Step function of the Activity. |
| 112 | + |
| 113 | + |
| 114 | +.. comp_req:: Mapping of Activities to threads |
| 115 | + :id: comp_req__feo__activitiy_thread |
| 116 | + :reqtype: Functional |
| 117 | + :security: NO |
| 118 | + :safety: QM |
| 119 | + :satisfies: feat_req__feo__activity_init, feat_req__feo__activitiy_step, feat_req__feo__activity_shutdown, feat_req__feo__activity |
| 120 | + :status: valid |
| 121 | + |
| 122 | + Each activity shall be mapped to one thread. The mapping cannot be changed at runtime. |
| 123 | + Each activity's `init`, `step` and `shutdown` functions shall be executed in the assigned thread. |
| 124 | + |
| 125 | + |
| 126 | +.. comp_req:: Application Lifecycle Phases |
| 127 | + :id: comp_req__feo__application_lifecycle |
| 128 | + :reqtype: Functional |
| 129 | + :security: NO |
| 130 | + :safety: QM |
| 131 | + :satisfies: feat_req__feo__application_lifecycle |
| 132 | + :status: valid |
| 133 | + |
| 134 | + The Application Lifecycle shall consists of 3 phases: Init, Run and Shutdown. |
| 135 | + |
| 136 | + |
| 137 | +.. comp_req:: Initialization of Activities |
| 138 | + :id: comp_req__feo__activity_init |
| 139 | + :reqtype: Functional |
| 140 | + :security: NO |
| 141 | + :safety: QM |
| 142 | + :satisfies: feat_req__feo__activity_init |
| 143 | + :status: valid |
| 144 | + |
| 145 | + Initialization of Activities shall be done during application initialization. |
| 146 | + |
| 147 | + Each Activity shall be initialized by a call to its `init` function. |
| 148 | + The `init` function shall be invoked in the thread to which the activity is mapped. |
| 149 | + |
| 150 | + |
| 151 | +.. comp_req:: Stepping of Activities |
| 152 | + :id: comp_req__feo__activitiy_step |
| 153 | + :reqtype: Functional |
| 154 | + :security: NO |
| 155 | + :safety: QM |
| 156 | + :satisfies: feat_req__feo__activitiy_step, feat_req__feo__activity_init, feat_req__feo__activity |
| 157 | + :status: valid |
| 158 | + |
| 159 | + Each Activity shall be stepped once within each execution of the Task Chain they belong to. |
| 160 | + Stepping is done by a call to an activity's `step` function. The `step` function shall be invoked |
| 161 | + in the thread to which the activity is mapped. |
| 162 | + |
| 163 | + |
| 164 | +.. comp_req:: Shutdown of activities |
| 165 | + :id: comp_req__feo__activity_shutdown |
| 166 | + :reqtype: Functional |
| 167 | + :security: NO |
| 168 | + :safety: QM |
| 169 | + :satisfies: feat_req__feo__activity_shutdown |
| 170 | + :status: valid |
| 171 | + |
| 172 | + Shutdown of activities shall be done during application shutdown. |
| 173 | + |
| 174 | + Each activity shall be shut down by a call to its `shutdown` function. The `shutdown` function shall be invoked |
| 175 | + in the thread to which the activity is mapped. |
| 176 | + |
| 177 | + |
| 178 | +.. comp_req:: Component Configuration |
| 179 | + :id: comp_req__feo__comp_cfg |
| 180 | + :reqtype: Functional |
| 181 | + :security: NO |
| 182 | + :safety: QM |
| 183 | + :satisfies: feat_req__feo__activity, feat_req__feo__task_chain |
| 184 | + :status: valid |
| 185 | + |
| 186 | + The component shall provide a configuration mechanism that supports configuring |
| 187 | + |
| 188 | + - the mapping of activities to threads |
| 189 | + - the execution order of activities |
| 190 | + - when the task chain is activated (e.g. a cycle time for cyclic execution) |
| 191 | + |
| 192 | + |
| 193 | +.. comp_req:: Component Configuration from File |
| 194 | + :id: comp_req__feo__comp_cfg_file |
| 195 | + :reqtype: Functional |
| 196 | + :security: NO |
| 197 | + :safety: QM |
| 198 | + :satisfies: feat_req__feo__activity |
| 199 | + :status: valid |
| 200 | + |
| 201 | + It shall be possible to define the component configuration in a pre-defined configuration file. |
| 202 | + |
| 203 | + |
| 204 | +.. comp_req:: Activity Mapping Configuration |
| 205 | + :id: comp_req__feo__act_map_cfg |
| 206 | + :reqtype: Functional |
| 207 | + :security: NO |
| 208 | + :safety: QM |
| 209 | + :satisfies: feat_req__feo__activity |
| 210 | + :status: valid |
| 211 | + |
| 212 | + The mapping of activities to threads is done in the component configuration and cannot be changed at runtime. |
| 213 | + |
| 214 | + |
| 215 | +.. comp_req:: Alive supervision |
| 216 | + :id: comp_req__feo__alive_supervision |
| 217 | + :reqtype: Functional |
| 218 | + :security: NO |
| 219 | + :safety: ASIL_D |
| 220 | + :satisfies: feat_req__feo__alive_supervision |
| 221 | + :status: valid |
| 222 | + |
| 223 | + The component shall provide the functionality to enable the reporting of |
| 224 | + alive supervision checkpoint to an external health management system |
| 225 | + (e.g. watchdog) |
| 226 | + |
| 227 | + |
| 228 | +.. comp_req:: Support of deadline supervision checkpoints |
| 229 | + :id: comp_req__feo__deadline_supervision |
| 230 | + :reqtype: Functional |
| 231 | + :security: NO |
| 232 | + :safety: ASIL_D |
| 233 | + :satisfies: feat_req__feo__deadline_supervision |
| 234 | + :status: valid |
| 235 | + |
| 236 | + The component shall provide the functionality to enable the reporting of |
| 237 | + deadline supervision checkpoints to an external health management system |
| 238 | + (e.g. watchdog) |
| 239 | + |
| 240 | + |
| 241 | +.. comp_req:: Support of logical supervision |
| 242 | + :id: comp_req__feo__logical_supervision |
| 243 | + :reqtype: Functional |
| 244 | + :security: NO |
| 245 | + :safety: ASIL_D |
| 246 | + :satisfies: feat_req__feo__logical_supervision |
| 247 | + :status: valid |
| 248 | + |
| 249 | + The component shall provide the functionality to enable the reporting of |
| 250 | + logical supervision checkpoints to an external health management system |
| 251 | + (e.g. watchdog) |
| 252 | + |
| 253 | + |
| 254 | +.. comp_req:: Trustable computation |
| 255 | + :id: comp_req__feo__trustable_computation |
| 256 | + :reqtype: Functional |
| 257 | + :security: NO |
| 258 | + :safety: QM |
| 259 | + :satisfies: feat_req__feo__trustable_computation |
| 260 | + :status: valid |
| 261 | + |
| 262 | + The component shall provide mechanisms to check after the computation of |
| 263 | + an Activity if the result is trustable. |
| 264 | + This can be done e.g. via evaluation of floating point exceptions, |
| 265 | + checking of hardware registers or status information of the |
| 266 | + software platform. |
| 267 | + |
0 commit comments