# theprocyon/wdf2csv architecture

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

- Interactive diagram: https://gitdiagram.com/theprocyon/wdf2csv
- Repository: https://github.com/theprocyon/wdf2csv

## Overview

##### Main Components

a. User Interface Layer:
- Windows Forms Application (indicated by Form.cs and Form.Designer.cs)
- This as the top-level component that users interact with

b. Core Conversion Engine:
- WDFAPI.cs (main conversion logic interface)
- This as the central processing component

c. Device-Specific Libraries:
- Multiple Yokogawa device support libraries (DL350, DL850E, DL950, etc.)
- As a collection of supporting components

**[Windows Forms UI]**
- ↓
- [WDFAPI Layer]
- ↓
**[Device Libraries Layer]**

##### Component Details

a. UI Layer (Blue):
- Sub-components for file selection and conversion controls

b. API Layer (Green):
- Connections to both UI and device libraries
- Data transformation flow

c. Device Libraries (Yellow):
- Device-specific libraries (DL350, DL850E, etc.)
- Them as parallel components
- Both x86 and x64 support indication

##### Data Flow Indicators

- Input: .wdf file → UI → WDFAPI
- Processing: WDFAPI ↔ Device Libraries
- Output: WDFAPI → UI → .csv file

##### Additional Details

- File format symbols
- Architecture indicators
- Flow direction meanings

Remember to include version/platform indicators:
- x86/x64 support
- Supported device models
- File format specifications

This will create a comprehensive yet clear representation of the WDF2CSV converter's architecture that effectively communicates both its simplicity of purpose and its technical sophistication in supporting multiple Yokogawa devices.

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph UI["User Interface Layer"]
        WinForm["Windows Forms Interface"]
        FileSelect["File Selection Controls"]
        ConvControls["Conversion Controls"]
        WinForm --> FileSelect
        WinForm --> ConvControls
    end

    subgraph Core["Core Processing Layer"]
        WDFAPI["WDF API Interface"]
        Program["Program Entry Point"]
        DataProcess["Data Processing"]
        WaveformParse["Waveform Parsing"]
        HeaderExtract["Header Extraction"]
        DataFormat["Data Formatting"]
        
        WDFAPI --> DataProcess
        DataProcess --> WaveformParse
        DataProcess --> HeaderExtract
        WaveformParse --> DataFormat
        HeaderExtract --> DataFormat
    end

    subgraph DeviceLib["Device Libraries"]
        subgraph x86["x86 Libraries"]
            DL350_x86["DL350"]
            DL850E_x86["DL850E"]
            DL950_x86["DL950"]
            DLM3000_x86["DLM3000"]
            DLM5000_x86["DLM5000"]
            DLM5000HD_x86["DLM5000HD"]
            XVWDF_x86["XVWDF"]
        end

        subgraph x64["x64 Libraries"]
            DL350_x64["DL350"]
            DL850E_x64["DL850E"]
            DL950_x64["DL950"]
            DLM3000_x64["DLM3000"]
            DLM5000_x64["DLM5000"]
            DLM5000HD_x64["DLM5000HD"]
            XVWDF_x64["XVWDF"]
        end
    end

    WDFFile[".wdf File"]:::file
    CSVFile[".csv File"]:::file

    WDFFile --> FileSelect
    FileSelect --> WDFAPI
    DataFormat --> ConvControls
    ConvControls --> CSVFile

    WDFAPI <--> x86
    WDFAPI <--> x64

    click WinForm "https://github.com/Theprocyon/wdf2csv/blob/master/Form.cs"
    click WDFAPI "https://github.com/Theprocyon/wdf2csv/blob/master/WDFAPI.cs"
    click Program "https://github.com/Theprocyon/wdf2csv/blob/master/Program.cs"
    click DL350_x86 "https://github.com/Theprocyon/wdf2csv/blob/master/lib/DL350.lib"
    click DL850E_x86 "https://github.com/Theprocyon/wdf2csv/blob/master/lib/DL850E.lib"
    click DL950_x86 "https://github.com/Theprocyon/wdf2csv/blob/master/lib/DL950.lib"
    click DLM3000_x86 "https://github.com/Theprocyon/wdf2csv/blob/master/lib/DLM3000.lib"
    click DLM5000_x86 "https://github.com/Theprocyon/wdf2csv/blob/master/lib/DLM5000.lib"
    click DLM5000HD_x86 "https://github.com/Theprocyon/wdf2csv/blob/master/lib/DLM5000HD.lib"
    click XVWDF_x86 "https://github.com/Theprocyon/wdf2csv/blob/master/lib/XVWDF.lib"
    click DL350_x64 "https://github.com/Theprocyon/wdf2csv/blob/master/lib/x64/DL350.lib"
    click DL850E_x64 "https://github.com/Theprocyon/wdf2csv/blob/master/lib/x64/DL850E.lib"
    click DL950_x64 "https://github.com/Theprocyon/wdf2csv/blob/master/lib/x64/DL950.lib"
    click DLM3000_x64 "https://github.com/Theprocyon/wdf2csv/blob/master/lib/x64/DLM3000.lib"
    click DLM5000_x64 "https://github.com/Theprocyon/wdf2csv/blob/master/lib/x64/DLM5000.lib"
    click DLM5000HD_x64 "https://github.com/Theprocyon/wdf2csv/blob/master/lib/x64/DLM5000HD.lib"
    click XVWDF_x64 "https://github.com/Theprocyon/wdf2csv/blob/master/lib/x64/XVWDF.lib"

    classDef ui fill:#a8d1f0,stroke:#333,stroke-width:2px;
    classDef core fill:#90EE90,stroke:#333,stroke-width:2px;
    classDef lib fill:#FFE5B4,stroke:#333,stroke-width:2px;
    classDef file fill:#E8E8E8,stroke:#333,stroke-width:2px;

    class WinForm,FileSelect,ConvControls ui;
    class WDFAPI,Program,DataProcess,WaveformParse,HeaderExtract,DataFormat core;
    class DL350_x86,DL850E_x86,DL950_x86,DLM3000_x86,DLM5000_x86,DLM5000HD_x86,XVWDF_x86,DL350_x64,DL850E_x64,DL950_x64,DLM3000_x64,DLM5000_x64,DLM5000HD_x64,XVWDF_x64 lib;
    class WDFFile,CSVFile file;
```
