INSTITUT FÃR INFORMATIK Entwurf und Implementierung - Ludwig ...
INSTITUT FÃR INFORMATIK Entwurf und Implementierung - Ludwig ...
INSTITUT FÃR INFORMATIK Entwurf und Implementierung - Ludwig ...
Sie wollen auch ein ePaper? Erhöhen Sie die Reichweite Ihrer Titel.
YUMPU macht aus Druck-PDFs automatisch weboptimierte ePaper, die Google liebt.
Anhang C Quellcode des PredictionSystem<br />
34 void CheckTimeouts(time_t time);<br />
35<br />
36 /// PredictionState: enum of evailable states<br />
37 enum PredictionState<br />
38 {<br />
39 InterIctal, ///< Inter ictal state<br />
40 PreIctalSPH, ///< Pre ictal state during SPH<br />
41 PreIctalSOP, ///< Pre ictal state during SOP<br />
42 PostIctal ///< Post ictal state<br />
43 };<br />
44<br />
45 PredictionState state; ///< Current system state<br />
46 time_t currentTime; ///< Current time (in seconds)<br />
47 time_t lastAlarmTime; ///< Time of the last alarm (in seconds)<br />
48 time_t lastSeizureTime; ///< Time of the last seizure (in seconds)<br />
49 int lastSeizure; ///< No. of the last seizure<br />
50<br />
51 Parameter* parameter; ///< Prediction parameters (stored externally)<br />
52 };<br />
53<br />
54 #endif // PREDICTION_SYSTEM_H<br />
Auistung C.1: Header-Datei der Klasse PredictionSystem.<br />
✆<br />
1 #include "AnalysisFramework.h"<br />
2<br />
3<br />
4 /////////////////////////////////////////////////////////////////////////////<br />
5 /// public constructor PredictionSystem<br />
6 ///<br />
7 PredictionSystem::PredictionSystem() {<br />
8<br />
9 state = InterIctal;<br />
10 lastAlarmTime = -1;<br />
11 lastSeizureTime = -1;<br />
12 lastSeizure = -1;<br />
13 }<br />
14<br />
15 /////////////////////////////////////////////////////////////////////////////<br />
16 /// public SignalAlarm<br />
17 /// Signals an alarm event<br />
18 ///<br />
19 /// @param [in] alarmTime time_t Time of the alarm (in seconds)<br />
20 ///<br />
21 void PredictionSystem::SignalAlarm(time_t alarmTime) {<br />
22<br />
23 CheckTimeouts(alarmTime);<br />
24<br />
xiv