211 lines
9.3 KiB
Markdown
211 lines
9.3 KiB
Markdown
|
|
---
|
||
|
|
source_files:
|
||
|
|
- DataPRO/Modules/Reports/PedestrianAndHeadReports/Classes/Constants.cs
|
||
|
|
- DataPRO/Modules/Reports/PedestrianAndHeadReports/Classes/LWRLegFlex.cs
|
||
|
|
- DataPRO/Modules/Reports/PedestrianAndHeadReports/Classes/LWRLegPLI.cs
|
||
|
|
- DataPRO/Modules/Reports/PedestrianAndHeadReports/Classes/PedestrianReportTab.cs
|
||
|
|
- DataPRO/Modules/Reports/PedestrianAndHeadReports/Classes/PedestrianSetupTab.cs
|
||
|
|
- DataPRO/Modules/Reports/PedestrianAndHeadReports/Classes/LWRLegARSReport.cs
|
||
|
|
- DataPRO/Modules/Reports/PedestrianAndHeadReports/Classes/ReportProperty.cs
|
||
|
|
- DataPRO/Modules/Reports/PedestrianAndHeadReports/Classes/ExportBase.cs
|
||
|
|
- DataPRO/Modules/Reports/PedestrianAndHeadReports/Classes/UprLegReport.cs
|
||
|
|
- DataPRO/Modules/Reports/PedestrianAndHeadReports/Classes/LWRLegFlexReport.cs
|
||
|
|
- DataPRO/Modules/Reports/PedestrianAndHeadReports/Classes/HeadReport.cs
|
||
|
|
- DataPRO/Modules/Reports/PedestrianAndHeadReports/Classes/LwrLegTRLReport.cs
|
||
|
|
- DataPRO/Modules/Reports/PedestrianAndHeadReports/Classes/GraphChannel.cs
|
||
|
|
generated_at: "2026-04-17T15:44:40.495238+00:00"
|
||
|
|
model: "zai-org/GLM-5-FP8"
|
||
|
|
schema_version: 1
|
||
|
|
sha256: "fe6fc1cbf68a5be0"
|
||
|
|
---
|
||
|
|
|
||
|
|
# Pedestrian and Head Reports Module Documentation
|
||
|
|
|
||
|
|
## 1. Purpose
|
||
|
|
|
||
|
|
This module provides the data structures, UI controls, and report generation logic for pedestrian and head impact safety testing reports. It supports multiple impactor types including adult/child head, upper leg (UPR), and lower leg variants (Flex, PLI, ARS, TRL/E-PLI). The module manages graph visualization, channel data processing with unit conversions, calculated channels (HIC, resultant acceleration, vector addition), and Excel export capabilities for crash test analysis.
|
||
|
|
|
||
|
|
---
|
||
|
|
|
||
|
|
## 2. Public Interface
|
||
|
|
|
||
|
|
### ConstantsAndEnums (Constants.cs)
|
||
|
|
```csharp
|
||
|
|
public const string HEAD_X_ID = "X軸加速度";
|
||
|
|
public const string HEAD_Y_ID = "Y軸加速度";
|
||
|
|
public const string HEAD_Z_ID = "Z軸加速度";
|
||
|
|
|
||
|
|
public enum HeadImpactorTypes { ADULT, CHILD }
|
||
|
|
public enum TimeUnits { Seconds, MilliSeconds }
|
||
|
|
```
|
||
|
|
|
||
|
|
### LWRLegFlex (UserControl)
|
||
|
|
```csharp
|
||
|
|
public LWRLegFlex() // Initializes ddlAccelerationUnits, ddlDummyType, ddlMomentUnits, ddlTime to index 0
|
||
|
|
```
|
||
|
|
|
||
|
|
### LWRLegPLI (UserControl)
|
||
|
|
```csharp
|
||
|
|
public LWRLegPLI() // Initializes ddlAccelerationUnits, ddlDummyType, ddlMomentUnits, ddlShearDisp, ddlTime to index 0
|
||
|
|
```
|
||
|
|
|
||
|
|
### PedestrianReportTab (C1DockingTabPage, INotifyPropertyChanged)
|
||
|
|
```csharp
|
||
|
|
public event PropertyChangedEventHandler PropertyChanged;
|
||
|
|
public ReportBase ReportBase { get; set; } // Setter throws NotSupportedException if re-assigned
|
||
|
|
protected bool SetProperty<T>(ref T storage, T value, String propertyName)
|
||
|
|
protected void OnPropertyChanged(string propertyName)
|
||
|
|
```
|
||
|
|
|
||
|
|
### PedestrianSetupTab (C1DockingTabPage, INotifyPropertyChanged)
|
||
|
|
```csharp
|
||
|
|
public event PropertyChangedEventHandler PropertyChanged;
|
||
|
|
public LWRLegReportExport UI { get; set; }
|
||
|
|
public ReportBase ReportBase { get; set; } // Setter throws NotSupportedException if re-assigned
|
||
|
|
protected bool SetProperty<T>(ref T storage, T value, String propertyName)
|
||
|
|
protected void OnPropertyChanged(string propertyName)
|
||
|
|
```
|
||
|
|
|
||
|
|
### LWRLegARSReport (ReportBase)
|
||
|
|
```csharp
|
||
|
|
public LWRLegARSReport(PedestrianAndHeadTest parent)
|
||
|
|
public override ReportTypes GetReportType() // Returns ReportTypes.LWRLegARS
|
||
|
|
public const string XAxialChannelId = "ARSXAxial";
|
||
|
|
public const string YAxialChannelId = "ARSYAxial";
|
||
|
|
public const string ZAxialChannelId = "ARSZAxial";
|
||
|
|
public const string XAccelerationId = "ARSXAccel";
|
||
|
|
```
|
||
|
|
|
||
|
|
### ReportProperty
|
||
|
|
```csharp
|
||
|
|
public ReportProperty(string id, string displayname, string[] possibleValues, Type propertyType)
|
||
|
|
public string Id { get; } // Read-only
|
||
|
|
public string DisplayName { get; set; }
|
||
|
|
public string Value { get; } // Set via SetValue()
|
||
|
|
public void SetValue(string value)
|
||
|
|
public string[] GetAvailableValues()
|
||
|
|
public void SetAvailableValues(string[] values)
|
||
|
|
```
|
||
|
|
|
||
|
|
### ExportBase
|
||
|
|
```csharp
|
||
|
|
protected string GetCell(string key) // Throws NotImplementedException if key missing
|
||
|
|
protected void AddCollectionReference(string key, string reference)
|
||
|
|
protected void InsertCalculation(string cellReference, int sheetid, bool newLevel)
|
||
|
|
protected int InsertSharedStringItem(string text)
|
||
|
|
protected Cell CreateTextCell(string reference, string value)
|
||
|
|
protected Cell CreateNumericCell(string column, double[] data, int index)
|
||
|
|
protected Cell CreateNumericCell(string reference, uint style, double value)
|
||
|
|
protected Cell CreateStylizedTextCell(string reference, UInt32Value style, string text)
|
||
|
|
protected Cell CreateStylizedTextCell(string reference, UInt32Value style, string text, string key)
|
||
|
|
```
|
||
|
|
|
||
|
|
### UprLegReport (ReportBase)
|
||
|
|
```csharp
|
||
|
|
public UprLegReport(PedestrianAndHeadTest parent)
|
||
|
|
public override ReportTypes GetReportType() // Returns ReportTypes.UPRLeg
|
||
|
|
public const string UPR_MOMENT_ID = "UPR_Moment";
|
||
|
|
public const string MID_MOMENT_ID = "MID_Moment";
|
||
|
|
public const string LWR_MOMENT_ID = "LWR_Moment";
|
||
|
|
public const string UPR_TOTALFORCE_ID = "UPR_ForceComined";
|
||
|
|
public const string UPR_FORCE_ID = "UPR_Force";
|
||
|
|
public const string LWR_FORCE_ID = "LWR_Force";
|
||
|
|
public override void DrawGraph(KnownGraphs graph, C1.Win.C1Chart.C1Chart chart)
|
||
|
|
```
|
||
|
|
|
||
|
|
### LWRLegFlexReport (ReportBase)
|
||
|
|
```csharp
|
||
|
|
public LWRLegFlexReport(PedestrianAndHeadTest parent)
|
||
|
|
public override ReportTypes GetReportType() // Returns ReportTypes.LWRLegFlex
|
||
|
|
public const string FEMUR1_ID, FEMUR2_ID, FEMUR3_ID, LCL_ID, MCL_ID, ACL_ID, PCL_ID, TIBIA1_ID, TIBIA2_ID, TIBIA3_ID, TIBIA4_ID
|
||
|
|
public string TestType { get; set; }
|
||
|
|
public string[] GetPossibleTestTypes()
|
||
|
|
```
|
||
|
|
|
||
|
|
### HeadReport (ReportBase)
|
||
|
|
```csharp
|
||
|
|
public HeadReport(PedestrianAndHeadTest parent)
|
||
|
|
public override ReportTypes GetReportType() // Returns ReportTypes.Head
|
||
|
|
public const string HEAD_X_ChannelID = "HEAD_X";
|
||
|
|
public const string HEAD_Y_ChannelID = "HEAD_Y";
|
||
|
|
public const string HEAD_Z_ChannelID = "HEAD_Z";
|
||
|
|
public const string HEAD_Displacement = "HEAD_DISPLACEMENT";
|
||
|
|
public const string HEAD_RESULTANT_CHANNELID = "HEAD_RESULTANT";
|
||
|
|
public string ClassificationAngle { get; set; }
|
||
|
|
public override void DrawGraph(KnownGraphs graph, C1.Win.C1Chart.C1Chart chart)
|
||
|
|
```
|
||
|
|
|
||
|
|
### LWRLegTRLReport (ReportBase)
|
||
|
|
```csharp
|
||
|
|
public LWRLegTRLReport(PedestrianAndHeadTest parent)
|
||
|
|
public override ReportTypes GetReportType() // Returns ReportTypes.LWRLegTRL
|
||
|
|
public const string AccelerationChannelId = "LWRLEGTRL_ACCEL";
|
||
|
|
public const string BendingChannelId = "LWRLEGTRL_BENDANGLE";
|
||
|
|
public const string ShearingChannelId = "LWRLEGTRL_SHEARING";
|
||
|
|
public const string BendingDisplacementId = "LWRLEGTRL_BENDDISPLACEMENT";
|
||
|
|
public const string ShearingDisplacementId = "LWRLEGTRL_SHEARDISPLACEMENT";
|
||
|
|
public override void DrawGraph(KnownGraphs graph, C1.Win.C1Chart.C1Chart chart)
|
||
|
|
```
|
||
|
|
|
||
|
|
### GraphChannel (INotifyPropertyChanged)
|
||
|
|
```csharp
|
||
|
|
public GraphChannel(string id, string displayName, string hint)
|
||
|
|
public event PropertyChangedEventHandler PropertyChanged
|
||
|
|
public string Id { get; } // Read-only
|
||
|
|
public string DisplayName { get; set; }
|
||
|
|
public string ChannelNameHint { get; set; }
|
||
|
|
public ReviewTestChannel Channel { get; set; }
|
||
|
|
public double DataMin { get; set; }
|
||
|
|
public double DataMax { get; set; }
|
||
|
|
public double TimeOfMin { get; set; }
|
||
|
|
public double TimeOfMax { get; set; }
|
||
|
|
public bool UseOffset { get; set; }
|
||
|
|
public double Offset { get; set; }
|
||
|
|
public virtual void SetValue(Fields field, string value)
|
||
|
|
public virtual string GetValue(Fields field)
|
||
|
|
public virtual string GetValue(Fields field, string format)
|
||
|
|
public virtual string GetValueTrunc2Places(Fields field)
|
||
|
|
|
||
|
|
public enum Fields { DataMin, DataMax, TimeOfMin, TimeOfMax, HIC, T1, T2, UseOffset, Offset }
|
||
|
|
```
|
||
|
|
|
||
|
|
### HICChannel (GraphChannel)
|
||
|
|
```csharp
|
||
|
|
public HICChannel(string id, string displayName, string hint)
|
||
|
|
public double HIC { get; set; }
|
||
|
|
public double T1 { get; set; }
|
||
|
|
public double T2 { get; set; }
|
||
|
|
public override string GetValue(Fields field)
|
||
|
|
```
|
||
|
|
|
||
|
|
### VectorAddition, BendingDisplacement, ShearingDisplacement
|
||
|
|
```csharp
|
||
|
|
// Subclasses of GraphChannel with no additional public members beyond constructors
|
||
|
|
public VectorAddition(string id, string displayName, string hint)
|
||
|
|
public BendingDisplacement(string id, string displayname, string hint)
|
||
|
|
public ShearingDisplacement(string id, string displayname, string hint)
|
||
|
|
```
|
||
|
|
|
||
|
|
---
|
||
|
|
|
||
|
|
## 3. Invariants
|
||
|
|
|
||
|
|
- **ReportBase assignment is single-use**: `PedestrianReportTab.ReportBase` and `PedestrianSetupTab.ReportBase` throw `NotSupportedException` if assigned when already non-null.
|
||
|
|
- **Null ReportBase values are ignored**: The setter silently returns without action if `value` is null.
|
||
|
|
- **ReportProperty.Id is immutable**: Set only at construction, no public setter exists.
|
||
|
|
- **GraphChannel.Id is immutable**: Set only at construction, no public setter exists.
|
||
|
|
- **ExportBase.GetCell throws for unknown keys**: Throws `NotImplementedException` with the key name; also writes to `System.Diagnostics.Trace`.
|
||
|
|
- **All report classes require a parent**: Each `ReportBase` subclass constructor requires a `PedestrianAndHeadTest` parameter.
|
||
|
|
- **Offset only applied when UseOffset is true**: In `GraphChannel.Offset` setter, the offset is only propagated to the channel if `UseOffset` is true.
|
||
|
|
|
||
|
|
---
|
||
|
|
|
||
|
|
## 4. Dependencies
|
||
|
|
|
||
|
|
### External Libraries
|
||
|
|
- `C1.Win.C1Command` - ComponentOne docking tab pages (`C1DockingTabPage`)
|
||
|
|
- `C1.Win.C1Chart` - Charting component for `DrawGraph` methods
|
||
|
|
- `DocumentFormat.OpenXml` - Excel spreadsheet generation (`SpreadsheetDocument`, `SharedStringTablePart`, `CalculationChain`, etc.)
|
||
|
|
- `System.Windows.Forms` - `UserControl` base class
|
||
|
|
|
||
|
|
### Internal Dependencies
|