13 KiB
source_files, generated_at, model, schema_version, sha256
| source_files | generated_at | model | schema_version | sha256 | ||||
|---|---|---|---|---|---|---|---|---|
|
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— ContainsCHANFLAG_ACTIVEfor 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(typedeftagCHANNEL) — 128+ byte structure containing:short Size— Size of this objectshort Flags— Channel flagschar Name[64]— Channel namechar Sign[8]— Sign (+, -, or blank)char Axis[8]— Axis identifier (X, Y, Z, FX, MX, AX, etc.)float FilterFreq— Filter frequency in Hzfloat SetGain— Gain setting (1 - n)float ActGain— Actual/measured gain settingfloat Rcal— Shunt calibration resistancefloat Excitation— Excitation voltage (when programmable)byte byteSpares[4]— Spare bytes (formerlyCalDate)TRANSDUCER Transducer— Snapshot of transducer values
Type Aliases
PCHANNEL— Pointer toCHANNELPCHAN— Alias forPCHANNEL
FilePath.h
Constants
PATHLENMAX— Maximum path length allowed (300 characters)
Enumerations
FileSpecOK— Bitmask flags for file specification validation:FSPEC_EXTOK = 0x1— File extension validFSPEC_NAMEOK = 0x2— File name validFSPEC_PATHOK = 0x4— File path validFSPEC_ROOTOK = 0x8— Drive or computer validFSPEC_RELATIVEPATH = 0x10— Path is relative
Class CFilePath
Public methods:
CFilePath()— Default constructorvirtual ~CFilePath()— Destructorvoid operator=(const CFilePath &src)— Assignment operatorint SetFullFilePathAndName(char* szPathAndName)— Set complete file pathint SetDriveOrResource(char *szNewDrive, int* nNext)— Set drive or network resourceint SetDrive(int nDriveAis1)— Set drive number (A=1)int SetDir(char *szNewDir, int* nNext)— Set directory pathint SetFile(char *szNewFile, int *nNext)— Set file nameint SetExtension(char *szNewExt)— Set file extensionint ParseFilePathAndName(char *szPathAndName)— Parse full path into componentsconst char* GetFullFilePathAndName()— Retrieve complete pathconst char* GetFileName()— Retrieve file nameconst CString GetFileNameExt()— Retrieve file name with extensionconst char* GetFileExtension()— Retrieve extensionBOOL FileExists()— Check if file existsbool IsPathComplete(int *pFlgValid)— Check if path is completebool IsFileType(char *szFileTypeExt)— Check file type by extensionbool IsFileValid(const char* szFileSpec, const char *szFileTypeExt, CString* pcsError)— Validate file specificationbool IsAllValidChars(char* szInString, int* pnPosBad)— Validate characters in stringvoid 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
FileTypeFlags—FILETYPE_IMPORTED4Xfor tests imported from 4.x formatHardwareType— Hardware identifiers:HWTYPE_UNKNOWN,HWTYPE_DDAS3,HWTYPE_KAYSERTHREDE,HWTYPE_COUNTAnalogOptionFlags—ANAOPT_CHANTRIGGERSfor analog unit channel triggersMemoryOptionFlags—MEMOPT_TAPEMODE,MEMOPT_PREEVENT,MEMOPT_PREEVENTXXXRecordModes—RECORDMODE_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 ofTRIGCHANDEF)
DataFloat.h
Constants
TESTPATHSIZE— 128 (if not already defined)FILEERROR— -1FLOATDATANAME— "DDAS FlPt"FLOATDATARAW— "DDAS fpRAW"FLOATDATAVER— "Ver 500"RawExt— ".raw"FlPtExt— ".fpd"
Enumerations
FileTypes—UNKNOWN,FLOATPOINT,PROCESSEDPeakTypes—PEAKS_MINMAX,PEAKS_3MSCONTIN,PEAKS_3MSCUMULFPDVerbosity—FPD_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 containingFILEINFOBLOCK,TESTINFO,CHANNEL, and 32 spare bytesDATAPEAK— Peak data (Min,Xmin,Max,Xmax)DATAHIST— Histogram data (fVal,nOccurrences)
Class CDataFloat
Public methods:
CDataFloat()— Default constructorCDataFloat(unsigned int nSize)— Constructor with initial sizevirtual ~CDataFloat()— Destructorvoid operator=(const CDataFloat &src)— Assignment operatorbool SetSize(long lNumberElements)— Resize data arraylong GetSize()— Get array sizebool SetIndexToStart()— Reset buffer pointer to startbool StoreDataNext(float fData)— Store next data valuebool GetDataNext(float* fData)— Retrieve next data valuefloat* GetDataBuffer()— Get pointer to data bufferCArray<float, float&>* GetDataArray()— Get reference to data arrayint AppendArrayFloat(CArray<float, float&>* srcArray)— Append data from another arraybool ReadFromFile(const char *lpFilename)— Read data from filebool WriteToFile(const char *lpFilename, bool bPrint)— Write data to fileFILEHEADER* GetFileHeader()— Get file header structureFILEINFOBLOCK* GetFileInfo()— Get file info blockTESTINFO* GetTestInfo()— Get test info structureCHANNEL* GetChannel()— Get channel definitionint GetChannelNumber()— Get channel numberint GetChannelNumberInBox()— Get channel number in box/systemlong GetSampleRate()— Get sample rateint GetEventOffset()— Get event offsetfloat GetStartTime(bool bmSec)— Get start time (seconds or milliseconds)float GetStopTime(bool bmSec)— Get stop timefloat GetStartTimeData(bool bmSec)— Get data start timefloat GetStopTimeData(bool bmSec)— Get data stop timeint ConvertTimeToIndex(float fTime)— Convert time to array indexfloat ConvertIndexToTime(int nIndex)— Convert index to timeint CalcSampIn3mSecInt()— Calculate samples in 3 millisecondsbool GetTimeAtValue(float fValue, float *pTvalue)— Find time at which a value occursbool GetDataPeaks(...)— Multiple overloads for retrieving peak datavoid SetChannelName(char* szNewChannelName)— Set channel namevoid SetEngrgUnits(char *szNewEngrgUnits)— Set engineering unitsbool VerifyAndCoerceAxis(bool bNegativeSign, const char* szAxis, BOOL bVerbose)— Validate and correct axis designationint SetFilePathAndName(char* szNewFileSpec)— Set file pathconst char* GetFilePathAndName()— Get file pathconst char* GetFileTitle()— Get file titleconst char* GetFileExt()— Get file extensionconst CString GetFileName()— Get file nameCString GetDataSetName(CString &csName)— Get data set namefloat GetFilterClass()— Get filter classint ClearAll(long NewNumberElements)— Clear and resize array
Inner Class CDataFloat::CPeakList
void AddDataPoint(DATAHIST* pDHist)— Add data point to histogramvoid Get3msMin(int nPtPer3ms, DATAHIST* pDHist)— Get 3ms minimumvoid Get3msMax(int nPtPer3ms, DATAHIST* pDHist)— Get 3ms maximumvoid RemoveAll()— Clear all entries
3. Invariants
Channel Definition
CHANNEL.Sizemust reflect the actual size of the structure for versioning/serialization compatibility.byteSpares[4]inCHANNELis fixed at 4 bytes; this was formerlyCalDate(atime_t) and must not be repurposed without coordination with transducer date fields.
File Path
PATHLENMAX(300) is the maximum allowed path length.CFilePathmaintains separate string pointers for root, directory, name, and extension components.
Test Definition
FILEINFOBLOCK.FileTypeFlagsencodes hardware type in upper 16 bits and file type in lower 16 bits.TRIGCHANDEF.ChanNoandLevelPctmust both be non-zero, andTRIGCHANDSBLmust not be set inLevelPctfor a trigger to be enabled.TRIGCHANBLOCK.TrigChanarray is sized toMAXTRIGCHANS(4) but documented as variable-size in practice.ACQUISITIONBLOCK.PreEventSamplesis only valid inRECORDMODE_EVENTmode.ACQUISITIONBLOCK.TapeModeChannelsis only valid inRECORDMODE_TAPEmode.
Data Float
FILEHEADERhas a fixed 32-byte spare section at the end.TESTINFOincludes 2 spare bytes for 4-byte alignment.FloatDataarray andpfBfrpointer must remain synchronized;SetIndexToStart()resetspfBfrto the beginning ofFloatData.
4. Dependencies
This Module Depends On
TransducerDefinition.h— Required byChannelDefinition.hforTRANSDUCERtype (not provided in source).<Afxtempl.h>— MFC template classes (CArray,CList) used inDataFloat.h.- MFC/ATL —
CStringclass used inFilePath.handDataFloat.h.
Consumers (Inferred)
- Any system reading or writing DDAS test definition files (
.tdf). - Any system reading or writing DDAS floating-point data files (
.fpdor.raw). - Crash test data analysis tools processing channel and transducer configurations.
5. Gotchas
Historical Artifacts
-
Removed
CalDatefield: TheCHANNELstructure formerly contained atime_t CalDatefield. This was removed per revision on 11/08/04 and replaced withbyteSpares[4]. The calibration date is now stored in the embeddedTRANSDUCERstructure. Code that assumesCalDateexists inCHANNELwill fail. -
Variable-size array pattern:
TRIGCHANBLOCK.TrigChanis declared withMAXTRIGCHANSelements but comments indicate it "will be a variable size array." This suggests the binary format may contain fewer than 4 entries in actual files, andNumTrigsshould be used to determine actual count.
Binary Format Considerations
-
Alignment padding:
TESTINFOincludesSpareBytes[2]explicitly for 4-byte alignment. Modifying this structure requires maintaining alignment for binary compatibility. -
File version strings: Multiple version constants exist (
DDASFILEVERS,FLOATDATAVERboth equal "Ver 500"). These must match when reading/writing files. -
Hardware type encoding:
FileTypeFlagsinFILEINFOBLOCKuses a split 16/16 bit encoding. Direct comparison of this field without masking will produce incorrect results.
API Quirks
-
Pointer-based buffer access:
CDataFloat::GetDataBuffer()returns a raw pointer to internal data. The state of this pointer afterSetSize()orClearAll()calls is unclear from the source—callers should re-fetch after modifications. -
Multiple channel number methods: Both
GetChannelNumber()andGetChannelNumberInBox()exist. The distinction between "channel number" and "channel number in system" is not fully explained in the source. -
Missing
TransducerDefinition.h: TheTRANSDUCERtype is used but not defined in the provided sources. The size