-
Notifications
You must be signed in to change notification settings - Fork 204
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
Refactor directory structure so it makes sense again (fsw contains non-fsw) #972
Comments
Also related to #626 (utilize cmake libraries) that could help clean up includes/dependencies. |
I would also suggest a unit-test directory with functional, stubs, and coverage subdirectories |
CCB 2020-10-28 APPROVED |
Something like the simplified tree in the original comment would be great. |
I assume "core" contains the base services (es, evs, etc.). What do we get from nesting those as opposed to keeping them directly under "fsw" |
The "core" services all use one CMakeList.txt, and become one cfe-core library in the build context. The individual modules each have their own CMakeLists.txt and can be removed/replaced via configuration. Eventually everything could follow the module approach and we could break out cfe-core into it's elements, but we aren't there yet (and it's not critical for Caelum). |
Need to consider how this affects the build system and the way it finds components. In particular the component-level CMakeLists.txt files need to reside at the top level of the module they define. I have two possible suggestions for consideration. The first is a "lighter" version that still preserves the current core grouping and wouldn't substantially impact the general build scripts or user understanding of the layout:
In this approach the The second is a more full-blown modularization, which is what I think we should strive toward but is definitely a bigger change not only in the scripting but also user mindset:
In this approach the Correction - removed |
Uh-oh we're approaching taxonomy territory! |
I'd prefer an approach that separates fsw from non-fsw. Your modules directory mixes that concept in both options (as does the current structure). I think we would benefit from an obvious difference. |
Yes - The reality is that all modules may have both I don't see why we'd want to treat the core modules any differently - they are just other modules. So the very general form/template would be:
Edit: Clarified to add "may" into first sentence. |
I think @jphickey's second option is actually not that bad, the fsw separation is inherent inside each module and I like how it encapsulates everything related to each module inside a single directory, similar to how the apps are implemented. That being said, should we really consider |
@astrogeco - good catch, actually
I also prefer the second approach - i.e. fully modular - and as I said before, it would take some work to make the CFE core apps play nice in this more isolated arrangement. I think we are close to having this be workable ... Mainly just have to fix some aspects of the ER log and cleanup code that calls directly into other modules and bypasses the public API. Worst case we just move them to public headers but document that they aren't intended to be directly referenced outside CFE itself. But all in all I don't think it would take a whole lot of work to get it running with this fully modularized directory structure. |
From a taxonomy perspective, those three items don't have a fsw component which makes them outliers. I want to make sure that when people talk about modules everyone agrees on what they are. Having non-fsw items inside the modules directory is confusing. |
Correct - they are test support modules, not FSW modules - although they could be loaded into a FSW environment for test purposes when you want to do that. Personally I don't think the term "modules" implies FSW - nowhere did we say that every module needs to have a FSW component. Some have FSW, some do not, depending on their purpose. But that's my opinion - if you wanted to use a separate parent dir that's fine - but I don't think it adds any value, since we already designate what is "fsw" and what is not inside the modules themselves. It is somewhat redundant to designate "fsw" in the parent dir as well. |
I agree that we never said modules have to have a FSW component. Regardless of what we end up with I want to make sure we define and lay out things in a way that makes sense. So from a definition and educational perspective I'd like to have a statement that says "Modules are composed of such and such, a typical module contains these types of things. If you want to add X functionality you should create a module. If you want to add Y functionality you should create some_other_thing" |
I concur w/ the second @jphickey option. I think in the short term we can keep the "cfe core" concept for private includes/API bypass. This could all benefit from #626, interface libraries. We will need a spot for ut_support, and possibly consider the task library concept for general task implementations. Also the target inc/src seems closer to fsw than cmake, would this make more sense to be not under cmake? I could go either way since these are processed, but it feels like we are hiding these. |
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.
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.
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.
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.
Updates the application developer guide to describe the directory structure and file naming conventions
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.
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.
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.
Fix #972, reorganize directory structure
Is your feature request related to a problem? Please describe.
fsw is misleading in that it includes unit tests, etc but then there are also fsw implementations within modules...
Describe the solution you'd like
Implement a flattened/sensible directory structure. Needs discussion.
Describe alternatives you've considered
Additional context
#947 (review)
Requester Info
Jacob Hageman - NASA/GSFC
ping @acudmore
EDIT - updated for Gerardo comment
The text was updated successfully, but these errors were encountered: