# emanuelegiona/ns3-ext-process architecture

> Architecture diagram of the GitHub repository emanuelegiona/ns3-ext-process, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-01-03). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/emanuelegiona/ns3-ext-process
- Repository: https://github.com/emanuelegiona/ns3-ext-process

## Overview

##### Main Components

a) Core Components:
- ExternalProcess Module (Central Component)
- ns-3 Simulation Environment (Parent System)
- External Process Management System
- TCP Socket Communication Layer
- Process Watchdog Component

b) External Components:
- External Programs/Processes
- TCP Socket Interface
- Process Launcher System

##### Technical Details

Annotations for:
- TCP socket connections
- Process supervision mechanisms
- External process launch procedures
- Signal handling pathways

##### Implementation Notes

- Support for multiple parallel processes
- Blocking communication nature
- Process lifecycle states

- The module's integration with ns-3
- The clear separation between simulation and external processes
- The communication pathways
- The supervision mechanisms

- State indicators
- Component types

Remember to indicate the blocking nature of communications and the support for multiple parallel processes, as these are key characteristics of the module's design.

## Diagram (Mermaid)

```mermaid
graph TB
    %% Main Containers
    subgraph NS3["ns-3 Simulation Environment"]
        EPM["ExternalProcess Module"]:::core
        click EPM "https://github.com/emanuelegiona/ns3-ext-process/blob/main/ext-process/model/ext-process.cc"
        
        subgraph Communication["Communication Layer"]
            TCP["TCP Socket System"]:::comm
            SIG["Signal Handler"]:::control
        end
        
        subgraph Management["Process Management"]
            WD["Process Watchdog"]:::control
            PMS["Process Management System"]:::control
        end
    end
    
    subgraph External["External Environment"]
        PLS["Process Launcher System"]:::external
        click PLS "https://github.com/emanuelegiona/ns3-ext-process/blob/main/ext-process/launcher-py.sh"
        
        EPR["External Processes"]:::external
        click EPR "https://github.com/emanuelegiona/ns3-ext-process/blob/main/ext-process/echo.py"
        
        SOCK["Socket Interface"]:::comm
    end
    
    subgraph Support["Support Components"]
        TEST["Testing Framework"]:::support
        click TEST "https://github.com/emanuelegiona/ns3-ext-process/blob/main/ext-process/test/ext-process-test-suite.cc"
        
        DOC["Documentation"]:::support
        click DOC "https://github.com/emanuelegiona/ns3-ext-process/blob/main/ext-process/doc/ext-process.rst"
        
        CONF["Module Configuration"]:::support
        click CONF "https://github.com/emanuelegiona/ns3-ext-process/blob/main/ext-process/CMakeLists.txt"
        
        MAN["User Manual"]:::support
        click MAN "https://github.com/emanuelegiona/ns3-ext-process/tree/main/manual/"
    end
    
    %% Relationships
    EPM --> TCP
    TCP -.-> SOCK
    SOCK -.-> EPR
    EPM --> PMS
    PMS --> WD
    PMS --> PLS
    PLS --> EPR
    WD --> SIG
    SIG -.-> EPR
    
    %% Styling
    classDef core fill:#3498db,stroke:#2980b9,color:white
    classDef comm fill:#e67e22,stroke:#d35400,color:white
    classDef control fill:#9b59b6,stroke:#8e44ad,color:white
    classDef external fill:#2ecc71,stroke:#27ae60,color:white
    classDef support fill:#95a5a6,stroke:#7f8c8d,color:white
    
    %% Legend
    subgraph Legend
        L1["Core Components"]:::core
        L2["Communication Components"]:::comm
        L3["Control Components"]:::control
        L4["External Components"]:::external
        L5["Support Components"]:::support
    end
```
