135 lines
5.3 KiB
Markdown
135 lines
5.3 KiB
Markdown
---
|
|
source_files:
|
|
- Common/DTS.Common.Serialization/DDAS (Chrysler)/ChannelDefinition.h
|
|
- Common/DTS.Common.Serialization/DDAS (Chrysler)/DDASTestDefinition.h
|
|
- Common/DTS.Common.Serialization/DDAS (Chrysler)/DataFloat.h
|
|
- Common/DTS.Common.Serialization/DDAS (Chrysler)/DDAS.File.cs
|
|
- Common/DTS.Common.Serialization/DDAS (Chrysler)/DDASTest.cs
|
|
- Common/DTS.Common.Serialization/DDAS (Chrysler)/DDAS.File.Writer.cs
|
|
- Common/DTS.Common.Serialization/DDAS (Chrysler)/TSVSettingsWindow.cs
|
|
- Common/DTS.Common.Serialization/DDAS (Chrysler)/TSVSettingsWindow.Designer.cs
|
|
- Common/DTS.Common.Serialization/DDAS (Chrysler)/DDASChannel.cs
|
|
generated_at: "2026-04-16T10:56:49.509276+00:00"
|
|
model: "zai-org/GLM-5-FP8"
|
|
schema_version: 1
|
|
sha256: "3efc64a6d144d6f5"
|
|
---
|
|
|
|
# DDAS Serialization Module Documentation
|
|
|
|
## 1. Purpose
|
|
|
|
This module provides serialization support for the DDAS (DaimlerChrysler Data Acquisition System) file format, enabling reading and writing of test configuration and channel data. It bridges legacy C++ data structures (CHANNEL, FILEINFOBLOCK, TESTINFO, etc.) with a modern C# serialization framework, supporting export of test data including channel metadata, transducer information, and floating-point sample data to the proprietary DDAS ".ddas" and ".fpd" file formats.
|
|
|
|
---
|
|
|
|
## 2. Public Interface
|
|
|
|
### C++ Structures (ChannelDefinition.h)
|
|
|
|
**`CHANNEL` / `PCHANNEL` / `PCHAN`** - Channel definition structure:
|
|
| Field | Type | Description |
|
|
|-------|------|-------------|
|
|
| `Size` | `short` | Size of this object |
|
|
| `Flags` | `short` | Channel flags |
|
|
| `Name` | `char[64]` | Channel name |
|
|
| `Sign` | `char[8]` | Sign (+, -, or blank) |
|
|
| `Axis` | `char[8]` | Axis (X,Y,Z,FX,MX,AX,...) |
|
|
| `FilterFreq` | `float` | Channel filter class (Hz) |
|
|
| `SetGain` | `float` | Gain setting (1-n) |
|
|
| `ActGain` | `float` | Actual (measured) gain |
|
|
| `Rcal` | `float` | Shunt calibration resistance |
|
|
| `Excitation` | `float` | Excitation voltage (programmable) |
|
|
| `byteSpares` | `byte[4]` | Spare bytes (was CalDate) |
|
|
| `Transducer` | `TRANSDUCER` | Snapshot of transducer values |
|
|
|
|
**Channel Macros:**
|
|
- `ISCHANACTIVE(pChan)` - Returns 1 if channel active flag is set
|
|
- `SETCHANACTIVE(pChan)` - Sets channel active flag
|
|
- `CLRCHANACTIVE(pChan)` - Clears channel active flag
|
|
|
|
**Enumerations:**
|
|
- `ChannelFlags { CHANFLAG_ACTIVE }`
|
|
|
|
---
|
|
|
|
### C++ Structures (DDASTestDefinition.h)
|
|
|
|
**`FILEINFOBLOCK`** - File metadata:
|
|
| Field | Type | Description |
|
|
|-------|------|-------------|
|
|
| `Size` | `UINT` | Block size including Size |
|
|
| `FileTypeName` | `char[12]` | Software type name |
|
|
| `FileTypeVers` | `char[12]` | File version name |
|
|
| `FileTypeFlags` | `UINT` | Hardware type (upper 16 bits), File type (lower 16 bits) |
|
|
| `CreatedByName` | `char[16]` | Creator T-number |
|
|
| `UpdatedByName` | `char[16]` | Updater T-number |
|
|
|
|
**`DATASYSTEMBLOCK`** - Data system configuration:
|
|
| Field | Type | Description |
|
|
|-------|------|-------------|
|
|
| `Size` | `UINT` | Block size |
|
|
| `NumberOfSystems` | `UINT` | Number of systems |
|
|
| `ChannelsPerSystem` | `UINT` | Channels per system |
|
|
| `MaxSampleRate` | `UINT` | Max/default sample rate |
|
|
| `SizeOfConfig` | `UINT` | Size of DDASCONFIGBLOCK |
|
|
|
|
**`DDASCONFIGBLOCK`** - Per-system configuration:
|
|
| Field | Type | Description |
|
|
|-------|------|-------------|
|
|
| `Size` | `UINT` | Block size |
|
|
| `AnalogUnitNo` | `short` | DDAS analog unit number |
|
|
| `AnalogOptions` | `short` | Analog unit options |
|
|
| `MemoryUnitNo` | `short` | DDAS memory unit number |
|
|
| `MemoryOptions` | `short` | Memory unit options |
|
|
| `MemorySize` | `long` | Memory unit RAM (bytes) |
|
|
|
|
**`ACQUISITIONBLOCK`** - Acquisition parameters:
|
|
| Field | Type | Description |
|
|
|-------|------|-------------|
|
|
| `nSize` | `long` | Block size |
|
|
| `nRecordMode` | `long` | Record mode (RECORDMODE_EVENT or RECORDMODE_TAPE) |
|
|
| `SampleRate` | `long` | Samples per second |
|
|
| `TotalSamples` | `long` | Total samples in record |
|
|
| `PreEventSamples` | `long` | Pre-event samples (Event mode only) |
|
|
| `TapeModeChannels` | `long` | Number of channels (Tape mode only) |
|
|
| `nTrigBlock` | `long` | Number of trigger entries |
|
|
|
|
**`TRIGCHANDEF`** - Trigger channel definition:
|
|
| Field | Type | Description |
|
|
|-------|------|-------------|
|
|
| `ChanNo` | `BYTE` | Channel number for trigger |
|
|
| `LevelPct` | `BYTE` | Trigger level % full scale (0=off) |
|
|
|
|
**`TRIGCHANBLOCK`** - Trigger channel block:
|
|
| Field | Type | Description |
|
|
|-------|------|-------------|
|
|
| `SizeBlock` | `unsigned short` | Block size in bytes |
|
|
| `NumTrigs` | `unsigned short` | Number of trigger entries |
|
|
| `TrigChan` | `TRIGCHANDEF[MAXTRIGCHANS]` | Channel trigger array |
|
|
|
|
**Enumerations:**
|
|
- `FileTypeFlags { FILETYPE_IMPORTED4X }`
|
|
- `HardwareType { HWTYPE_UNKNOWN, HWTYPE_DDAS3, HWTYPE_KAYSERTHREDE, HWTYPE_COUNT }`
|
|
- `AnalogOptionFlags { ANAOPT_CHANTRIGGERS }`
|
|
- `MemoryOptionFlags { MEMOPT_TAPEMODE, MEMOPT_PREEVENT, MEMOPT_PREEVENTXXX }`
|
|
- `RecordModes { RECORDMODE_EVENT, RECORDMODE_TAPE }`
|
|
|
|
**Constants:**
|
|
- `MAXTRIGCHANS = 4`
|
|
- `TRIGCHANDSBL = 0x80`
|
|
- `TESTDEFEXT = ".tdf"`
|
|
- `DDASTYPENAME = "DDAS V5"`
|
|
- `DDASFILEVERS = "Ver 500"`
|
|
|
|
---
|
|
|
|
### C++ Structures (DataFloat.h)
|
|
|
|
**`TESTINFO`** - Test information:
|
|
| Field | Type | Description |
|
|
|-------|------|-------------|
|
|
| `Size` | `unsigned long` | Block size |
|
|
| `DeviceID` | `unsigned long` | DAQ device ID |
|
|
| `ChannelNo` | `long` | Channel number (1-32) |
|
|
| `SampleRate` | `long |