rtems-central: Error trying to add FACE POSIX Timer Behavior
Frank Kühndel
frank.kuehndel at embedded-brains.de
Tue Aug 16 12:15:26 UTC 2022
Hi Joel,
as far as I can remember, the error handling of `spec2modules.py` was
never excellent. Adding `notes: null` to
`spec/acfg/if/posix-timer-face-behavior.yml` fixes your problem:
{{{{
SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
appl-config-option-type: feature-enable
copyrights:
- Copyright (C) 2022 On-Line Applications Research Corporation (OAR)
description: |
If this configuration option is defined, then POSIX timers may
not be created to use the CLOCK_REALTIME. Per POSIX, this is allowed
behavior but per the FACE Technical Standard, using POSIX timers based
on CLOCK_REALTIME (e.g., time of day) is unsafe for real-time safety
systems as setting CLOCK_REALTIME will perturb any active timers.
If this option is not defined, POSIX timers may be created to use the
CLOCK_REALTIME in compliance with the POSIX specification.
enabled-by: true
index-entries: []
interface-type: appl-config-option
links:
- role: appl-config-group-member
uid: group-face
name: CONFIGURE_POSIX_TIMERS_FACE_BEHAVIOR
notes: null
type: interface
}}}
Missing non-optional keys, misspelled keys, or keys placed in the wrong
level lead to exceptions in `spec2modules.py` as well as missing values,
or values of wrong type.
In this particular case, I found the problem by comparing
`spec/acfg/if/posix-timer-face-behavior.yml` to files using
`group-filesystem` (e.g. `spec/acfg/if/filesystem-all.yml`).
There is a documentation on specification items:
https://docs.rtems.org/branches/master/eng/req/items.html
The format for your file `spec/acfg/if/posix-timer-face-behavior.yml` is
described in
* section "5.2.2.18. Interface Item Type"
* sub-section "5.2.2.20. Application Configuration Option Item Type"
It states the missing key "notes".
I hope I could help.
Greetings
Frank
On 8/12/22 23:28, Joel Sherrill wrote:
> Hi
>
> I've just attached the patch as a work in progress since spec2modules.py is
> unhappy with what I've done so far. I'd appreciate some guidance. I checked
> that spec2modules.py ran OK before my changes. I added a group-face and
> hope I did that much right. But something is wrong. Help appreciated.
>
> $ ./spec2modules.py
> Traceback (most recent call last):
> File "./spec2modules.py", line 85, in <module>
> main()
> File "./spec2modules.py", line 76, in main
> rtemsspec.applconfig.generate(config["appl-config"], item_cache)
> File "/home/joel/rtems-work/rtems/rtems-central/rtemsspec/applconfig.py",
> line 336, in generate
> _generate(group, options, enabled, sphinx_content)
> File "/home/joel/rtems-work/rtems/rtems-central/rtemsspec/applconfig.py",
> line 264, in _generate
> content.add_option_notes(content.substitute(item["notes"]))
> File "/home/joel/rtems-work/rtems/rtems-central/rtemsspec/items.py", line
> 210, in __getitem__
> return self._data[key]
> KeyError: 'notes'
>
> Thanks.
>
> --joel
--
embedded brains GmbH
Herr Frank KÜHNDEL
Dornierstr. 4
82178 Puchheim
Germany
email: frank.kuehndel at embedded-brains.de
phone: +49-89-18 94 741 - 23
mobile: +49-176-15 22 06 - 11
fax: +49-89-18 94 741 - 08
Registergericht: Amtsgericht München
Registernummer: HRB 157899
Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler
Unsere Datenschutzerklärung finden Sie hier:
https://embedded-brains.de/datenschutzerklaerung/
More information about the devel
mailing list