summaryrefslogtreecommitdiff
path: root/spec/spec/requirement-action.yml
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2020-06-17 09:12:03 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2020-06-17 09:16:47 +0200
commit5d3f70af524073b74b35ca86882ea0cfd45abc45 (patch)
treefc52c430e824c4a30e82c3f92462cf8801f46ab5 /spec/spec/requirement-action.yml
parent4c5c9c35f0f8142539b9904526b2d5bcf6c28327 (diff)
spec: Clarify action requirements
Diffstat (limited to 'spec/spec/requirement-action.yml')
-rw-r--r--spec/spec/requirement-action.yml124
1 files changed, 121 insertions, 3 deletions
diff --git a/spec/spec/requirement-action.yml b/spec/spec/requirement-action.yml
index 1ae672f4..8eb7b7be 100644
--- a/spec/spec/requirement-action.yml
+++ b/spec/spec/requirement-action.yml
@@ -10,7 +10,124 @@ links:
spec-value: action
uid: requirement-functional
spec-description: null
-spec-example: null
+spec-example: |
+ SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+ copyrights:
+ - Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de)
+ enabled-by: true
+ functional-type: action
+ links: []
+ post-conditions:
+ - name: Status
+ states:
+ - name: Success
+ test-code: |
+ /* Check that the status is SUCCESS */
+ text: |
+ The status shall be SUCCESS.
+ - name: Error
+ test-code: |
+ /* Check that the status is ERROR */
+ text: |
+ The status shall be ERROR.
+ test-epilogue: null
+ test-prologue: null
+ - name: Data
+ states:
+ - name: Unchanged
+ test-code: |
+ /* Check that the data is unchanged */
+ text: |
+ The data shall be unchanged by the action.
+ - name: Red
+ test-code: |
+ /* Check that the data is red */
+ text: |
+ The data shall be red.
+ - name: Green
+ test-code: |
+ /* Check that the data is green */
+ text: |
+ The data shall be green.
+ test-epilogue: null
+ test-prologue: null
+ pre-conditions:
+ - name: Data
+ states:
+ - name: NullPtr
+ test-code: |
+ /* Set data pointer to NULL */
+ text: |
+ The data pointer shall be NULL.
+ - name: Valid
+ test-code: |
+ /* Set data pointer to reference a valid data buffer */
+ text: |
+ The data pointer shall reference a valid data buffer.
+ test-epilogue: null
+ test-prologue: null
+ - name: Option
+ states:
+ - name: Red
+ test-code: |
+ /* Set option to RED */
+ text: |
+ The option shall be RED.
+ - name: Green
+ test-code: |
+ /* Set option to GREEN */
+ text: |
+ The option shall be GREEN.
+ test-epilogue: null
+ test-prologue: null
+ requirement-type: functional
+ test-action: |
+ /* Call the function of the action */
+ test-brief: null
+ test-context:
+ - brief: null
+ description: null
+ member: void *data
+ - brief: null
+ description: null
+ member: option_type option
+ test-description: null
+ test-header: null
+ test-includes: []
+ test-local-includes: []
+ test-name: RedGreenData
+ test-setup: null
+ test-stop: null
+ test-support: null
+ test-target: tc-red-green-data.c
+ test-teardown: null
+ transition-map:
+ - enabled-by: true
+ post-conditions:
+ Status: Error
+ Data: Unchanged
+ pre-conditions:
+ Data: NullPtr
+ Option: all
+ - enabled-by: true
+ post-conditions:
+ Status: Success
+ Data: Red
+ pre-conditions:
+ Data: Valid
+ Option: Red
+ - enabled-by: true
+ post-conditions:
+ Status: Success
+ Data: Green
+ pre-conditions:
+ Data: Valid
+ Option: Green
+ rationale: null
+ references: []
+ text: |
+ ${.:/text-template}
+ type: requirement
spec-info:
dict:
attributes:
@@ -80,8 +197,9 @@ spec-info:
code of a macro expansion by an actor. The actor is for example a task
or an interrupt service routine.
- There shall be exactly one link with the
- ${interface-function-role:/spec-name} to the interface of the action.
+ For action requirements which specify the function of an interface, there
+ shall be exactly one link with the ${interface-function-role:/spec-name}
+ to the interface of the action.
The action requirements are specified by