7.7 KiB
source_files, generated_at, model, schema_version, sha256
| source_files | generated_at | model | schema_version | sha256 | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
2026-04-16T03:30:58.722127+00:00 | Qwen/Qwen3-Coder-Next-FP8 | 1 | cdfba6906b172be2 |
Event
Documentation: DTS.Slice.Control.Event Accessor Types
1. Purpose
This module defines a set of specialized accessor types used to navigate hierarchical channel and module data associated with a DAS (Data Acquisition System) event. These types (DasModuleAccessor, DasChannelAccessor, DasModuleChannelAccessor, ModuleChannelAccessor, ChannelAccessor) are nested within the Event class and provide structured, type-safe access to event data indexed by DAS identifiers (e.g., DAS ID, module number, channel number). They are intended to be instantiated and populated during Event construction, enabling consumers to retrieve module and channel information using multi-level keys. The module also includes TestInformation, an internal helper class to encapsulate test metadata (ID and description) associated with the event.
2. Public Interface
All classes are nested within DTS.Slice.Control.Event and are declared public.
| Type | Inheritance | Constructor(s) | Key Type | Value Type | Description |
|---|---|---|---|---|---|
DasModuleAccessor |
ExceptionalDictionary<Common.DAS.Concepts.DAS.Id, List<Module>> |
DasModuleAccessor() |
Common.DAS.Concepts.DAS.Id |
List<Module> |
Maps a DAS ID to a list of modules associated with that DAS in the event. |
DasChannelAccessor |
ExceptionalDictionary<Common.DAS.Concepts.DAS.Id, List<Module.Channel>> |
DasChannelAccessor() |
Common.DAS.Concepts.DAS.Id |
List<Module.Channel> |
Maps a DAS ID to a list of channels (across all modules) associated with that DAS in the event. |
ChannelAccessor |
ExceptionalDictionary<int, Module.Channel> |
ChannelAccessor() |
int |
Module.Channel |
Maps a module-local channel number (as int) to a Module.Channel instance. Used internally by ModuleChannelAccessor. |
ModuleChannelAccessor |
ExceptionalDictionary<int, ChannelAccessor> |
ModuleChannelAccessor() |
int |
ChannelAccessor |
Maps a module ID (as int) to a ChannelAccessor, which in turn maps channel numbers to channels. Used internally by DasModuleChannelAccessor. |
DasModuleChannelAccessor |
ExceptionalDictionary<Common.DAS.Concepts.DAS.Id, ModuleChannelAccessor> |
DasModuleChannelAccessor() |
Common.DAS.Concepts.DAS.Id |
ModuleChannelAccessor |
Maps a DAS ID to a ModuleChannelAccessor, enabling lookup of channels by DAS ID → module ID → channel number. |
TestInformation |
Exceptional |
TestInformation()TestInformation(string id, string description) |
— | — | Internal class holding test ID and description. Not intended for direct external use. |
Note
: All accessor types inherit from
ExceptionalDictionary<TKey, TValue>(fromDTS.Common.Utilities), implying they support exception-based error handling for missing keys (e.g.,KeyNotFoundExceptionor custom behavior defined inExceptionalDictionary).
3. Invariants
-
Hierarchical Key Structure:
DasModuleChannelAccessor→ModuleChannelAccessor→ChannelAccessor→Module.Channel
provides a 3-level lookup:DAS.Id→int (module ID)→int (channel number)→Module.Channel.DasModuleAccessorandDasChannelAccessorprovide 2-level lookup:DAS.Id→List<Module>orList<Module.Channel>.
-
Null Handling:
- All
Property<T>fields inTestInformationare initialized withnullas the default value andfalseforallowNull(per constructor args), but theProperty<T>wrapper likely enforces nullability semantics (exact behavior depends onProperty<T>implementation, not visible here).
- All
-
No Validation Logic Visible:
- No validation rules (e.g., range checks on channel/module IDs) are present in the source. Assumption: validation (if any) is handled upstream or by
ExceptionalDictionary.
- No validation rules (e.g., range checks on channel/module IDs) are present in the source. Assumption: validation (if any) is handled upstream or by
-
Partial Class:
- All types are declared
partial class Event, meaning these accessors are part of a largerEventclass defined elsewhere (likely inDTS.Slice.Control.Event.cs, referenced in comments).
- All types are declared
4. Dependencies
Internal Dependencies (from source):
DTS.Common.Utilities.ExceptionalDictionary<TKey, TValue>
Base class for all accessor types.DTS.Common.Utilities.Property<T>
Used inTestInformationfor property encapsulation.DTS.Common.DASResource
Namespace imported byTestInformation(likely contains DAS resource types).DTS.Common.Utilities.DotNetProgrammingConstructs
Namespace imported byTestInformation(likely containsProperty<T>or similar constructs).DTS.Slice.Control.Event
All types are nested insideEvent(partial class).Common.DAS.Concepts.DAS.Id
Key type for DAS-level accessors (DasModuleAccessor,DasChannelAccessor,DasModuleChannelAccessor).
External Dependencies (inferred):
DTS.Slice.Control.ModuleandModule.Channel
Referenced as value types inDasModuleAccessorandDasChannelAccessor. Must be defined elsewhere in theDTS.Slice.Controlnamespace.DTS.Common.Utilities
Core utilities library (containsExceptionalDictionary,Property<T>,Strings).
What Depends on This Module?
- Any code that consumes
Eventobjects and needs to access channel/module data by DAS identifiers (e.g., event processing, analysis, or reporting modules). - Likely used in serialization/deserialization logic for
Event(givenSerializationPlusin namespace path).
5. Gotchas
-
Ambiguous Integer Keys:
ChannelAccessorusesintas key for channel number, andModuleChannelAccessorusesintas key for module ID. These are not strongly typed (e.g., noDAS.Module.IdorDAS.Module.Channel.Id), despite comments (xxx change this int to ...) suggesting future refactoring. This risks confusion or misuse if module/channel IDs overlap or are misinterpreted.
-
No Public Setters or Initialization Logic Visible:
- All accessor types have only parameterless constructors. It is unclear how they are populated (likely via internal logic in the parent
Eventclass). Consumers must assume they are constructed and filled by theEventconstructor.
- All accessor types have only parameterless constructors. It is unclear how they are populated (likely via internal logic in the parent
-
TestInformationisprivate sealed class:- Not exposed outside
Event, so external code cannot instantiate or inspect it directly. Only accessible viaEvent’s public surface (not shown here).
- Not exposed outside
-
Missing Context on
ExceptionalDictionaryBehavior:- Since all types inherit from
ExceptionalDictionary, behavior for missing keys (e.g., exceptions, defaults) depends on that base class. Without its source, exact runtime behavior is unknown.
- Since all types inherit from
-
No Documentation for
ModuleorModule.ChannelTypes:- The types
ModuleandModule.Channelare used as value types but not defined here. Their structure and relationship to DAS IDs is critical for correct usage but not documented in this module.
- The types
-
Historical Quirk in Comments:
- All files include
// *** see DTS.Slice.Control.Event.cs ***, indicating these are fragments of a larger file split for maintainability. This may complicate navigation for new developers.
- All files include
None identified beyond the above.