5.7 KiB
source_files, generated_at, model, schema_version, sha256
| source_files | generated_at | model | schema_version | sha256 | |
|---|---|---|---|---|---|
|
2026-04-16T14:13:19.550350+00:00 | zai-org/GLM-5-FP8 | 1 | 342395eec4a038a1 |
Documentation: EventInfoAggregate
1. Purpose
EventInfoAggregate is an aggregate data structure that consolidates event information from multiple Data Acquisition System (DAS) devices/modules into a single unified view. It implements IEventInfoAggregate and serves as a central repository for event metadata during download operations, tracking properties like event identification, duration, channel counts, sample counts, and fault status across multiple hardware units that recorded the same event.
2. Public Interface
Properties
| Property | Type | Description |
|---|---|---|
EventId |
string |
Identifier for the test/event. |
EventDescription |
string |
Human-readable description of the event. |
DurationSeconds |
double |
Total event duration in seconds (PreTriggerSeconds + PostTriggerSeconds). |
GUID |
string |
Globally unique identifier for the test. |
HasBeenDownloaded |
bool |
Indicates whether the event data has been downloaded. |
WasTriggered |
bool |
Indicates whether the event was triggered. |
NumberOfChannels |
int |
Total number of channels across all modules. |
NumberOfSamples |
ulong |
Number of samples per channel. |
NumberOfBytes |
ulong |
Calculated total bytes: NumberOfSamples * NumberOfChannels * 2. |
Faulted |
bool |
Indicates if any module reported a fault condition. |
EventNumber |
int |
Sequential event number identifier. |
Methods
EventInfoAggregate(DownloadReport.EventInfo newEvent)
Constructor that initializes the aggregate from a single DownloadReport.EventInfo. Populates all properties and adds the first DAS module to the internal _eventIndices dictionary.
void Add(IEventInfo newEvent)
Merges additional event information from another module into this aggregate. Accumulates channel counts, recalculates NumberOfBytes, updates Faulted status, and adds the DAS to _eventIndices. Logs warnings for mismatched fields but does not throw exceptions.
Slice.Control.Event GetEvent()
Returns a lazily-instantiated Slice.Control.Event object, creating it if necessary.
Slice.Control.Event GetEvent(bool bClear)
Returns the Slice.Control.Event object. If bClear is true, resets the cached _event to null before returning (forcing recreation on next call).
int GetEventIndex(IDASCommunication idas)
Returns the event index for a specific DAS device. Returns -1 and logs an error if the DAS is not found in _eventIndices.
List<IDASCommunication> GetDasList()
Returns a lazily-instantiated list of all DAS devices associated with this event. The list is cached after first creation.
3. Invariants
- Empty Modules Handling: When
Modulescollection is empty,DurationSecondsandNumberOfSamplesare set to0rather than throwing an exception. - Byte Calculation:
NumberOfBytesis always calculated as2 * NumberOfChannels * NumberOfSamples(assumes 2 bytes per sample per channel). - Fault Detection: An event is considered faulted if
FaultFlags != 0ORFaultFlagsEx != 0on any constituent module. - Event Index Dictionary:
_eventIndicesis always initialized (readonly field) and mapsIDASCommunicationinstances to their event numbers. - Minimum Value Resolution: When merging events with mismatched
DurationSecondsorNumberOfSamples, the minimum value is retained.
4. Dependencies
This module depends on:
System,System.Collections.Generic,System.Linq(BCL)DTS.Common.Interface.DASFactory— providesIDASCommunicationDTS.Common.Interface.DASFactory.Download— providesDownloadReport.EventInfo,IEventInfo,DASModuleDTS.Common.Utilities.Logging— providesAPILoggerDTS.DASLib.Service— namespace import (specific usage unclear from source)Slice.Control.Event— external type instantiated inGetEvent()(assembly/source not specified in imports)
What depends on this module:
- Not determinable from source alone. The
IEventInfoAggregateinterface suggests consumers depend on the interface rather than concrete implementation.
5. Gotchas
-
Silent Mismatch Handling: The
Add()method logs warnings for mismatchedTestID,Description,GUID,HasBeenDownloaded,WasTriggered, andEventNumbervalues but continues processing. Callers are not notified of data integrity issues beyond log entries. -
Minimum Value Strategy: When
DurationSecondsorNumberOfSamplesdiffer between modules being aggregated, the code silently takes the minimum value. This may result in data loss if larger values are correct. -
Empty Modules Edge Case: The constructor guards against empty
Modulescollections (added per case 15575), but theAdd()method does not — it accessesnewEvent.Modules[0]without null/empty checks, which will throwArgumentOutOfRangeExceptionifModulesis empty. -
Lazy Initialization Side Effects:
GetDasList()andGetEvent()cache their results. The_daslist is not invalidated whenAdd()is called, potentially returning stale data ifGetDasList()was called before allAdd()operations completed. -
Index Assignment for Duplicates:
_eventIndicesuses indexer assignment (_eventIndices[...] = value) rather than.Add()to silently overwrite duplicate keys. This was added per case 44357 but means duplicate DAS entries are not detected or logged. -
Error Return Convention:
GetEventIndex()returns-1for missing keys rather than throwing an exception. Callers must check for this sentinel value.