4ad57746ce6f90988a6f5a7c852b2003690782fe
[nepi.git] / src / nepi / execution / trace.py
1 #
2 #    NEPI, a framework to manage network experiments
3 #    Copyright (C) 2013 INRIA
4 #
5 #    This program is free software: you can redistribute it and/or modify
6 #    it under the terms of the GNU General Public License as published by
7 #    the Free Software Foundation, either version 3 of the License, or
8 #    (at your option) any later version.
9 #
10 #    This program is distributed in the hope that it will be useful,
11 #    but WITHOUT ANY WARRANTY; without even the implied warranty of
12 #    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 #    GNU General Public License for more details.
14 #
15 #    You should have received a copy of the GNU General Public License
16 #    along with this program.  If not, see <http://www.gnu.org/licenses/>.
17 #
18 # Author: Alina Quereilhac <alina.quereilhac@inria.fr>
19
20 class TraceAttr:
21     """ Trace attributes represent different information
22     aspects that can be retrieved from a trace.
23     """
24     ALL = 'all'
25     STREAM = 'stream'
26     PATH = 'path'
27     SIZE = 'size'
28
29 class Trace(object):
30     """
31     .. class:: Class Args :
32       
33         :param name: Name of the trace
34         :type name: str
35         :param help: Help about the trace
36         :type help: str
37
38     """
39
40     def __init__(self, name, help, enabled = False):
41         self._name = name
42         self._help = help
43         self.enabled = enabled
44
45     @property
46     def name(self):
47         """ Returns the name of the trace """
48         return self._name
49
50     @property
51     def help(self):
52         """ Returns the help of the trace """
53         return self._help
54