12 KiB
source_files, generated_at, model, schema_version, sha256
| source_files | generated_at | model | schema_version | sha256 | ||||
|---|---|---|---|---|---|---|---|---|
|
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 memberCHANFLAG_ACTIVE
Macros
ISCHANACTIVE(pChan)— Returns 1 if channel active flag is set, 0 otherwiseSETCHANACTIVE(pChan)— Sets the channel active flagCLRCHANACTIVE(pChan)— Clears the channel active flag
Structures
CHANNEL(typedeftagCHANNEL) — Main channel data 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 Definitions
PCHANNEL— Pointer toCHANNELPCHAN— Alias forPCHANNEL
FilePath.h
Constants
PATHLENMAX— Maximum path length allowed (300)
Enumerations
FileSpecOK— File specification validation flags: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()— Virtual destructorvoid operator=(const CFilePath &src)— Assignment operatorint SetDrive(int nDriveAis1)— Sets drive where A=1int SetDriveOrResource(char *szNewDrive, int* nNext)— Sets drive or network resourceint SetDir(char *szNewDir, int* nNext)— Sets directory pathint SetFile(char *szNewFile, int *nNext)— Sets filenameint SetExtension(char *szNewExt)— Sets file extensionint SetFullFilePathAndName(char* szPathAndName)— Sets complete path from stringint ParseFilePathAndName(char *szPathAndName)— Parses path and name into componentsconst char* GetFullFilePathAndName()— Returns complete path stringconst char* GetFileName()— Returns filename without extensionconst char* GetFileExtension()— Returns file extensionconst CString GetFileNameExt()— Returns filename with extensionBOOL FileExists()— Tests if file existsbool IsFileType(char *szFileTypeExt)— Checks if extension matchesbool IsPathComplete(int *pFlgValid)— Checks if path is completebool IsAllValidChars(char* szInString, int* pnPosBad)— Validates characters in stringbool IsFileValid(const char* szFileSpec, const char *szFileTypeExt, CString* pcsError)— Validates file specificationvoid 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 withFILETYPE_IMPORTED4XHardwareType— Hardware types:HWTYPE_UNKNOWN,HWTYPE_DDAS3,HWTYPE_KAYSERTHREDE,HWTYPE_COUNTAnalogOptionFlags—ANAOPT_CHANTRIGGERSfor channel trigger supportMemoryOptionFlags—MEMOPT_TAPEMODE,MEMOPT_PREEVENT,MEMOPT_PREEVENTXXXRecordModes—RECORDMODE_EVENT,RECORDMODE_TAPE
Structures
-
FILEINFOBLOCK— File metadata:UINT Size— Block size including Size fieldchar FileTypeName[12]— Software type namechar FileTypeVers[12]— File versionUINT FileTypeFlags— Hardware type (upper 16 bits) and file type (lower 16 bits)char CreatedByName[16]— Creator T-numberchar UpdatedByName[16]— Updater T-number
-
DATASYSTEMBLOCK— Data system configuration:UINT Size— Block sizeUINT NumberOfSystems— Number of systemsUINT ChannelsPerSystem— Channels per systemUINT MaxSampleRate— Maximum/default sample rateUINT SizeOfConfig— Size of oneDDASCONFIGBLOCK
-
DDASCONFIGBLOCK— Per-system configuration:UINT Size— Block sizeshort AnalogUnitNo— Analog unit numbershort AnalogOptions— Analog unit optionsshort MemoryUnitNo— Memory unit numbershort MemoryOptions— Memory unit optionslong MemorySize— Memory unit RAM in bytes
-
ACQUISITIONBLOCK— Data acquisition parameters:long nSize— Block sizelong nRecordMode— Record mode (fromRecordModesenum)long SampleRate— Samples per secondlong TotalSamples— Total samples in recordlong 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 triggerBYTE LevelPct— Trigger level as % full scale (0=off, 0x80=disabled)
-
TRIGCHANBLOCK— Trigger channel collection:unsigned short SizeBlock— Block size in bytesunsigned short NumTrigs— Number of trigger entriesTRIGCHANDEF 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
FileTypes—UNKNOWN,FLOATPOINT,PROCESSEDPeakTypes—PEAKS_MINMAX,PEAKS_3MSCONTIN,PEAKS_3MSCUMULFPDVerbosity—FPD_SILENT,FPD_ERRORS,FPD_STATUS,FPD_RESULTS,FPD_VERBOSE
Structures
-
TESTINFO— Test information block:unsigned long Size— Block sizeunsigned long DeviceID— DAQ device IDlong ChannelNo— Channel number (1-32)long SampleRate— Samples per secondlong TotalSamples— Total samples in recordlong PreEventSamples— Samples before eventshort ChanNumInSys— Channel number in system (1-128)short NumPreCalPts— Pre-calibration pointsshort NumPostCalPts— Post-calibration pointschar TestCreation[TESTPATHSIZE]— Test path and datechar TimeAxisTitle[32]— Time axis titlebyte SpareBytes[2]— Alignment spares
-
FILEHEADER— Complete file header:FILEINFOBLOCK FileInfo— File informationTESTINFO TestInfo— Test informationCHANNEL Channel— Channel definitionbyte SpareBytes[32]— 32 spare bytes
-
DATAPEAK— Peak value structure:float Min— Minimum valueshort Xmin— Minimum X indexfloat Max— Maximum valueshort Xmax— Maximum X index
-
DATAHIST— Histogram data:float fVal— Data valueint nOccurrences— Occurrence count
Class CDataFloat
Constructors/Destructor:
CDataFloat()— Default constructorCDataFloat(unsigned int nSize)— Constructor with initial sizevirtual ~CDataFloat()— Virtual destructor
Assignment:
void operator=(const CDataFloat &src)— Assignment operator
File Operations:
bool ReadFromFile(const char *lpFilename)— Reads data from filebool WriteToFile(const char *lpFilename, bool bPrint)— Writes data to fileint SetFilePathAndName(char* szNewFileSpec)— Sets file pathconst char* GetFilePathAndName()— Returns file path and nameconst CString GetFileName()— Returns filenameconst char* GetFileTitle()— Returns file titleconst char* GetFileExt()— Returns file extension
Data Access:
long GetSize()— Returns number of data elementsbool SetSize(long lNumberElements)— Resizes data arrayint ClearAll(long NewNumberElements)— Clears and resizesfloat* GetDataBuffer()— Returns pointer to data bufferCArray<float, float&>* GetDataArray()— Returns data array pointerint AppendArrayFloat(CArray<float, float&>* srcArray)— Appends data from arraybool StoreDataNext(float fData)— Stores next data valuebool GetDataNext(float* fData)— Gets next data valuebool SetIndexToStart()— Resets data index to start
Header/Info Access:
FILEHEADER* GetFileHeader()— Returns file header pointerFILEINFOBLOCK* GetFileInfo()— Returns file info blockTESTINFO* GetTestInfo()— Returns test info blockCHANNEL* GetChannel()— Returns channel definition
Channel Properties:
int GetChannelNumber()— Returns channel numberint GetChannelNumberInBox()— Returns channel number in boxvoid SetChannelName(char* szNewChannelName)— Sets channel namevoid SetEngrgUnits(char *szNewEngrgUnits)— Sets engineering unitsfloat GetFilterClass()— Returns filter classbool VerifyAndCoerceAxis(bool bNegativeSign, const char* szAxis, BOOL bVerbose)— Validates axis
Time/Index Conversion:
float ConvertIndexToTime(int nIndex)— Converts index to timeint ConvertTimeToIndex(float fTime)— Converts time to indexint CalcSampIn3mSecInt()— Calculates samples in 3msfloat GetStartTime(bool bmSec)— Returns start timefloat GetStartTimeData(bool bmSec)— Returns data start timefloat GetStopTime(bool bmSec)— Returns stop timefloat GetStopTimeData(bool bmSec)— Returns data stop timeint GetEventOffset()— Returns event offsetbool 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 rangebool 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 rateCString GetDataSetName(CString &csName)— Returns dataset name
Nested Class CDataFloat::CPeakList
void RemoveAll()— Clears histogram listvoid AddDataPoint(DATAHIST* pDHist)— Adds data point to histogramvoid Get3msMin(int nPtPer3ms, DATAHIST* pDHist)— Gets 3ms minimumvoid Get3msMax(int nPtPer3ms, DATAHIST* pDHist)— Gets 3ms maximum