32411d57976d8aaa8065e4aa31a528eb924a9365
[platform/upstream/connman.git] / doc / counter-api.txt
1 Counter hierarchy
2 =================
3
4 Service         unique name
5 Interface       net.connman.Counter
6 Object path     freely definable
7
8 Methods         void Release()
9
10                         This method gets called when the service daemon
11                         unregisters the counter. A counter can use it to do
12                         cleanup tasks. There is no need to unregister the
13                         counter, because when this method gets called it has
14                         already been unregistered.
15
16                 void Usage(object service, dict home, dict roaming)
17
18                         This signal indicates a change in the counter values
19                         for the service object. The counter is reset by calling
20                         the service ResetCounters method.
21
22                         When registering a new counter this method will be
23                         called once with all details for "home" and "roaming"
24                         counters filled in. Every further method call will
25                         only include the changed values.
26
27                         When "home" counter is active, then "roaming" counter
28                         will contain an empty dictionary and vise-versa.
29
30                         The dictionary argument contains the following entries:
31
32                                 RX.Packets
33
34                                         Total number of packets received.
35
36                                 TX.Bytes
37
38                                         Total number of packets sent.
39
40                                 RX.Bytes
41
42                                         Total number of bytes received.
43
44                                 TX.Bytes
45
46                                         Total number of bytes sent.
47
48                                 RX.Errors
49
50                                         Total number of erronous packets
51                                         received.
52
53                                 TX.Errors
54
55                                         Total number of erronous packets
56                                         sent.
57
58                                 RX.Dropped
59
60                                         Total number of dropped packets
61                                         while receiving.
62
63                                 TX.Dropped
64
65                                         Total number of dropped packets
66                                         while sending.
67
68                                 Time
69
70                                         Total number of seconds online.