...
PlantUML Macro |
---|
@startuml participant CLAMP_Runtime database Database loop forever CLAMP_Runtime -> Database: Read Control Loop Instances loop Over each Control Loop Instance loop Over each Control Loop Element alt Control Loop Element has not reported in last reporting window CLAMP_Runtime -> CLAMP_Runtime: Log Control Loop Element as having missed a report CLAMP_Runtime -> Database: Increment missed report counter on Control Loop Element else Control Loop Element has reported in last reporting window CLAMP_Runtime -> Database: Clear missed report counter on Control Loop Element end alt Control Loop Element in incorrect state in last reporting window CLAMP_Runtime -> CLAMP_Runtime: Log Control Loop Element as being in incorrect state CLAMP_Runtime -> Database: Record Control Loop Element as being in incorrect state else Control Loop Element not in incorrect state in last reporting window alt Control Loop Element was in incorrect state on previous report CLAMP_Runtime -> CLAMP_Runtime: Log Control Loop Element as being in correct state CLAMP_Runtime -> Database: Record Control Loop Element as being in correct state end end alt Control Loop Element reported fault in last reporting window CLAMP_Runtime -> CLAMP_Runtime: Log Control Loop Element as being faulty CLAMP_Runtime -> Database: Record Control Loop Element as being faulty else Control Loop Element did not report fault in last reporting window alt Control Loop Element reported fault on previous report CLAMP_Runtime -> CLAMP_Runtime: Log Control Loop Element fault as cleared CLAMP_Runtime -> Database: Mark fault Control Loop Element as being cleared end end end alt Control Loop Element in Control Loop Instance has exceeded alarm threshold on missed report counter CLAMP_Runtime -> CLAMP_Runtime: Raise a Control Loop Offline alarm on Control Loop Instance CLAMP_Runtime -> Database: Mark Control Loop Instance as being offline else No Control Loop Element in Control Loop Instance has exceeded alarm threshold on missed report counter alt Control Loop Instance marked as being offline CLAMP_Runtime -> CLAMP_Runtime: Clear Control Loop Instance Offline alarm on Control Loop CLAMP_Runtime -> Database: Mark Control Loop Instance as being online end end alt Control Loop Element in Control Loop Instance in incorrect state in last reporting window CLAMP_Runtime -> CLAMP_Runtime: Log Control Loop Instance as being in incorrect state CLAMP_Runtime -> Database: Record Control Loop Instance as being in incorrect state alt Control Loop Element in Control Loop Instance has exceeded alarm threshold on incorrect state reports CLAMP_Runtime -> CLAMP_Runtime: Raise a Control Loop Instance in Incorrect State alarm on Control Loop Instance CLAMP_Runtime -> Database: Mark Control Loop Instance as being in an incorrect state end else No Control Loop Element in incorrect state in last reporting window alt Control Loop Element in Control Loop Instance haswas exceededin alarmincorrect thresholdstate on missedprevious report counter CLAMP_Runtime -> CLAMP_Runtime: RaiseLog a Control Loop Instance Offlineas alarmbeing onin Controlcorrect Loopstate CLAMP_Runtime -> Database: MarkRecord Control Loop Instance as being in offlinecorrect state else No Control Loop Element inalt Control Loop Instance in hasIncorrect exceededState alarm thresholdraised on missed report counter alt Control Loop marked as being offlineInstance CLAMP_Runtime -> CLAMP_Runtime: Clear Control Loop Offline Instance in Incorrect State alarm on Control Loop Instance CLAMP_Runtime -> Database: Mark Control Loop Instance as being in correct online state end end end end end @enduml |