Files
DP44/2026-04-15 Qwen3-Coder-Next-FP8 Engineering Assistant Information Requirements.md

383 lines
12 KiB
Markdown
Raw Normal View History

2026-04-17 14:55:32 -04:00
# Engineering Assistant: Information Requirements
## Executive Summary
To build a comprehensive chatbot/engineering assistant for your DataPRO project (DAS data acquisition system), you need to gather information across **4 main categories**: Source Code Documentation, Firmware, Schematics, and Domain-Specific Knowledge.
---
## 1. Source Code Documentation & Knowledge Base
### 1.1 API Documentation (HIGH PRIORITY)
**Purpose**: Enable the AI to understand how to use your code
**What to gather**:
- **Namespace: `DbAPI`** (DataPRO Database API - 375 lines)
- All database stored procedures with parameters
- Connection string formats and error codes
- Example usage patterns
- Database versioning strategy
- **Namespace: `DTS.DASLib.Service`** (IService - ~2000 lines)
- Hardware service interfaces (SLICE, TDAS, Ribeye, CANFD)
- ARM/Download/Realtime/Diagnostics action methods
- State machine transitions and triggers
- Callback mechanisms and event handling
- **Namespace: `DTS.Common`** (Common libraries - 19+ modules)
- Data models: Channel, Sensor, TestSetup, Group, Hardware
- Serialization formats: IRIG CH10, ISO, CSV, TDM, HDF5
- Calculation engines: Linearization, Filtering, Decimation
- Communication interfaces: USB, Ethernet, Serial, CAN
**Deliverables**:
- Complete API reference with method signatures
- Examples of common workflows (create test setup, arm hardware, download data)
- Architecture diagrams (modular composition, dependency injection flow)
### 1.2 Code Structure Documentation (MEDIUM PRIORITY)
**Purpose**: Help AI understand architectural decisions
**What to gather**:
- **Module Discovery System**: Prism DirectoryModuleCatalog behavior
- **Database Migration Pipeline**: DatabaseMigrator.cs logic
- **State Machine**: DASState, States.cs, Triggers.cs
- **Configuration System**: app.config with 699 lines of settings
**Key questions to document**:
- How do modules communicate (EventAggregator patterns)?
- What's the upgrade/downgrade path for database versions?
- How are hardware-specific differences handled (SLICE vs TDAS)?
- What's the partitioning between DataPRO (UI) vs IService (hardware logic)?
---
## 2. Firmware Documentation (HIGH PRIORITY)
### 2.1 SLICE Hardware Family
**Purpose**: Enable firmware-specific troubleshooting and configuration
**What to gather**:
- **SLICE 1.5, SLICE 2, SLICE 6, SLICE 6A, SLICE 6AIR**
- Protocol versions and compatibility matrix
- ADC specifications (resolution, sample rates, input ranges)
- Firmware update procedures
- Known firmware bugs and workarounds
- **SLICE PRO DB, SLICE PRO FD (CAN FD support)**
- CAN FD configuration parameters
- Timestamp synchronization mechanisms
- Memory management (data buffering)
- **SLICE Service Implementation** (`SLICE Service.cs` ~10 files)
- Arming sequences and timing
- Calibration procedures
- Real-time streaming protocols
- Trigger check implementations
**Key files to reference**:
- `DTS.Common.Serialization/IRIGCH10/` (data format specs)
- `IService/Classes/SLICEService/` (service implementations)
- `DASFactoryDb/` (device discovery logic)
### 2.2 TDAS (Test Data Acquisition System)
**Purpose**: Support TDAS-specific workflows
**What to gather**:
- TDAS module configuration
- Protocol differences from SLICE
- Firmware update procedures
- Specialized features (telemetry, external triggers)
### 2.3 PowerPRO & Ribeye
**Purpose**: Document specialized hardware support
**What to gather**:
- Power input monitoring capabilities
- Battery management features
- Ribeye command set
---
## 3. Schematics & Hardware Documentation (HIGH PRIORITY)
### 3.1 Hardware Architecture
**Purpose**: Enable hardware-level troubleshooting
**What to gather**:
- **Block Diagrams**:
- SLICE main board architecture
- Channel architecture (analog, digital, CAN, UART, Stream)
- Power distribution system
- Communication bus topology (USB hub, Ethernet switch)
- **Pinouts & Connectors**:
- J1-J? connector definitions
- analog input ranges and configurations
- digital I/O specifications
- CAN transceiver circuits
- **Hardware Module Details**:
- DAS (Data Acquisition System) modules
- TOM (Test Object Monitor) modules
- Sensor interface circuits
**Key areas to document**:
- Channel types (AnalogInput, AnalogOutput, DigitalInput, DigitalOutput, CAN, UART, Stream, Timestamp)
- Excitation voltage options (2V, 5V, 10V, auto)
- Shunt calibration circuitry
- Level trigger circuits
### 3.2 Sensor Interface Documentation
**Purpose**: Help users configure sensors correctly
**What to gather**:
- Sensor database formats (CSV, CS3, TDC, SIF, XML, MOD)
- Sensor configuration parameters:
- Sensitivity, range, excitation
- Filters (low-pass, high-pass, notch)
- Calibration coefficients
- Units and scaling
- Sensor compatibility matrix
---
## 4. Domain-Specific Knowledge (MEDIUM PRIORITY)
### 4.1 Testing Workflows
**Purpose**: Enable workflow guidance
**What to gather**:
- **Test Setup Creation**:
1. Define test object (what you're testing)
2. Add sensors (attach to test object)
3. Add hardware (DAS modules, TOM modules)
4. Configure channels (map sensors to hardware)
5. Set triggers (level triggers, time triggers)
6. Configure data export formats
- **Arming Sequences**:
- Pre-arm checks (diagnostics, voltage, temperature)
- TOM safety checks
- Clock synchronization
- Final arm confirmation
- **Data Collection**:
- Real-time monitoring options
- Data streaming modes
- Event detection
- **Post-Test**:
- Download procedures
- Export formats (Diadem, CSV, HDF5, ISO, TDM)
- Report generation
### 4.2 Configuration Settings (Critical - 699-line config file)
**Purpose**: Explain obscure but critical settings
**Key categories to document**:
- **Hardware Discovery**: Multicast auto-discovery, IP ranges
- **Real-time**: Polling intervals, optimization settings
- **Database**: Connection strings, logging levels
- **Export**: ISO compliance, CSV delimiters, file naming
- **Squib Fire**: Fire modes (CAP, CONSTANT), tolerance settings
- **Diagnostics**: Sample rates, filtering options
**Notable settings**:
- `LocalDbHost`: Database server location
- `RealtimeDelayBetweenPolls`: 4ms default
- `DiagnosticsSampleRateHz`: 10000 Hz
- `SampleRateAAFilterRatio`: 5 (anti-aliasing)
- `AllowedVoltageInsertionErrorPercent`: 1%
- `PowerAndBattery`: Battery monitoring settings
---
## 5. Error Handling & Troubleshooting (MEDIUM PRIORITY)
### 5.1 Common Error Codes
**What to gather**:
- `ErrorCodes.cs` definitions
- Database error codes (sp_ procedures)
- Hardware-specific error messages
- Connection timeout scenarios
### 5.2 Diagnostic Procedures
**What to gather**:
- Hardware discovery diagnostics
- Digital input diagnostics
- CAN diagnostics
- TCDiagnosticResult handling
- Squib resistance checks
---
## 6. Export & Integration Formats (LOW PRIORITY but important)
### 6.1 Supported Export Formats
**What to gather**:
- **IRIG CH10** (standard for test data)
- **ISO 17469** (automotive test data)
- **Diadem XML** (National Instruments)
- **CSV/TSV** (text formats)
- **HDF5** (hierarchical data)
- **TDM/TDMS** (NI test data)
### 6.2 External System Integration
**What to gather**:
- CANFD API integration
- Equipment exchange formats
- Third-party sensor import (CS3, TDC, EQX, SIF, XML)
---
## 7. Testing & Validation Data (MEDIUM PRIORITY)
### 7.1 Unit Tests
**What to gather**:
- Existing NUnit test suite (DatabaseUnitTesting, StateMachine.Tests, SensorDB.Test)
- Test data examples
- Expected output formats
- Regression test scenarios
### 7.2 Sample Test Setups
**What to gather**:
- Sample test configuration files
- Test setup templates (.tts files)
- Hardware configuration files
- Sensor databases
---
## 8. Installation & Deployment (LOW PRIORITY)
### 8.1 Installer Documentation
**What to gather**:
- InstallShield custom actions
- SQL LocalDB instance management
- Driver installation (WINUSB, HID)
- Licensing system (Portable.BouncyCastle, CoreCompat.Portable.Licensing)
### 8.2 Database Schema
**What to gather**:
- Database version table structure
- Stored procedure versions
- Migration scripts (473 SQL files in `DataPRO_sql/`)
- Indexes and performance optimizations
---
## 9. Performance Considerations (MEDIUM PRIORITY)
### 9.1 Known Performance Bottlenecks
**What to gather**:
- Large file handling (gcAllowVeryLargeObjects enabled)
- Database query optimization patterns
- Memory allocation patterns
- Real-time data buffering strategies
### 9.2 Configuration Optimization
**What to gather**:
- `MaxSamplesToFilter`: 100 million
- `ReceiveBufferSizeBytes`: 65536
- `SendBufferSizeBytes`: 65536
- Concurrent download settings
- Cache settings
---
## 10. Licensing & Compliance (LOW PRIORITY)
### 10.1 Licensing System
**What to gather**:
- License property structures
- Licensing API endpoint (`http://dtslicensing/`)
- Feature flags and entitlements
- Trial vs full license differences
### 10.2 Compliance Standards
**What to gather**:
- ISO 9001 requirements for test data
- Automotive industry standards (ASPICE, ISO 26262 if applicable)
- Data retention requirements
---
## Priority-Based Gathering Plan
### Phase 1 (Week 1-2): Core API Documentation
- [ ] Document DbAPI namespace
- [ ] Document DTS.DASLib.Service namespace
- [ ] Document DTS.Common core classes
- [ ] Create database schema documentation
### Phase 2 (Week 3-4): Hardware Documentation
- [ ] Document SLICE hardware family
- [ ] Document TDAS hardware
- [ ] Document PowerPRO & Ribeye
- [ ] Document sensor interfaces
### Phase 3 (Week 5-6): Workflows & Configuration
- [ ] Document testing workflows
- [ ] Document configuration system
- [ ] Document error handling
- [ ] Create troubleshooting guide
### Phase 4 (Week 7-8): Advanced Topics
- [ ] Document export formats
- [ ] Document test data
- [ ] Document performance tuning
- [ ] Document licensing
---
## Recommended Data Formats for Chatbot Training
### 1. Structured Documentation
- Markdown files with clear hierarchies
- YAML/JSON for configuration schemas
- CSV for lookup tables (error codes, hardware specifications)
### 2. Code Examples
- C# code snippets with comments
- SQL stored procedure examples
- Configuration file examples
### 3. Dialogue Patterns
- Common user questions
- Troubleshooting dialogues
- Configuration guidance conversations
### 4. Knowledge Graph
- Class relationships
- Hardware dependencies
- Workflow sequences
---
## Quick Start: First 10 Files to Document
1. **DataPRO/DbAPI/DbAPI.cs** (375 lines) - Database API entry point
2. **DataPRO/IService/Modules/SLICE Service/SLICE Service.cs** - Main hardware service
3. **DataPRO/DbAPI/Database/IDatabase.cs** - Database interface
4. **DataPRO/DbAPI/DAS/IDataRecorders.cs** - Hardware interface
5. **DataPRO/DbAPI/Sensors/ISensors.cs** - Sensor interface
6. **DataPRO/DbAPI/TestSetups/ITestSetups.cs** - Test setup interface
7. **Common/DTS.Common.DataModel/Classes/Enums.cs** - All enums
8. **Common/DTS.Common.DAS.Concepts/DAS/Channel/Channel.cs** - Channel model
9. **Common/DTS.Common.Serialization/IRIGCH10/TMATS/TMATS.cs** - IRIG format
10. **DataPRO/DataPRO/app.config** (699 lines) - Critical configuration
---
## Next Steps
Would you like me to:
1. **Create detailed documentation stubs** for the top 10 priority files?
2. **Generate SQL documentation** for the 473 database procedures?
3. **Build a knowledge base schema** for the chatbot?
4. **Extract and explain** a specific subsystem (e.g., SLICE arming sequence)?
5. **Create sample Q&A pairs** for common user scenarios?
Let me know which direction you'd like to take first, and I'll help you build out the engineering assistant's knowledge base!