PM : (Time * Time * SenseTimeline * ReactionTimeline * Alarm * Alarm * Time * Time) ->
ReactionTimeline * Alarm * Alarm * Time * Time
PM (mk_(i,t,s,r,AA,VA,LastA,LastV)) ==
if i = t then mk_(r,AA,VA,LastA,LastV) elseif mk_(i,<ATRIUM>) inset s then PM(c(i+1,t,s,SensedAtrium(i,r,AA,VA,LastA,LastV))) elseif mk_(i,<VENTRICLE>) inset s then PM(c(i+1,t,s,SensedVentricle(i,r,AA,VA,LastA,LastV))) else PM(c(i+1,t,s,SensedNothing(i,r,AA,VA,LastA,LastV)));
SensedAtrium : Time * ReactionTimeline * Alarm * Alarm * Time * Time -> ReactionTimeline * Alarm * Alarm * Time * Time
SensedAtrium (t,r,AA,VA,LastA,LastV) ==
if t - LastA < ARP or VA > 0 or t - LastA < PVARP -- 5.4.2 or 5.4.5 or 5.4.3 then SensedNothing(t,r,AA,VA,LastA,LastV) else mk_(r,0,t + AVD,t,LastV); -- valid sense + schedule Ventricle
SensedVentricle : Time * ReactionTimeline * Alarm * Alarm * Time * Time -> ReactionTimeline * Alarm * Alarm * Time * Time
SensedVentricle (t,r,AA,VA,LastA,LastV) ==
if t - LastV < VRP -- 5.4.3 then SensedNothing(t,r,AA,VA,LastA,LastV) else mk_(r,t + VAD,0,LastA,t); -- valid sense + unset ventricle alarm
SensedNothing : Time * ReactionTimeline * Alarm * Alarm * Time * Time -> ReactionTimeline * Alarm * Alarm * Time * Time
SensedNothing (t, r, AA, VA,LastA,LastV) ==
if AA > 0 and t >= AA -- Atrium alarm is set and fired then mk_(r union {mk_(t,<ATRIUM>)}, 0, t + AVD,t,LastV) -- atrial pulse + schedule ventrile elseif VA > 0 and t >= VA -- Ventricle alarm is set and fired then mk_(r union {mk_(t,<VENTRICLE>)}, t + VAD, 0,LastA,t) -- pulse ventricle + unset timer else mk_(r, AA, VA,LastA,LastV); -- no alarms
-- Auxiliar funtcions
-- A curry function
c : Time * Time * SenseTimeline * (ReactionTimeline * Alarm * Alarm * Time * Time) -> Time * Time * SenseTimeline * ReactionTimeline * Alarm * Alarm * Time * Time
c (i,t,s,mk_(r,a,v,la,lv)) == mk_(i,t,s,r,a,v,la,lv);
end PacemakerDDD
\end{vdm_al}
¤ Dauer der Verarbeitung: 0.19 Sekunden
(vorverarbeitet)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.