-
Notifications
You must be signed in to change notification settings - Fork 202
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix #972, reorganize directory structure #1203
Conversation
Pushed as draft for pre-review ... The real commit is in 12412c2 This really needs a stable baseline due to the fact that it moves files around, it can be difficult to auto-merge. Corrected: some debug/saved files I forgot to remove were still in the original push. Cleaned up now. |
3c4b9cf
to
12412c2
Compare
For review/summary - the directory structure of the
|
|
@skliper @jwilmot what other words can we use for the "fsw" directory? As our userbase and applications grow I think it would be interesting to have that directory be named something that encompasses more "project types". What about something like "rt_sw" for real-time sw? I know this is a big paradigm change and we should honor our fsw roots though. Thoughts? |
@jphickey would it make sense for |
The key for me is that it's uniquely identified vs test or any other code in the repo so from that context "fsw" is sufficient, and doesn't limit use. It is the core Flight Executive and core Flight System, rebranding may be a hard sell. It's not really "real-time" in the classic sense since that depends on OS, and anything I can think of generic enough to cover all uses looses it's meaning. |
I still like "fsw" - it has heritage/history, and its obvious what it refers to (i.e. its one of those acronyms that really doesn't need a definition). Given the number of times the word "flight" is referred to in both code and docs (and the overall system name!), this will probably never change. |
I'm fine with that. What about |
Yeah I was thinking about "internal" but couldn't come up with anything. Maybe private? |
This is a tough one because "private" (at least to me) implies localized to a single module, which this is not (i.e. not shared at all). I sometimes refer to this as "quasi-private" - but I wanted a term that conveys it is shared within the group, but not widely shared beyond the group. |
What if we use private then use "local" for the module-specific stuff? |
cfe_local? or cfe_scope... local_scope, restricted? internal... where's my thesaurus. |
or Also what is our guidance for underscores vs dashes again? |
Separate question, do we want to drop the cfe_* prefix or replace it with |
I do concur about the redundant-ness of the directory name - HOWEVER - there are other patterns involved here. The directory defines a CMake target of the same name - this is a common pattern in all modules. (i.e. so "es" defines an "es" target, etc). This becomes apparent when linking, where one has to list the interface in "target_link_libraries" - in this context the "cfe_" prefix makes sense. That is, one does |
Significant reorganization of the CFE core directory and header file structure. All modules become separate subdirectories under fsw/modules. Additionally, the interfaces to CFE core (public and internal) are also separated into modules. CMake "interface libraries" and related constructs are used to manage the include paths to all the separate modules.
cf3ca57
to
aca9147
Compare
This updates the cppcheck static analysis rule to run via a script which takes into account the new directory structure. Oddly this reported new (valid) issues in FSW code which have also been corrected. Notably the wrapper script also contains a special provision to run static analysis on TIME only with SERVER mode enabled. The default logic of cppcheck would run all combos and it is not valid to have both of these defined.
aca9147
to
a53428c
Compare
Build checks passing, should be basically ready for its final review and merge. |
Notes from CCB Splinter 2021-03-10
|
The userguide build needs to include fsw/inc from all modules
Create a separate "core_internal.h" header file for prototypes that were only intended for CFE core use.
Describe the contribution
Reorganize/Refactor the CFE source code directory structure per the discussion in #972.
Important notes:
cfe_app_intf
and the internal interface (private types, stuff that goes only between core apps) is incfe_internal_intf
.cfe_*_msg.h
) are within thefsw/inc
directory of the respective module - because these are "owned" by the module itself.cfe_es_api_typedefs.h
) which is intended to define the data types and constants used in the API, which in turn may be included by other headers that need to reference/build upon the data types in the respective API.cfe_es.h
) which contains the all function prototypes. It is intended to be included only from C files.Fixes #972
Testing performed
Build and sanity test CFE
Run all unit tests
Expected behavior changes
None outside build system.
System(s) tested on
Ubuntu 20.04 (native)
Testing is not yet sufficient - Still needs more verification on other platforms and configurations (static apps, etc).
Additional context
Although this is a substantial change to the build system and directory structure, very little (if any?) of the FSW C code was actually changed.
Contributor Info - All information REQUIRED for consideration of pull request
Joseph Hickey, Vantage Systems, Inc.