# nasa/cfe architecture

> Architecture diagram of the GitHub repository nasa/cfe, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-13). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/nasa/cfe
- Repository: https://github.com/nasa/cfe

## Overview

NASA’s Core Flight Executive (cFE) is a framework component of the Core Flight System: a collection of services intended to live in a cFS mission tree. The principal user is a flight-software application; its conceptual workflow is to use cFE APIs and services to exchange messages, issue commands, and access shared facilities. The graph preserves the major service domains visible in the source tree. Source excerpts do not show most runtime wiring, so those workflow links are dashed and unverified rather than asserted as call paths.

Main entry points: [`modules/core_api/fsw/inc`](https://github.com/nasa/cfe/tree/dev/modules/core_api/fsw/inc) (cFE APIs), [`modules/es/fsw/src/cfe_es_task.c`](https://github.com/nasa/cfe/blob/dev/modules/es/fsw/src/cfe_es_task.c) (Executive Service), [`modules/sb/fsw/src/cfe_sb_priv.c`](https://github.com/nasa/cfe/blob/dev/modules/sb/fsw/src/cfe_sb_priv.c) (Software Bus), [`modules/tbl/fsw/src/cfe_tbl_task_cmds.c`](https://github.com/nasa/cfe/blob/dev/modules/tbl/fsw/src/cfe_tbl_task_cmds.c) (Table Service)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interfaces["Application Interfaces"]
  node_core_api["cFE APIs"]
end

subgraph group_runtime["Core Runtime"]
  node_executive["Executive Service<br/>[cfe_es_task.c]"]
  node_message["Message Service<br/>[cfe_msg_ccsdspri.c]"]
end

subgraph group_services["Flight Services"]
  node_software_bus["Software Bus<br/>[cfe_sb_priv.c]"]
  node_event_service["Event Service<br/>[cfe_evs_task.c]"]
  node_file_service["File Service<br/>[cfe_fs_api.c]"]
  node_table_service["Table Service"]
  node_time_service["Time Service<br/>[cfe_time_tone.c]"]
  node_telemetry_assist["Telemetry Assist<br/>[cfe_ta_task.c]"]
end

subgraph group_support["Shared Support"]
  node_config_service["Configuration Service<br/>[cfe_config_get.c]"]
  node_resource_ids["Resource IDs"]
  node_routing["Bus Routing"]
  node_assertions["Assertions"]
end

subgraph group_testing["Test Support"]
  node_testcase["Test Case Support<br/>[cfe_test_table.c]"]
end

node_flight_app(("Flight Application"))
node_os_psp["OSAL / PSP"]

node_flight_app -.->|"uses APIs"| node_core_api
node_core_api -.->|"accesses"| node_executive
node_core_api -.->|"accesses"| node_message
node_core_api -.->|"accesses"| node_software_bus
node_core_api -.->|"accesses"| node_event_service
node_core_api -.->|"accesses"| node_file_service
node_core_api -.->|"accesses"| node_table_service
node_core_api -.->|"accesses"| node_time_service
node_flight_app -.->|"uses"| node_telemetry_assist
node_executive -.->|"depends on"| node_os_psp
node_software_bus -.->|"routes through"| node_routing
node_table_service -.->|"uses"| node_file_service
node_flight_app -.->|"may use"| node_assertions
node_flight_app -.->|"may use"| node_testcase

click node_core_api "https://github.com/nasa/cfe/tree/dev/modules/core_api/fsw/inc"
click node_executive "https://github.com/nasa/cfe/blob/dev/modules/es/fsw/src/cfe_es_task.c"
click node_message "https://github.com/nasa/cfe/blob/dev/modules/msg/fsw/src/cfe_msg_ccsdspri.c"
click node_software_bus "https://github.com/nasa/cfe/blob/dev/modules/sb/fsw/src/cfe_sb_priv.c"
click node_event_service "https://github.com/nasa/cfe/blob/dev/modules/evs/fsw/src/cfe_evs_task.c"
click node_file_service "https://github.com/nasa/cfe/blob/dev/modules/fs/fsw/src/cfe_fs_api.c"
click node_table_service "https://github.com/nasa/cfe/blob/dev/modules/tbl/fsw/src/cfe_tbl_task_cmds.c"
click node_time_service "https://github.com/nasa/cfe/blob/dev/modules/time/fsw/src/cfe_time_tone.c"
click node_telemetry_assist "https://github.com/nasa/cfe/blob/dev/modules/ta/fsw/src/cfe_ta_task.c"
click node_config_service "https://github.com/nasa/cfe/blob/dev/modules/config/fsw/src/cfe_config_get.c"
click node_resource_ids "https://github.com/nasa/cfe/blob/dev/modules/resourceid/fsw/src/cfe_resourceid_api.c"
click node_routing "https://github.com/nasa/cfe/blob/dev/modules/sbr/fsw/src/cfe_sbr_route_unsorted.c"
click node_assertions "https://github.com/nasa/cfe/blob/dev/modules/cfe_assert/src/cfe_assert_runner.c"
click node_testcase "https://github.com/nasa/cfe/blob/dev/modules/cfe_testcase/src/cfe_test_table.c"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_core_api toneBlue
class node_executive,node_message toneAmber
class node_software_bus,node_event_service,node_file_service,node_table_service,node_time_service,node_telemetry_assist toneMint
class node_config_service,node_resource_ids,node_routing,node_assertions toneRose
class node_testcase,node_flight_app,node_os_psp toneIndigo
```

## Components

### Application Interfaces

- [cFE APIs](https://github.com/nasa/cfe/tree/dev/modules/core_api/fsw/inc): `modules/core_api/fsw/inc`

### Core Runtime

- [Executive Service](https://github.com/nasa/cfe/blob/dev/modules/es/fsw/src/cfe_es_task.c): `modules/es/fsw/src/cfe_es_task.c`
- [Message Service](https://github.com/nasa/cfe/blob/dev/modules/msg/fsw/src/cfe_msg_ccsdspri.c): `modules/msg/fsw/src/cfe_msg_ccsdspri.c`

### Flight Services

- [Software Bus](https://github.com/nasa/cfe/blob/dev/modules/sb/fsw/src/cfe_sb_priv.c): `modules/sb/fsw/src/cfe_sb_priv.c`
- [Event Service](https://github.com/nasa/cfe/blob/dev/modules/evs/fsw/src/cfe_evs_task.c): `modules/evs/fsw/src/cfe_evs_task.c`
- [File Service](https://github.com/nasa/cfe/blob/dev/modules/fs/fsw/src/cfe_fs_api.c): `modules/fs/fsw/src/cfe_fs_api.c`
- [Table Service](https://github.com/nasa/cfe/blob/dev/modules/tbl/fsw/src/cfe_tbl_task_cmds.c): `modules/tbl/fsw/src/cfe_tbl_task_cmds.c`
- [Time Service](https://github.com/nasa/cfe/blob/dev/modules/time/fsw/src/cfe_time_tone.c): `modules/time/fsw/src/cfe_time_tone.c`
- [Telemetry Assist](https://github.com/nasa/cfe/blob/dev/modules/ta/fsw/src/cfe_ta_task.c): `modules/ta/fsw/src/cfe_ta_task.c`

### Shared Support

- [Configuration Service](https://github.com/nasa/cfe/blob/dev/modules/config/fsw/src/cfe_config_get.c): `modules/config/fsw/src/cfe_config_get.c`
- [Resource IDs](https://github.com/nasa/cfe/blob/dev/modules/resourceid/fsw/src/cfe_resourceid_api.c): `modules/resourceid/fsw/src/cfe_resourceid_api.c`
- [Bus Routing](https://github.com/nasa/cfe/blob/dev/modules/sbr/fsw/src/cfe_sbr_route_unsorted.c): `modules/sbr/fsw/src/cfe_sbr_route_unsorted.c`
- [Assertions](https://github.com/nasa/cfe/blob/dev/modules/cfe_assert/src/cfe_assert_runner.c): `modules/cfe_assert/src/cfe_assert_runner.c`

### Test Support

- [Test Case Support](https://github.com/nasa/cfe/blob/dev/modules/cfe_testcase/src/cfe_test_table.c): `modules/cfe_testcase/src/cfe_test_table.c`

### Other components

- **Flight Application**
- **OSAL / PSP**

## Connections

- Flight Application → cFE APIs: uses APIs
- cFE APIs → Executive Service: accesses (evidence: `modules/es/fsw/src/cfe_es_task.c`)
- cFE APIs → Message Service: accesses (evidence: `modules/msg/fsw/src/cfe_msg_ccsdspri.c`)
- cFE APIs → Software Bus: accesses
- cFE APIs → Event Service: accesses (evidence: `modules/evs/fsw/src/cfe_evs_task.c`)
- cFE APIs → File Service: accesses
- cFE APIs → Table Service: accesses (evidence: `modules/tbl/fsw/src/cfe_tbl_task_cmds.c`)
- cFE APIs → Time Service: accesses
- Flight Application → Telemetry Assist: uses
- Executive Service → OSAL / PSP: depends on
- Software Bus → Bus Routing: routes through
- Table Service → File Service: uses
- Flight Application → Assertions: may use
- Flight Application → Test Case Support: may use
