Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

more on TCR

  • Loading branch information...
commit 13c92e870ea5ac5b33d384256904f83b9c7d9b70 1 parent 019b91c
tomaso authored
Showing with 24 additions and 6 deletions.
  1. +23 −5 docs/components.tex
  2. +1 −1  docs/vision_document.tex
View
28 docs/components.tex
@@ -1,14 +1,32 @@
\subsection{Time Resource (TCR)}
-Is a process containing a list of time affected entites. At regular time intervals each time affected entity is informed abut current time by means of adedicated messge.
+The resource architecture is the implemented using the observer pattern.
-To support the implement this feature time affected entities are require to implement the interface TimeAffected\footnote{In a second stage implementation this method will become asynchronous...} described hereafter
+TCR is the \textbf{Subject} process. At regular time intervals each time affected entity (\textbf{Observers}) is notified abuot current time by means of a dedicated messge.
-\begin{verbatim}
+To support this feature time affected entities must implement the interface TimeAffected\footnote{
+In a more refined implementation this method will become asynchronous..<<.
+} described hereafter
-interface TimeAffected {
+\begin{verbatim}
+interface TimeAffected_Observer {
- void Tick(Time: TDate);
+ public void sync(Time: Date);
}
+\end{verbatim}
+
+To be informed about time passing by, TAE will register/unregister themselves by TCR using the following interface:
+
+\begin{verbatim}
+interface TimeResource {
+
+ public register(TimeAffected tae) /*throws TimeResourceException*/;
+ public unegister(TimeAffected tae) /*throws TimeResourceException*/;
+ public void notify();
+}
\end{verbatim}
+
+Once registered by TCR, TAE will immediately starts being fed with periodic time passing messages (sync).
+
+To allow variable time simulation speed TCR implements
View
2  docs/vision_document.tex
@@ -37,7 +37,7 @@ \subsection{System core use cases}
\begin{itemize}
\item \textbf{Time passing}
- - Actors: Time, time affected entity
+ - Actors: Time, Time Affected Entity\footnote{from now on named TAE}
- Time will tick and every affected entity is informed about the current simulated universal time
Please sign in to comment.
Something went wrong with that request. Please try again.