feat(iace): lifecycle phases in patterns + broader robot cell scenarios
- ApplicableLifecycles field in HazardPattern: patterns now declare which lifecycle phases the hazard applies to (Output, not just filter) - Init handler writes first applicable lifecycle into Hazard.LifecyclePhase - Robot cell patterns HP1600-1601 broadened: "Betrieb, Einrichten, Reinigung, Wartung, Fehlersuche" instead of only "Teach-Betrieb" - All robot cell patterns get ApplicableLifecycles for proper phase display Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -204,6 +204,12 @@ func (h *IACEHandler) InitializeProject(c *gin.Context) {
|
||||
}
|
||||
}
|
||||
|
||||
// Join applicable lifecycles for the LifecyclePhase field
|
||||
lifecycleStr := ""
|
||||
if len(mp.ApplicableLifecycles) > 0 {
|
||||
lifecycleStr = mp.ApplicableLifecycles[0]
|
||||
}
|
||||
|
||||
hz, cerr := h.store.CreateHazard(ctx, iace.CreateHazardRequest{
|
||||
ProjectID: projectID,
|
||||
ComponentID: compID,
|
||||
@@ -212,6 +218,7 @@ func (h *IACEHandler) InitializeProject(c *gin.Context) {
|
||||
Category: cat,
|
||||
Scenario: mp.ScenarioDE,
|
||||
Function: iace.EncodeOpStates(mp.OperationalStates),
|
||||
LifecyclePhase: lifecycleStr,
|
||||
TriggerEvent: mp.TriggerDE,
|
||||
PossibleHarm: mp.HarmDE,
|
||||
AffectedPerson: mp.AffectedDE,
|
||||
|
||||
Reference in New Issue
Block a user