Standard Attributes
The different specification types support different attributes.
None of the attributes is mandatory from tooling perspective, but they have default values which can differ depending on the ID, type, etc.
In general the syntax is as follows:
.. <type>:: <id>
:<attribute 1>: <value 1>
:<attribute 2>: <value 2>
<content>
Similar to the content, the values can be simple text or any other complex Sphinx syntax like images, lists, blocks and even headings.
Many attributes are the same as for Dim, especially regarding the allowed values. Sphinx itself does not complain (yet) if e.g. an incorrect status value is set, but it’s recognized when exported and loaded by Dim.
The attribute names are displayed in black color and bold font. The attribute values are usually also displayed in black color, but the font style can vary depending on the content.
Note: it is recommended to do that export and “dim check” in the verifier of a project to avoid broken attributes.
Self-Written Specification Types
srs |
spec |
mod |
interface |
unit |
|
---|---|---|---|---|---|
x |
x |
x |
x |
x |
|
(x) |
(x) |
(x) |
(x) |
(x) |
|
x |
x |
x |
x |
x |
|
x |
x |
x |
x |
x |
|
x |
|||||
x |
|||||
x |
x |
x |
x |
||
x |
x |
x |
x |
x |
|
x |
x |
(x) |
x |
||
x |
x |
(x) |
x |
||
x |
x |
(x) |
x |
||
(x) |
(x) |
(x) |
x |
||
x |
x |
x |
x |
||
x |
|||||
Generated Specification Types
requirement (input) |
information (input) |
requirement (software, system) |
information (software, system) |
|
---|---|---|---|---|
x |
x |
x |
x |
|
x |
(x) |
(x) |
(x) |
|
x |
x |
x |
x |
|
x |
x |
x |
x |
|
x |
x |
x |
x |
|
x |
x |
|||
x |
x |
|||
x |
x |
|||
x |
x |
|||
x |
x |
|||
x |
x |
|||
x |
x |
|||
x |
x |
|||
(x) |
(x) |
(x) |
(x) |
|
x |
x |
x |
x |
|
(-) |
(-) |
(-) |
(-) |
Empty cell = attribute not available and never shown in HTML output
x
= shown in HTML output(x)
= shown in HTML output under certain conditions, see below(-)
= attribute available, but not shown in HTML output
status
Default value: draft
If status is set to invalid
, the requirement will be struck through.
review_status
accepted
.accepted
.If review_status is set to rejected
or not_relevant
, the requirement will be struck
through.
asil
Default value: not_set
cal
Default value: not_set
reuse
-
.usage
-
.developer
-
if specification is struck through
[missing]
otherwise
tester
-
if verification_methods is none or specification is struck through
[missing]
otherwise
The attribute is ignored if type is interface and ID starts with SMD_.
verification_methods
Default value:
off_target
if type is srs, spec or unit and ID starts with SMD_
on_target
if type is srs, spec, interface or unit and ID starts with SWA_
none
otherwise
The attribute is ignored if type is interface and ID starts with SMD_.
verification_criteria
[missing]
if
type is srs or requirements and category is not input and
tool is not in tags and
specification is not struck through
-
otherwise
comment
-
.miscellaneous
-
.feature
-
.change_request
-
.sources
sources is a comma separated string of relative filenames. It links software detailed design to the source code.
The filenames must be specified relative from the module root (identified by the doc-folder in which the rst-file is placed). Alternatively relative to the rst file itself. These files must exist, a check is done when building with Sphinx.
This attribute is shown if:
the attribute is not empty OR
the type is unit OR
the type is interface and the ID starts with SMD_
Default value is empty string which is displayed as:
-
if tag covered is set or specification is struck through[missing]
otherwise
Example:
# modules/safety/safeCom/doc/api/public.rst
# modules/safety/safeCom/include/PublicApi.h
# relative from module root
.. unit:: SMD_example_id1
:sources: include/PublicApi.h
# relative from current rst file
.. unit:: SMD_example_id2
:sources: ../../include/PublicApi.h
refs
Example:
.. spec:: SWA_exampleFeature_id1
:refs: SMD_exampleModule_id2, SMD_exampleModule_id3
To allow references to non-existing specifications, set the variable
dox_trace_allow_undefined_refs in conf.py
to True. With this setting, all undefined references
are displayed in red in Downstream References and no warning is printed
during the build.
dox_trace_allow_undefined_refs = True
To create a list of undefined references, add the directive .. undefined_refs::
e.g. to the
appendix. See Undefined References for an example.
Undefined references are not exported to Dim.
location
<module root>/doc/index.rst
exists, an HTML link will be created,
otherwise the string is displayed as is.-
if specification is struck through[missing]
otherwise
Example:
.. mod:: SWA_mod_exampleModule
:location: ecu1/core2/modules/exampleModule
category
This value is usually not set manually, it’s set by the RST export of Dim. Possible values are input, system and software. Requirements are handled slightly different depending on the category, e.g. it affects the review_status visibility.