aboutsummaryrefslogtreecommitdiff
path: root/events.dot
blob: 658240bbd394a9a84366c47ee596a8e32ff1ce3f (plain)
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
47
48
49
50
51
52
53
54
55
56
57
58
/* This DOT file represents the logical interaction between
 * the events in the system and the "state" of tlsdated.
 */
digraph tlsdated {
  graph[compound=true];

  node[style=filled,color=lightblue];

  subgraph cluster_states {
    state_label[shape=box,style=dashed,label="States"];
    sleep -> wake;
    wake -> sync;
    sync -> save;
    save -> sleep;
    wake -> terminate;
    sync -> terminate;
    save -> terminate;
  }

  subgraph cluster_wake {
    color=purple;
    style=filled;
    wake_label[shape=box,style=dashed,label="Wake Events"];
    periodic_local_clock_check -> wake;
    periodic_network_sync -> wake;
    random_sigterm -> wake;
    random_route_change -> wake;
  }

  subgraph cluster_dbus {
    dbus_label[shape=box,style=dashed,label="DBus Events"];
    dbus-> cros_shill_manager_change -> wake;
    dbus-> cros_shill_service_change -> wake;
    dbus -> cros_proxy_resolved -> {proxy_ok, proxy_failed};
    dbus -> cros_user_set_time -> save;
            cros_user_set_time -> sync [style=dotted];
    get_proxy -> cros_resolve_proxy -> dbus;
    announce -> dbus;
  }

  subgraph cluster_sync {
    sync_label[shape=box,style=dashed,label="Network Sync"];
    sync -> get_proxy -> {proxy_ok, proxy_failed, proxy_timed_out} -> tlsdate;
    tlsdate -> tlsdate_ok -> save;
    tlsdate -> tlsdate_fail;
    tlsdate_fail -> tlsdate [label="retry",style=dotted];
    tlsdate_fail -> terminate;
  };

  subgraph cluster_save {
    save_label[shape=box,style=dashed,label="Save to the system"];
    save -> { synchronize_rtc, synchronize_kernel, synchronize_disk } -> { save_ok, save_fail, save_bad_time };
    save_ok -> announce -> sleep;
    save_fail -> terminate;
    save_bad_time -> sleep;
  }
}