Commit | Line | Data |
---|---|---|
eb1bab5b BH |
1 | /********************************************************************** |
2 | * Copyright (c) 2012 Ericsson | |
3 | * | |
4 | * All rights reserved. This program and the accompanying materials are | |
5 | * made available under the terms of the Eclipse Public License v1.0 which | |
6 | * accompanies this distribution, and is available at | |
7 | * http://www.eclipse.org/legal/epl-v10.html | |
8 | * | |
9 | * Contributors: | |
10 | * Bernd Hufmann - Initial API and implementation | |
11 | **********************************************************************/ | |
31a6a4e4 | 12 | package org.eclipse.linuxtools.internal.lttng.ui.views.control.model; |
eb1bab5b BH |
13 | |
14 | import java.util.List; | |
15 | ||
16 | /** | |
17 | * <b><u>IChannelInfo</u></b> | |
18 | * <p> | |
19 | * Interface for retrieval of trace channel information. | |
20 | * </p> | |
21 | */ | |
22 | public interface IChannelInfo extends ITraceInfo { | |
23 | ||
bbb3538a BH |
24 | // ------------------------------------------------------------------------ |
25 | // Constants | |
26 | // ------------------------------------------------------------------------ | |
27 | /** | |
28 | * Default value for overwrite mode. | |
29 | */ | |
30 | public final static boolean DEFAULT_OVERWRITE_MODE = false; | |
31 | /** | |
32 | * Default value for sub-buffer size for a UST channel. | |
33 | */ | |
34 | public final static long DEFAULT_SUB_BUFFER_SIZE_UST = 4096L; | |
35 | /** | |
36 | * Default value for sub-buffer size for a Kernel channel. | |
37 | */ | |
38 | public final static long DEFAULT_SUB_BUFFER_SIZE_KERNEL = 262144L; | |
39 | /** | |
40 | * Default value for number of sub-buffer a UST channel. | |
41 | */ | |
42 | public final static int DEFAULT_NUMBER_OF_SUB_BUFFERS_UST = 8; | |
43 | /** | |
44 | * Default value for number of sub-buffer a Kernel channel. | |
45 | */ | |
46 | public final static int DEFAULT_NUMBER_OF_SUB_BUFFERS_KERNEL = 4; | |
47 | /** | |
48 | * Default value for number of the switch timer interval. | |
49 | */ | |
50 | public final static long DEFAULT_SWITCH_TIMER = 0; | |
51 | /** | |
52 | * Default value for number of the read timer interval. | |
53 | */ | |
54 | public final static long DEFAULT_READ_TIMER = 200; | |
55 | ||
eb1bab5b BH |
56 | /** |
57 | * @return the overwrite mode value. | |
58 | */ | |
59 | public boolean isOverwriteMode(); | |
60 | /** | |
61 | * Sets the overwrite mode value to the given mode. | |
62 | * @param mode - mode to set. | |
63 | */ | |
64 | public void setOverwriteMode(boolean mode); | |
65 | ||
66 | /** | |
67 | * @return the sub-buffer size. | |
68 | */ | |
69 | public long getSubBufferSize(); | |
70 | /** | |
71 | * Sets the sub-buffer size to the given value. | |
72 | * @param bufferSize - size to set to set. | |
73 | */ | |
74 | public void setSubBufferSize(long bufferSize); | |
75 | ||
76 | /** | |
77 | * @return the number of sub-buffers. | |
78 | */ | |
79 | public int getNumberOfSubBuffers(); | |
80 | /** | |
81 | * Sets the number of sub-buffers to the given value. | |
82 | * @param numberOfSubBuffers - value to set. | |
83 | */ | |
84 | public void setNumberOfSubBuffers(int numberOfSubBuffers); | |
85 | ||
86 | /** | |
87 | * @return the switch timer interval. | |
88 | */ | |
89 | public long getSwitchTimer(); | |
90 | /** | |
91 | * Sets the switch timer interval to the given value. | |
92 | * @param timer - timer value to set. | |
93 | */ | |
94 | public void setSwitchTimer(long timer); | |
95 | ||
96 | /** | |
97 | * @return the read timer interval. | |
98 | */ | |
99 | public long getReadTimer(); | |
100 | /** | |
101 | * Sets the read timer interval to the given value. | |
102 | * @param timer - timer value to set.. | |
103 | */ | |
104 | public void setReadTimer(long timer); | |
105 | ||
106 | /** | |
107 | * @return the output type. | |
108 | */ | |
109 | public String getOutputType(); | |
110 | /** | |
111 | * Sets the output type to the given value. | |
112 | * @param type - type to set. | |
113 | */ | |
114 | public void setOutputType(String type); | |
115 | ||
116 | /** | |
117 | * @return the channel state (enabled or disabled). | |
118 | */ | |
119 | public TraceEnablement getState(); | |
120 | /** | |
121 | * Sets the channel state (enablement) to the given value. | |
122 | * @param state - state to set. | |
123 | */ | |
124 | public void setState(TraceEnablement state); | |
125 | /** | |
126 | * Sets the channel state (enablement) to the value specified by the given name. | |
127 | * @param stateName - state to set. | |
128 | */ | |
129 | public void setState(String stateName); | |
130 | ||
131 | /** | |
132 | * @return all event information as array. | |
133 | */ | |
134 | public IEventInfo[] getEvents(); | |
135 | /** | |
136 | * Sets the event information specified by given list. | |
137 | * @param events - all event information to set. | |
138 | */ | |
139 | public void setEvents(List<IEventInfo> events); | |
140 | /** | |
141 | * Adds a single event information. | |
142 | * @param event - event information to add. | |
143 | */ | |
144 | public void addEvent(IEventInfo event); | |
145 | } |