Files
DP44/enriched-qwen3-coder-next/Common/DTS.Common.Serialization/DDAS (Chrysler)/FromChrysler.md
2026-04-17 14:55:32 -04:00

12 KiB

source_files, generated_at, model, schema_version, sha256
source_files generated_at model schema_version sha256
Common/DTS.Common.Serialization/DDAS (Chrysler)/FromChrysler/ChannelDefinition.h
Common/DTS.Common.Serialization/DDAS (Chrysler)/FromChrysler/FilePath.h
Common/DTS.Common.Serialization/DDAS (Chrysler)/FromChrysler/DDASTestDefinition.h
Common/DTS.Common.Serialization/DDAS (Chrysler)/FromChrysler/DataFloat.h
2026-04-16T13:34:29.272087+00:00 zai-org/GLM-5-FP8 1 289fd9f58c0583bc

DDAS Serialization Module Documentation

1. Purpose

This module provides data structures and classes for the DDAS (DaimlerChrysler Data Acquisition System) proprietary file format serialization. It defines binary file layouts for test definitions, channel configurations, transducer definitions, and floating-point data storage used in automotive crash testing applications. The module enables reading, writing, and manipulation of DDAS test files (.tdf, .fpd, .raw extensions) and provides utilities for file path handling, peak detection, and data analysis.


2. Public Interface

ChannelDefinition.h

Enumerations

  • ChannelFlags — Channel flag values with single member CHANFLAG_ACTIVE

Macros

  • ISCHANACTIVE(pChan) — Returns 1 if channel active flag is set, 0 otherwise
  • SETCHANACTIVE(pChan) — Sets the channel active flag
  • CLRCHANACTIVE(pChan) — Clears the channel active flag

Structures

  • CHANNEL (typedef tagCHANNEL) — Main channel data structure containing:
    • short Size — Size of this object
    • short Flags — Channel flags
    • char Name[64] — Channel name
    • char Sign[8] — Sign (+, -, or blank)
    • char Axis[8] — Axis identifier (X, Y, Z, FX, MX, AX, etc.)
    • float FilterFreq — Filter frequency in Hz
    • float SetGain — Gain setting (1-n)
    • float ActGain — Actual/measured gain setting
    • float Rcal — Shunt calibration resistance
    • float Excitation — Excitation voltage (when programmable)
    • byte byteSpares[4] — Spare bytes (formerly CalDate)
    • TRANSDUCER Transducer — Snapshot of transducer values

Type Definitions

  • PCHANNEL — Pointer to CHANNEL
  • PCHAN — Alias for PCHANNEL

FilePath.h

Constants

  • PATHLENMAX — Maximum path length allowed (300)

Enumerations

  • FileSpecOK — File specification validation flags:
    • FSPEC_EXTOK = 0x1 — File extension valid
    • FSPEC_NAMEOK = 0x2 — File name valid
    • FSPEC_PATHOK = 0x4 — File path valid
    • FSPEC_ROOTOK = 0x8 — Drive or computer valid
    • FSPEC_RELATIVEPATH = 0x10 — Path is relative

Class CFilePath

Public Methods:

  • CFilePath() — Default constructor
  • virtual ~CFilePath() — Virtual destructor
  • void operator=(const CFilePath &src) — Assignment operator
  • int SetDrive(int nDriveAis1) — Sets drive where A=1
  • int SetDriveOrResource(char *szNewDrive, int* nNext) — Sets drive or network resource
  • int SetDir(char *szNewDir, int* nNext) — Sets directory path
  • int SetFile(char *szNewFile, int *nNext) — Sets filename
  • int SetExtension(char *szNewExt) — Sets file extension
  • int SetFullFilePathAndName(char* szPathAndName) — Sets complete path from string
  • int ParseFilePathAndName(char *szPathAndName) — Parses path and name into components
  • const char* GetFullFilePathAndName() — Returns complete path string
  • const char* GetFileName() — Returns filename without extension
  • const char* GetFileExtension() — Returns file extension
  • const CString GetFileNameExt() — Returns filename with extension
  • BOOL FileExists() — Tests if file exists
  • bool IsFileType(char *szFileTypeExt) — Checks if extension matches
  • bool IsPathComplete(int *pFlgValid) — Checks if path is complete
  • bool IsAllValidChars(char* szInString, int* pnPosBad) — Validates characters in string
  • bool IsFileValid(const char* szFileSpec, const char *szFileTypeExt, CString* pcsError) — Validates file specification
  • void Clear() — Clears all path components

DDASTestDefinition.h

Constants

  • TESTDEFEXT — Test definition file extension (".tdf")
  • DDASTYPENAME — Software type name ("DDAS V5")
  • DDASFILEVERS — File version ("Ver 500")
  • MAXTRIGCHANS — Maximum trigger channels (4)
  • TRIGCHANDSBL — Trigger channel disable flag (0x80)

Enumerations

  • FileTypeFlags — File type flags with FILETYPE_IMPORTED4X
  • HardwareType — Hardware types: HWTYPE_UNKNOWN, HWTYPE_DDAS3, HWTYPE_KAYSERTHREDE, HWTYPE_COUNT
  • AnalogOptionFlagsANAOPT_CHANTRIGGERS for channel trigger support
  • MemoryOptionFlagsMEMOPT_TAPEMODE, MEMOPT_PREEVENT, MEMOPT_PREEVENTXXX
  • RecordModesRECORDMODE_EVENT, RECORDMODE_TAPE

Structures

  • FILEINFOBLOCK — File metadata:

    • UINT Size — Block size including Size field
    • char FileTypeName[12] — Software type name
    • char FileTypeVers[12] — File version
    • UINT FileTypeFlags — Hardware type (upper 16 bits) and file type (lower 16 bits)
    • char CreatedByName[16] — Creator T-number
    • char UpdatedByName[16] — Updater T-number
  • DATASYSTEMBLOCK — Data system configuration:

    • UINT Size — Block size
    • UINT NumberOfSystems — Number of systems
    • UINT ChannelsPerSystem — Channels per system
    • UINT MaxSampleRate — Maximum/default sample rate
    • UINT SizeOfConfig — Size of one DDASCONFIGBLOCK
  • DDASCONFIGBLOCK — Per-system configuration:

    • UINT Size — Block size
    • short AnalogUnitNo — Analog unit number
    • short AnalogOptions — Analog unit options
    • short MemoryUnitNo — Memory unit number
    • short MemoryOptions — Memory unit options
    • long MemorySize — Memory unit RAM in bytes
  • ACQUISITIONBLOCK — Data acquisition parameters:

    • long nSize — Block size
    • long nRecordMode — Record mode (from RecordModes enum)
    • long SampleRate — Samples per second
    • long TotalSamples — Total samples in record
    • long PreEventSamples — Pre-event samples (event mode only)
    • long TapeModeChannels — Channel count (tape mode only)
    • long nTrigBlock — Number of trigger entries (can be 0)
  • TRIGCHANDEF — Channel trigger definition:

    • BYTE ChanNo — Channel number for trigger
    • BYTE LevelPct — Trigger level as % full scale (0=off, 0x80=disabled)
  • TRIGCHANBLOCK — Trigger channel collection:

    • unsigned short SizeBlock — Block size in bytes
    • unsigned short NumTrigs — Number of trigger entries
    • TRIGCHANDEF TrigChan[MAXTRIGCHANS] — Trigger definitions array

DataFloat.h

Constants

  • TESTPATHSIZE — Test path size (128)
  • FILEERROR — File I/O error code (-1)
  • FLOATDATANAME — Float data file type ("DDAS FlPt")
  • FLOATDATARAW — Raw float data type ("DDAS fpRAW")
  • FLOATDATAVER — Float data version ("Ver 500")
  • RawExt — Raw data extension (".raw")
  • FlPtExt — Floating point data extension (".fpd")

Enumerations

  • FileTypesUNKNOWN, FLOATPOINT, PROCESSED
  • PeakTypesPEAKS_MINMAX, PEAKS_3MSCONTIN, PEAKS_3MSCUMUL
  • FPDVerbosityFPD_SILENT, FPD_ERRORS, FPD_STATUS, FPD_RESULTS, FPD_VERBOSE

Structures

  • TESTINFO — Test information block:

    • unsigned long Size — Block size
    • unsigned long DeviceID — DAQ device ID
    • long ChannelNo — Channel number (1-32)
    • long SampleRate — Samples per second
    • long TotalSamples — Total samples in record
    • long PreEventSamples — Samples before event
    • short ChanNumInSys — Channel number in system (1-128)
    • short NumPreCalPts — Pre-calibration points
    • short NumPostCalPts — Post-calibration points
    • char TestCreation[TESTPATHSIZE] — Test path and date
    • char TimeAxisTitle[32] — Time axis title
    • byte SpareBytes[2] — Alignment spares
  • FILEHEADER — Complete file header:

    • FILEINFOBLOCK FileInfo — File information
    • TESTINFO TestInfo — Test information
    • CHANNEL Channel — Channel definition
    • byte SpareBytes[32] — 32 spare bytes
  • DATAPEAK — Peak value structure:

    • float Min — Minimum value
    • short Xmin — Minimum X index
    • float Max — Maximum value
    • short Xmax — Maximum X index
  • DATAHIST — Histogram data:

    • float fVal — Data value
    • int nOccurrences — Occurrence count

Class CDataFloat

Constructors/Destructor:

  • CDataFloat() — Default constructor
  • CDataFloat(unsigned int nSize) — Constructor with initial size
  • virtual ~CDataFloat() — Virtual destructor

Assignment:

  • void operator=(const CDataFloat &src) — Assignment operator

File Operations:

  • bool ReadFromFile(const char *lpFilename) — Reads data from file
  • bool WriteToFile(const char *lpFilename, bool bPrint) — Writes data to file
  • int SetFilePathAndName(char* szNewFileSpec) — Sets file path
  • const char* GetFilePathAndName() — Returns file path and name
  • const CString GetFileName() — Returns filename
  • const char* GetFileTitle() — Returns file title
  • const char* GetFileExt() — Returns file extension

Data Access:

  • long GetSize() — Returns number of data elements
  • bool SetSize(long lNumberElements) — Resizes data array
  • int ClearAll(long NewNumberElements) — Clears and resizes
  • float* GetDataBuffer() — Returns pointer to data buffer
  • CArray<float, float&>* GetDataArray() — Returns data array pointer
  • int AppendArrayFloat(CArray<float, float&>* srcArray) — Appends data from array
  • bool StoreDataNext(float fData) — Stores next data value
  • bool GetDataNext(float* fData) — Gets next data value
  • bool SetIndexToStart() — Resets data index to start

Header/Info Access:

  • FILEHEADER* GetFileHeader() — Returns file header pointer
  • FILEINFOBLOCK* GetFileInfo() — Returns file info block
  • TESTINFO* GetTestInfo() — Returns test info block
  • CHANNEL* GetChannel() — Returns channel definition

Channel Properties:

  • int GetChannelNumber() — Returns channel number
  • int GetChannelNumberInBox() — Returns channel number in box
  • void SetChannelName(char* szNewChannelName) — Sets channel name
  • void SetEngrgUnits(char *szNewEngrgUnits) — Sets engineering units
  • float GetFilterClass() — Returns filter class
  • bool VerifyAndCoerceAxis(bool bNegativeSign, const char* szAxis, BOOL bVerbose) — Validates axis

Time/Index Conversion:

  • float ConvertIndexToTime(int nIndex) — Converts index to time
  • int ConvertTimeToIndex(float fTime) — Converts time to index
  • int CalcSampIn3mSecInt() — Calculates samples in 3ms
  • float GetStartTime(bool bmSec) — Returns start time
  • float GetStartTimeData(bool bmSec) — Returns data start time
  • float GetStopTime(bool bmSec) — Returns stop time
  • float GetStopTimeData(bool bmSec) — Returns data stop time
  • int GetEventOffset() — Returns event offset
  • bool GetTimeAtValue(float fValue, float *pTvalue) — Finds time at given value

Peak Analysis:

  • bool GetDataPeaks(int nPkType, int nVerbose, float* pTMin, float* pDMin, float* pTMax, float* pDMax) — Gets peak data (time/value)
  • bool GetDataPeaks(int nPkType, int nVerbose, float* pTStart, float* pTEnd, float* pTMin, float* pDMin, float* pTMax, float* pDMax) — Gets peak data with range
  • bool GetDataPeaks(int nPkType, int nVerbose, int *pXMin, float *pTMin, float *pDMin, int *pXMax, float *pTMax, float *pDMax) — Gets peak data with indices

Other:

  • long GetSampleRate() — Returns sample rate
  • CString GetDataSetName(CString &csName) — Returns dataset name

Nested Class CDataFloat::CPeakList

  • void RemoveAll() — Clears histogram list
  • void AddDataPoint(DATAHIST* pDHist) — Adds data point to histogram
  • void Get3msMin(int nPtPer3ms, DATAHIST* pDHist) — Gets 3ms minimum
  • void Get3msMax(int nPtPer3ms, DATAHIST* pDHist) — Gets 3ms maximum

3. Invariants

Size