Imported Upstream version 0.4.8
[platform/upstream/libsmi.git] / test / dumps / jax / ProbeConfigImpl.java
1 /*
2  * This Java file has been generated by smidump 0.4.5. It
3  * is intended to be edited by the application programmer and
4  * to be used within a Java AgentX sub-agent environment.
5  *
6  * $Id: ProbeConfigImpl.java 4432 2006-05-29 16:21:11Z strauss $
7  */
8
9 /**
10     This class extends the Java AgentX (JAX) implementation of
11     the scalar group probeConfig defined in RMON2-MIB.
12  */
13
14 import java.util.Vector;
15 import java.util.Enumeration;
16 import jax.AgentXOID;
17 import jax.AgentXSetPhase;
18 import jax.AgentXResponsePDU;
19
20 public class ProbeConfigImpl extends ProbeConfig
21 {
22
23     public byte[] get_probeCapabilities()
24     {
25         return probeCapabilities;
26     }
27
28     public byte[] get_probeSoftwareRev()
29     {
30         return probeSoftwareRev;
31     }
32
33     public byte[] get_probeHardwareRev()
34     {
35         return probeHardwareRev;
36     }
37
38     public byte[] get_probeDateTime()
39     {
40         return probeDateTime;
41     }
42
43     public int set_probeDateTime(AgentXSetPhase phase, byte[] value)
44     {
45         switch (phase.getPhase()) {
46         case AgentXSetPhase.TEST_SET:
47             break;
48         case AgentXSetPhase.COMMIT:
49             undo_probeDateTime = probeDateTime;
50             probeDateTime = new byte[value.length];
51             for(int i = 0; i < value.length; i++)
52                 probeDateTime[i] = value[i];
53             break;
54         case AgentXSetPhase.UNDO:
55             probeDateTime = undo_probeDateTime;
56             break;
57         case AgentXSetPhase.CLEANUP:
58             undo_probeDateTime = null;
59             break;
60         default:
61             return AgentXResponsePDU.PROCESSING_ERROR;
62         }
63         return AgentXResponsePDU.NO_ERROR;
64     }
65
66     public int get_probeResetControl()
67     {
68         return probeResetControl;
69     }
70
71     public int set_probeResetControl(AgentXSetPhase phase, int value)
72     {
73         switch (phase.getPhase()) {
74         case AgentXSetPhase.TEST_SET:
75             break;
76         case AgentXSetPhase.COMMIT:
77             undo_probeResetControl = probeResetControl;
78             probeResetControl = value;
79             break;
80         case AgentXSetPhase.UNDO:
81             probeResetControl = undo_probeResetControl;
82             break;
83         case AgentXSetPhase.CLEANUP:
84             undo_probeResetControl = -1; // TODO: better check!
85             break;
86         default:
87             return AgentXResponsePDU.PROCESSING_ERROR;
88         }
89         return AgentXResponsePDU.NO_ERROR;
90     }
91
92     public byte[] get_probeDownloadFile()
93     {
94         return probeDownloadFile;
95     }
96
97     public int set_probeDownloadFile(AgentXSetPhase phase, byte[] value)
98     {
99         switch (phase.getPhase()) {
100         case AgentXSetPhase.TEST_SET:
101             break;
102         case AgentXSetPhase.COMMIT:
103             undo_probeDownloadFile = probeDownloadFile;
104             probeDownloadFile = new byte[value.length];
105             for(int i = 0; i < value.length; i++)
106                 probeDownloadFile[i] = value[i];
107             break;
108         case AgentXSetPhase.UNDO:
109             probeDownloadFile = undo_probeDownloadFile;
110             break;
111         case AgentXSetPhase.CLEANUP:
112             undo_probeDownloadFile = null;
113             break;
114         default:
115             return AgentXResponsePDU.PROCESSING_ERROR;
116         }
117         return AgentXResponsePDU.NO_ERROR;
118     }
119
120     public byte[] get_probeDownloadTFTPServer()
121     {
122         return probeDownloadTFTPServer;
123     }
124
125     public int set_probeDownloadTFTPServer(AgentXSetPhase phase, byte[] value)
126     {
127         switch (phase.getPhase()) {
128         case AgentXSetPhase.TEST_SET:
129             break;
130         case AgentXSetPhase.COMMIT:
131             undo_probeDownloadTFTPServer = probeDownloadTFTPServer;
132             probeDownloadTFTPServer = new byte[value.length];
133             for(int i = 0; i < value.length; i++)
134                 probeDownloadTFTPServer[i] = value[i];
135             break;
136         case AgentXSetPhase.UNDO:
137             probeDownloadTFTPServer = undo_probeDownloadTFTPServer;
138             break;
139         case AgentXSetPhase.CLEANUP:
140             undo_probeDownloadTFTPServer = null;
141             break;
142         default:
143             return AgentXResponsePDU.PROCESSING_ERROR;
144         }
145         return AgentXResponsePDU.NO_ERROR;
146     }
147
148     public int get_probeDownloadAction()
149     {
150         return probeDownloadAction;
151     }
152
153     public int set_probeDownloadAction(AgentXSetPhase phase, int value)
154     {
155         switch (phase.getPhase()) {
156         case AgentXSetPhase.TEST_SET:
157             break;
158         case AgentXSetPhase.COMMIT:
159             undo_probeDownloadAction = probeDownloadAction;
160             probeDownloadAction = value;
161             break;
162         case AgentXSetPhase.UNDO:
163             probeDownloadAction = undo_probeDownloadAction;
164             break;
165         case AgentXSetPhase.CLEANUP:
166             undo_probeDownloadAction = -1; // TODO: better check!
167             break;
168         default:
169             return AgentXResponsePDU.PROCESSING_ERROR;
170         }
171         return AgentXResponsePDU.NO_ERROR;
172     }
173
174     public int get_probeDownloadStatus()
175     {
176         return probeDownloadStatus;
177     }
178
179 }
180