-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnode-uml.tex
More file actions
46 lines (39 loc) · 1.66 KB
/
node-uml.tex
File metadata and controls
46 lines (39 loc) · 1.66 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
\begin{center}
\begin{tikzpicture}
\begin{umlseqdiag}
\umlobject[class=Node]{x}
\umlobject[class=Node,x=5]{y}
\begin{umlcall}[op={requestNodes($addr_x$)}, return=active nodes to y]{x}{y}
\begin{umlcall}[op={setUnknown($addr_x$)}]{y}{y}
\end{umlcall}
\end{umlcall}
\begin{umlfragment}[name=check, type=alt, label={online}, inner xsep=5]
\begin{umlcall}[op={requestInfo}, return=info, dt=8]{y}{x}
\end{umlcall}
\begin{umlcall}[op={setActive($addr_x$)}]{y}{y}
\end{umlcall}
\umlfpart[offline]
\begin{umlcall}[op={requestInfo}]{y}{x}
\end{umlcall}
\begin{umlcall}[op={setInactive($addr_x$)}, dt=0]{y}{y}
\end{umlcall}
\end{umlfragment}
%\umlnote[x=2, y=-11]{check}{Check node is active or not}
\end{umlseqdiag}
\end{tikzpicture}
\captionof{figure}{Node Discovery Sequence Diagram\label{fig:node-discovery-seq}}
\end{center}
\begin{center}
\begin{tikzpicture} % [show background grid ]
\umlclass[simple=true,type=class,x=0,y=0]{Packet}{}{}
\umlclass[simple=false,type=abstract,x=-3,y=-5]{ProofOfWork}{POWAlgorithm : algorithm\\PayloadHash : binary\\Proof : binary\\ValidFrom : timestamp\\ValidTo : timestamp}{}
\umlclass[simple=false,type=abstract,x=3,y=-5]{Payload}{\umlvirt{classFlag : byte}\\message : binary}{}
\umlclass[simple=true,type=class,x=-1,y=-9]{BroadcastPayload}{}{}
\umlclass[simple=true,type=class,x=4,y=-9]{DataPayload}{}{}
\umlcompo[attr1=1|, attr2=1|, pos2=0.5]{Packet}{ProofOfWork}
\umlcompo[attr1=1|, attr2=1|, pos2=0.5]{Packet}{Payload}
\umlinherit{BroadcastPayload}{Payload}
\umlinherit{DataPayload}{Payload}
\end{tikzpicture}
\captionof{figure}{Node Packet Class Structure\label{fig:node-uml-class}}
\end{center}