140 lines
7.8 KiB
Markdown
140 lines
7.8 KiB
Markdown
|
|
---
|
||
|
|
source_files:
|
||
|
|
- Common/DTS.CommonCore/Strings/Strings.Designer.cs
|
||
|
|
generated_at: "2026-04-17T15:43:09.979866+00:00"
|
||
|
|
model: "zai-org/GLM-5-FP8"
|
||
|
|
schema_version: 1
|
||
|
|
sha256: "e2c100a0f81937df"
|
||
|
|
---
|
||
|
|
|
||
|
|
# Documentation: DTS.Common.Strings (Strings.Designer.cs)
|
||
|
|
|
||
|
|
## 1. Purpose
|
||
|
|
|
||
|
|
This module provides a strongly-typed resource class for accessing localized string constants used throughout the DTS CommonCore library. It serves as the central repository for UI labels, error messages, status descriptions, and configuration display names—enabling internationalization and consistent string management across the codebase. The class is auto-generated from a `.resx` file and should not be manually edited.
|
||
|
|
|
||
|
|
---
|
||
|
|
|
||
|
|
## 2. Public Interface
|
||
|
|
|
||
|
|
### Class: `Strings` (namespace `DTS.Common.Strings`)
|
||
|
|
|
||
|
|
A static resource accessor class providing localized string lookups.
|
||
|
|
|
||
|
|
#### Static Properties
|
||
|
|
|
||
|
|
| Property | Type | Description |
|
||
|
|
|----------|------|-------------|
|
||
|
|
| `ResourceManager` | `global::System.Resources.ResourceManager` | Returns the cached `ResourceManager` instance for this assembly. Lazily initialized on first access. |
|
||
|
|
| `Culture` | `global::System.Globalization.CultureInfo` | Gets or sets the current thread's `CurrentUICulture` for resource lookups via this class. |
|
||
|
|
|
||
|
|
#### Resource String Properties (selected significant examples)
|
||
|
|
|
||
|
|
The class exposes **many** static read-only string properties. Key categories include:
|
||
|
|
|
||
|
|
**Status & State Strings:**
|
||
|
|
- `ActiveValue` — Returns "Active value"
|
||
|
|
- `Armed` — Returns "Armed"
|
||
|
|
- `Faulted` — Returns "Faulted"
|
||
|
|
- `NotArmed` — Returns "Not armed"
|
||
|
|
- `DASStatus_ARMED`, `DASStatus_ARMEDFAULTED`, `DASStatus_Offline`, `DASStatus_Online`, `DASStatus_READYFORDL` — Data Acquisition System status labels
|
||
|
|
- `DistributorStatus_ARMED`, `DistributorStatus_ARMEDFAULTED`, `DistributorStatus_IDLE`, `DistributorStatus_OFFLINE`, `DistributorStatus_ONLINE` — Distributor status labels
|
||
|
|
|
||
|
|
**Hardware Type Descriptions:**
|
||
|
|
- `BRIDGETYPE_ACC_DESCRIPTION` — Returns "ACC"
|
||
|
|
- `BRIDGETYPE_ARS_DESCRIPTION` — Returns "ARS"
|
||
|
|
- `BRIDGETYPE_BRIDGE_DESCRIPTION` — Returns "Bridge"
|
||
|
|
- `BRIDGETYPE_IEPE_DESCRIPTION` — Returns "IEPE"
|
||
|
|
- `G5_VDS_Description`, `G5InDummy_Description` — G5 device descriptions
|
||
|
|
- `HardwareType_EMPTY` — Returns "Empty"
|
||
|
|
|
||
|
|
**Clock Synchronization Profiles (extensive set):**
|
||
|
|
- `ClockSyncProfile_Auto_E2E`, `ClockSyncProfile_Auto_P2P` — PTP automatic modes
|
||
|
|
- `ClockSyncProfile_Disabled`, `ClockSyncProfile_Manual`, `ClockSyncProfile_None`
|
||
|
|
- `ClockSyncProfile_GPS`, `ClockSyncProfile_IRIG`, `ClockSyncProfile_EXT_PPS` — External clock sources
|
||
|
|
- `ClockSyncProfile_Master_E2E`, `ClockSyncProfile_Master_P2P`, `ClockSyncProfile_Slave_E2E`, `ClockSyncProfile_Slave_P2P` — PTP master/slave configurations
|
||
|
|
- Many combined profiles (e.g., `ClockSyncProfile_GPS_EXT_PPS_Master_E2E_PPS_OUT`)
|
||
|
|
|
||
|
|
**Filter Class Types:**
|
||
|
|
- `FilterClassType_CFC1000`, `FilterClassType_CFC600`, `FilterClassType_CFC180`, `FilterClassType_CFC60` — CFC filter class labels
|
||
|
|
- `FilterClassType_None`, `FilterClassType_Unfiltered`
|
||
|
|
|
||
|
|
**Digital I/O Modes:**
|
||
|
|
- `DigitalInputMode_CCNC`, `DigitalInputMode_CCNO`, `DigitalInputMode_THL`, `DigitalInputMode_TLH`
|
||
|
|
- `DigitalOutputMode_CCNC`, `DigitalOutputMode_CCNO`, `DigitalOutputMode_FVHL`, `DigitalOutputMode_FVLH`
|
||
|
|
|
||
|
|
**Calculated Channel Types:**
|
||
|
|
- `CalculatedChannel_Average`, `CalculatedChannel_Resultant`, `CalculatedChannel_Sum`
|
||
|
|
- `CalculatedChannel_IRTRACC3D_Abdomen`, `CalculatedChannel_IRTRACC3D_LowerThorax`, `CalculatedChannel_IRTRACC3D_Thorax`
|
||
|
|
|
||
|
|
**Error & Warning Messages:**
|
||
|
|
- `BAD_NETPATH_ERROR_MSG` — Network path connection error
|
||
|
|
- `FailedToReadTestSetup`, `FailedToWritePcConfigFile`
|
||
|
|
- `InvalidCharacterInSerialNumber`, `InvalidClockSlave`, `InvalidClockSyncProfileMaster`
|
||
|
|
- `DockingStationNotFound` — Multi-line recovery instructions
|
||
|
|
|
||
|
|
**PSD/FFT Processing Status:**
|
||
|
|
- `GeneratingPSD`, `GeneratingPSD_ApplyingFilters`, `GeneratingPSD_ApplyingWindows`, `GeneratingPSD_CalculatingFFTs`, `GeneratingPSD_CalculatingResults`, `GeneratingPSD_CreatingSegments`, `GeneratingPSD_ResizingData`
|
||
|
|
|
||
|
|
**Miscellaneous:**
|
||
|
|
- `ClearAll`, `Loading`, `NotApplicable`, `MultipleFiles`, `NoChannelCodes`
|
||
|
|
- `FrequencyHz`, `Magnitude`, `GSquaredOverHz`, `Duration`, `Delay`
|
||
|
|
- `ISO13499Code`, `ISOChannelName` — ISO 13499 crash test data format fields
|
||
|
|
|
||
|
|
*Note: The file was truncated; additional properties exist beyond what is shown.*
|
||
|
|
|
||
|
|
---
|
||
|
|
|
||
|
|
## 3. Invariants
|
||
|
|
|
||
|
|
1. **Auto-generation constraint**: This file is machine-generated by `System.Resources.Tools.StronglyTypedResourceBuilder` (version 16.0.0.0). Manual modifications will be overwritten when the `.resx` file is regenerated.
|
||
|
|
|
||
|
|
2. **Lazy initialization**: The `ResourceManager` property uses lazy initialization with a null-check pattern. The `temp` local variable is assigned to `resourceMan` only if `resourceMan` is null.
|
||
|
|
|
||
|
|
3. **Thread-safety of ResourceManager**: The lazy initialization pattern used is **not thread-safe**. Concurrent first-access could result in multiple `ResourceManager` instances being created (though only one would be retained).
|
||
|
|
|
||
|
|
4. **Resource name mapping**: Each property name maps directly to a resource key in the underlying `.resx` file. For example, `ActiveValue` calls `ResourceManager.GetString("ActiveValue", resourceCulture)`.
|
||
|
|
|
||
|
|
5. **Culture fallback**: If `Culture` is not explicitly set (`resourceCulture` remains null), `ResourceManager.GetString` uses the current thread's `CurrentUICulture`.
|
||
|
|
|
||
|
|
---
|
||
|
|
|
||
|
|
## 4. Dependencies
|
||
|
|
|
||
|
|
### This Module Depends On:
|
||
|
|
- `System.Resources.ResourceManager` — Resource lookup mechanism
|
||
|
|
- `System.Globalization.CultureInfo` — Culture-specific formatting/localization
|
||
|
|
- `System.CodeDom.Compiler.GeneratedCodeAttribute` — Metadata for tooling
|
||
|
|
- `System.Diagnostics.DebuggerNonUserCodeAttribute` — Debugger behavior hint
|
||
|
|
- `System.Runtime.CompilerServices.CompilerGeneratedAttribute` — Compiler metadata
|
||
|
|
- `System.Diagnostics.CodeAnalysis.SuppressMessageAttribute` — Code analysis suppression
|
||
|
|
- `System.ComponentModel.EditorBrowsableAttribute` — IntelliSense visibility control
|
||
|
|
|
||
|
|
### The underlying `.resx` file:
|
||
|
|
- Located at `Common/DTS.CommonCore/Strings/Strings.resx` (inferred from standard naming convention)
|
||
|
|
- Contains the actual string values referenced by this class
|
||
|
|
|
||
|
|
### What Depends On This Module:
|
||
|
|
- **Unknown from source alone** — Any component in the DTS system requiring localized strings would reference `DTS.Common.Strings.Strings`. The breadth of strings suggests usage across:
|
||
|
|
- Data acquisition system (DAS) configuration and status
|
||
|
|
- Clock synchronization subsystem
|
||
|
|
- Sensor calibration modules
|
||
|
|
- Digital I/O configuration
|
||
|
|
- PSD/FFT analysis components
|
||
|
|
- Test setup and ISO 13499 export functionality
|
||
|
|
|
||
|
|
---
|
||
|
|
|
||
|
|
## 5. Gotchas
|
||
|
|
|
||
|
|
1. **Do not edit manually**: The file header explicitly warns that changes will be lost on regeneration. All string modifications must be made in the source `.resx` file.
|
||
|
|
|
||
|
|
2. **Typo in property name**: `DigitialOutput` (note the extra 'i' in "Digitial") is a misspelling of "DigitalOutput". This typo is now part of the public API and cannot be fixed without breaking changes.
|
||
|
|
|
||
|
|
3. **Typo in resource key**: Properties like `LabratoryContactEmail`, `LabratoryContactFax`, `LabratoryContactName`, `LabratoryContactPhone`, `LabratoryName`, `LabratoryProjectRefNumber`, `LabratoryTestRefNumber` use "Labratory" instead of "Laboratory".
|
||
|
|
|
||
|
|
4. **Thread-safety concern**: The lazy initialization of `ResourceManager` is not thread-safe. In high-concurrency scenarios where this class might be accessed for the first time from multiple threads simultaneously, consider whether this could cause issues.
|
||
|
|
|
||
|
|
5. **Namespace mismatch potential**: The namespace is `DTS.Common.Strings` but the file path suggests `DTS.CommonCore`. Verify whether this is intentional or a historical artifact.
|
||
|
|
|
||
|
|
6. **Truncated source**: The source file was truncated mid-property (`OutputClockSource_PTP_OnePPS`). Additional properties exist that are not documented here.
|