Files
2026-04-17 14:55:32 -04:00

13 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-16T10:56:49.501225+00:00 zai-org/GLM-5-FP8 1 289fd9f58c0583bc

DDAS (Chrysler) Serialization Module Documentation

1. Purpose

This module provides data structures and utility classes for serializing and deserializing DDAS (Dynamic Data Acquisition System) test configuration and floating-point data files used in Chrysler/DaimlerChrysler automotive testing. It defines the binary file formats for test definitions (.tdf files), floating-point data files (.fpd files), and supporting structures for channel configuration, transducer definitions, and file path manipulation. The module serves as the bridge between legacy DDAS hardware configurations and the software systems that process crash test and sensor data.


2. Public Interface

ChannelDefinition.h

Enumerations

  • ChannelFlags — Contains CHANFLAG_ACTIVE for channel active state flagging.

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) — 128+ byte 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 Aliases

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

FilePath.h

Constants

  • PATHLENMAX — Maximum path length allowed (300 characters)

Enumerations

  • FileSpecOK — Bitmask flags for file specification validation:
    • 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() — Destructor
  • void operator=(const CFilePath &src) — Assignment operator
  • int SetFullFilePathAndName(char* szPathAndName) — Set complete file path
  • int SetDriveOrResource(char *szNewDrive, int* nNext) — Set drive or network resource
  • int SetDrive(int nDriveAis1) — Set drive number (A=1)
  • int SetDir(char *szNewDir, int* nNext) — Set directory path
  • int SetFile(char *szNewFile, int *nNext) — Set file name
  • int SetExtension(char *szNewExt) — Set file extension
  • int ParseFilePathAndName(char *szPathAndName) — Parse full path into components
  • const char* GetFullFilePathAndName() — Retrieve complete path
  • const char* GetFileName() — Retrieve file name
  • const CString GetFileNameExt() — Retrieve file name with extension
  • const char* GetFileExtension() — Retrieve extension
  • BOOL FileExists() — Check if file exists
  • bool IsPathComplete(int *pFlgValid) — Check if path is complete
  • bool IsFileType(char *szFileTypeExt) — Check file type by extension
  • bool IsFileValid(const char* szFileSpec, const char *szFileTypeExt, CString* pcsError) — Validate file specification
  • bool IsAllValidChars(char* szInString, int* pnPosBad) — Validate characters in string
  • void Clear() — Reset all path components

DDASTestDefinition.h

Constants

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

Enumerations

  • FileTypeFlagsFILETYPE_IMPORTED4X for tests imported from 4.x format
  • HardwareType — Hardware identifiers: HWTYPE_UNKNOWN, HWTYPE_DDAS3, HWTYPE_KAYSERTHREDE, HWTYPE_COUNT
  • AnalogOptionFlagsANAOPT_CHANTRIGGERS for analog unit channel triggers
  • MemoryOptionFlagsMEMOPT_TAPEMODE, MEMOPT_PREEVENT, MEMOPT_PREEVENTXXX
  • RecordModesRECORDMODE_EVENT, RECORDMODE_TAPE

Structures

  • FILEINFOBLOCK — File metadata (size, type name, version, flags, creator/updater names)
  • DATASYSTEMBLOCK — System configuration (number of systems, channels per system, max sample rate, config block size)
  • DDASCONFIGBLOCK — Per-system configuration (analog/memory unit numbers, options, memory size)
  • ACQUISITIONBLOCK — Data acquisition parameters (record mode, sample rate, total samples, pre-event samples, tape mode channels, trigger block count)
  • TRIGCHANDEF — Channel trigger definition (ChanNo, LevelPct)
  • TRIGCHANBLOCK — Trigger channel block (size, count, array of TRIGCHANDEF)

DataFloat.h

Constants

  • TESTPATHSIZE — 128 (if not already defined)
  • FILEERROR — -1
  • FLOATDATANAME — "DDAS FlPt"
  • FLOATDATARAW — "DDAS fpRAW"
  • FLOATDATAVER — "Ver 500"
  • RawExt — ".raw"
  • FlPtExt — ".fpd"

Enumerations

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

Structures

  • TESTINFO — Test metadata (device ID, channel number, sample rate, total samples, pre-event samples, channel number in system, calibration points, test creation path, time axis title, spare bytes)
  • FILEHEADER — File header containing FILEINFOBLOCK, TESTINFO, CHANNEL, and 32 spare bytes
  • DATAPEAK — Peak data (Min, Xmin, Max, Xmax)
  • DATAHIST — Histogram data (fVal, nOccurrences)

Class CDataFloat

Public methods:

  • CDataFloat() — Default constructor
  • CDataFloat(unsigned int nSize) — Constructor with initial size
  • virtual ~CDataFloat() — Destructor
  • void operator=(const CDataFloat &src) — Assignment operator
  • bool SetSize(long lNumberElements) — Resize data array
  • long GetSize() — Get array size
  • bool SetIndexToStart() — Reset buffer pointer to start
  • bool StoreDataNext(float fData) — Store next data value
  • bool GetDataNext(float* fData) — Retrieve next data value
  • float* GetDataBuffer() — Get pointer to data buffer
  • CArray<float, float&>* GetDataArray() — Get reference to data array
  • int AppendArrayFloat(CArray<float, float&>* srcArray) — Append data from another array
  • bool ReadFromFile(const char *lpFilename) — Read data from file
  • bool WriteToFile(const char *lpFilename, bool bPrint) — Write data to file
  • FILEHEADER* GetFileHeader() — Get file header structure
  • FILEINFOBLOCK* GetFileInfo() — Get file info block
  • TESTINFO* GetTestInfo() — Get test info structure
  • CHANNEL* GetChannel() — Get channel definition
  • int GetChannelNumber() — Get channel number
  • int GetChannelNumberInBox() — Get channel number in box/system
  • long GetSampleRate() — Get sample rate
  • int GetEventOffset() — Get event offset
  • float GetStartTime(bool bmSec) — Get start time (seconds or milliseconds)
  • float GetStopTime(bool bmSec) — Get stop time
  • float GetStartTimeData(bool bmSec) — Get data start time
  • float GetStopTimeData(bool bmSec) — Get data stop time
  • int ConvertTimeToIndex(float fTime) — Convert time to array index
  • float ConvertIndexToTime(int nIndex) — Convert index to time
  • int CalcSampIn3mSecInt() — Calculate samples in 3 milliseconds
  • bool GetTimeAtValue(float fValue, float *pTvalue) — Find time at which a value occurs
  • bool GetDataPeaks(...) — Multiple overloads for retrieving peak data
  • void SetChannelName(char* szNewChannelName) — Set channel name
  • void SetEngrgUnits(char *szNewEngrgUnits) — Set engineering units
  • bool VerifyAndCoerceAxis(bool bNegativeSign, const char* szAxis, BOOL bVerbose) — Validate and correct axis designation
  • int SetFilePathAndName(char* szNewFileSpec) — Set file path
  • const char* GetFilePathAndName() — Get file path
  • const char* GetFileTitle() — Get file title
  • const char* GetFileExt() — Get file extension
  • const CString GetFileName() — Get file name
  • CString GetDataSetName(CString &csName) — Get data set name
  • float GetFilterClass() — Get filter class
  • int ClearAll(long NewNumberElements) — Clear and resize array

Inner Class CDataFloat::CPeakList

  • void AddDataPoint(DATAHIST* pDHist) — Add data point to histogram
  • void Get3msMin(int nPtPer3ms, DATAHIST* pDHist) — Get 3ms minimum
  • void Get3msMax(int nPtPer3ms, DATAHIST* pDHist) — Get 3ms maximum
  • void RemoveAll() — Clear all entries

3. Invariants

Channel Definition

  • CHANNEL.Size must reflect the actual size of the structure for versioning/serialization compatibility.
  • byteSpares[4] in CHANNEL is fixed at 4 bytes; this was formerly CalDate (a time_t) and must not be repurposed without coordination with transducer date fields.

File Path

  • PATHLENMAX (300) is the maximum allowed path length.
  • CFilePath maintains separate string pointers for root, directory, name, and extension components.

Test Definition

  • FILEINFOBLOCK.FileTypeFlags encodes hardware type in upper 16 bits and file type in lower 16 bits.
  • TRIGCHANDEF.ChanNo and LevelPct must both be non-zero, and TRIGCHANDSBL must not be set in LevelPct for a trigger to be enabled.
  • TRIGCHANBLOCK.TrigChan array is sized to MAXTRIGCHANS (4) but documented as variable-size in practice.
  • ACQUISITIONBLOCK.PreEventSamples is only valid in RECORDMODE_EVENT mode.
  • ACQUISITIONBLOCK.TapeModeChannels is only valid in RECORDMODE_TAPE mode.

Data Float

  • FILEHEADER has a fixed 32-byte spare section at the end.
  • TESTINFO includes 2 spare bytes for 4-byte alignment.
  • FloatData array and pfBfr pointer must remain synchronized; SetIndexToStart() resets pfBfr to the beginning of FloatData.

4. Dependencies

This Module Depends On

  • TransducerDefinition.h — Required by ChannelDefinition.h for TRANSDUCER type (not provided in source).
  • <Afxtempl.h> — MFC template classes (CArray, CList) used in DataFloat.h.
  • MFC/ATLCString class used in FilePath.h and DataFloat.h.

Consumers (Inferred)

  • Any system reading or writing DDAS test definition files (.tdf).
  • Any system reading or writing DDAS floating-point data files (.fpd or .raw).
  • Crash test data analysis tools processing channel and transducer configurations.

5. Gotchas

Historical Artifacts

  1. Removed CalDate field: The CHANNEL structure formerly contained a time_t CalDate field. This was removed per revision on 11/08/04 and replaced with byteSpares[4]. The calibration date is now stored in the embedded TRANSDUCER structure. Code that assumes CalDate exists in CHANNEL will fail.

  2. Variable-size array pattern: TRIGCHANBLOCK.TrigChan is declared with MAXTRIGCHANS elements but comments indicate it "will be a variable size array." This suggests the binary format may contain fewer than 4 entries in actual files, and NumTrigs should be used to determine actual count.

Binary Format Considerations

  1. Alignment padding: TESTINFO includes SpareBytes[2] explicitly for 4-byte alignment. Modifying this structure requires maintaining alignment for binary compatibility.

  2. File version strings: Multiple version constants exist (DDASFILEVERS, FLOATDATAVER both equal "Ver 500"). These must match when reading/writing files.

  3. Hardware type encoding: FileTypeFlags in FILEINFOBLOCK uses a split 16/16 bit encoding. Direct comparison of this field without masking will produce incorrect results.

API Quirks

  1. Pointer-based buffer access: CDataFloat::GetDataBuffer() returns a raw pointer to internal data. The state of this pointer after SetSize() or ClearAll() calls is unclear from the source—callers should re-fetch after modifications.

  2. Multiple channel number methods: Both GetChannelNumber() and GetChannelNumberInBox() exist. The distinction between "channel number" and "channel number in system" is not fully explained in the source.

  3. Missing TransducerDefinition.h: The TRANSDUCER type is used but not defined in the provided sources. The size