133 lines
4.4 KiB
C
133 lines
4.4 KiB
C
/////////////////////////////////////////////////////////////////////////////
|
|
// DDASTestDefinition.h
|
|
// --------------------
|
|
// Defines the data acquisition system configuration and channels for a test.
|
|
//
|
|
//
|
|
// AUTHOR: A. J. Owski
|
|
// LOC: 1250
|
|
// DEPT: 5260 Tool Development
|
|
// (formerly Instrument Systems)
|
|
//
|
|
// COPYRIGHT: (c) 2002-2004 DaimlerChrysler Corp.
|
|
//
|
|
// REVISIONS: (most-recent at top of list).
|
|
//
|
|
// Date Init Description of Change
|
|
// -------- --- ---------------------
|
|
// 06/22/05 WJP Add support for MemoryOptionFlags bits MEMOPT_PREEVENT and
|
|
// MEMOPT_PREEVENTXXX, Programmable Pre-Event blocks up to 99 and
|
|
// 511 introduced in Memory Units versions 2.40 and 3.10,
|
|
// respectively.
|
|
// 10/19/04 WJP Add support for channel (analog) triggers.
|
|
// 04/02/04 WJP General clean up
|
|
// 07/22/03 WJP Added HardwareType
|
|
//
|
|
//
|
|
|
|
#ifndef DDASTYPENAME // If these def's aren't def'd,
|
|
|
|
#define TESTDEFEXT ".tdf"
|
|
#define DDASTYPENAME "DDAS V5"
|
|
#define DDASFILEVERS "Ver 500"
|
|
|
|
enum FileTypeFlags
|
|
{
|
|
FILETYPE_IMPORTED4X // Test was imported from 4x
|
|
};
|
|
|
|
enum HardwareType // Hardware type values
|
|
{ // in upper 16 bits of FileTypeFlags
|
|
HWTYPE_UNKNOWN, // None specified - old DDAS
|
|
HWTYPE_DDAS3, // DDAS III hardware
|
|
HWTYPE_KAYSERTHREDE, // Kayser-Threde hardware (future)
|
|
HWTYPE_COUNT
|
|
};
|
|
|
|
typedef struct tagFILEINFOBLOCK
|
|
{
|
|
UINT Size; // Block Size (including nSize)
|
|
char FileTypeName[12]; // Software Type Name
|
|
char FileTypeVers[12]; // File Version Name
|
|
UINT FileTypeFlags; // File Type Flags
|
|
// - Hardware Type in upper 16 bits
|
|
// - File Type in lower 16 bits
|
|
char CreatedByName[16]; // Created by T-number
|
|
char UpdatedByName[16]; // Updated by T-number
|
|
}FILEINFOBLOCK;
|
|
|
|
|
|
typedef struct tagDATASYSTEMBLOCK
|
|
{
|
|
UINT Size; // Block Size (including nSize)
|
|
UINT NumberOfSystems; // No of systems in this definition
|
|
UINT ChannelsPerSystem; // Chan per system in this definition
|
|
UINT MaxSampleRate; // Max (or default) sample rate
|
|
UINT SizeOfConfig; // Size of 1 DDASCONFIGBLOCK
|
|
}DATASYSTEMBLOCK;
|
|
|
|
|
|
typedef struct tagDDASCONFIGBLOCK // One config block per system
|
|
{
|
|
UINT Size; // Block Size (including nSize)
|
|
short AnalogUnitNo; // DDAS analog unit for this test
|
|
short AnalogOptions; // DDAS analog unit options
|
|
short MemoryUnitNo; // DDAS memory unit for this test
|
|
short MemoryOptions; // DDAS memory unit options
|
|
long MemorySize; // DDAS memory unit RAM (bytes)
|
|
}DDASCONFIGBLOCK;
|
|
|
|
enum AnalogOptionFlags
|
|
{
|
|
ANAOPT_CHANTRIGGERS // Analog unit has channel triggers
|
|
};
|
|
|
|
enum MemoryOptionFlags
|
|
{
|
|
MEMOPT_TAPEMODE, // Memory unit has tape mode
|
|
MEMOPT_PREEVENT, // Memory unit can sel pre-event to 99
|
|
MEMOPT_PREEVENTXXX // Memory unit can sel pre-event to 511
|
|
};
|
|
|
|
|
|
enum RecordModes
|
|
{
|
|
RECORDMODE_EVENT, // Normal (event) mode
|
|
RECORDMODE_TAPE // Tape (manual) mode
|
|
};
|
|
|
|
|
|
typedef struct tagACQUISITIONBLOCK // Defines data acq params this test
|
|
{
|
|
long nSize; // Block Size (including nSize)
|
|
long nRecordMode; // Enumerated constant data mode
|
|
long SampleRate; // Samples per second
|
|
long TotalSamples; // Total samples in record
|
|
long PreEventSamples; // Pre-Event samples (Rec Mode only!)
|
|
long TapeModeChannels; // No of Channels (Tape Mode only!)
|
|
// long nTrigBlock; // Trigger block size if non-zero
|
|
long nTrigBlock; // Number of trigger entries (can be 0).
|
|
}ACQUISITIONBLOCK;
|
|
|
|
|
|
// To enable trigger,
|
|
// ChanNo and LevelPct must be nonzero
|
|
// and TRIGCHANDSBL must not be set in LevelPct
|
|
typedef struct tagTRIGCHANDEF // Defines chan (analog) trigger
|
|
{
|
|
BYTE ChanNo; // Channel number to use as trigger
|
|
BYTE LevelPct; // Trig level in % full scale (0=off)
|
|
}TRIGCHANDEF; // Trigger when signal exceeds +/-level.
|
|
|
|
#define MAXTRIGCHANS 4
|
|
#define TRIGCHANDSBL 0x80
|
|
|
|
typedef struct tagTRIGCHANBLOCK // Defines chan (analog) trigs this test
|
|
{
|
|
unsigned short SizeBlock; // Block Size in bytes (including nSize)
|
|
unsigned short NumTrigs; // Number of entries in array TrigChan
|
|
TRIGCHANDEF TrigChan[MAXTRIGCHANS]; // Channel (analog) triggers. (NOTE that
|
|
}TRIGCHANBLOCK; // this will be a variable size array,
|
|
// but we sized it to 1 to avoid warnings.)
|
|
|
|
#endif |