2 * This Java file has been generated by smidump 0.4.5. Do not edit!
3 * It is intended to be used within a Java AgentX sub-agent environment.
5 * $Id: ProbeConfig.java 4432 2006-05-29 16:21:11Z strauss $
9 This class represents a Java AgentX (JAX) implementation of
10 the scalar group probeConfig defined in RMON2-MIB.
14 @see AgentXGroup, AgentXScalars
17 import java.util.Vector;
18 import java.util.Enumeration;
20 import jax.AgentXVarBind;
21 import jax.AgentXSetPhase;
22 import jax.AgentXResponsePDU;
23 import jax.AgentXScalars;
25 public class ProbeConfig extends AgentXScalars
28 private final static long[] ProbeConfigOID = {1, 3, 6, 1, 2, 1, 16, 19};
30 protected AgentXOID ProbeCapabilitiesOID;
31 protected final static long[] ProbeCapabilitiesName = {1, 3, 6, 1, 2, 1, 16, 19, 1, 0};
32 protected byte[] probeCapabilities = new byte[0];
33 protected AgentXOID ProbeSoftwareRevOID;
34 protected final static long[] ProbeSoftwareRevName = {1, 3, 6, 1, 2, 1, 16, 19, 2, 0};
35 protected byte[] probeSoftwareRev = new byte[0];
36 protected AgentXOID ProbeHardwareRevOID;
37 protected final static long[] ProbeHardwareRevName = {1, 3, 6, 1, 2, 1, 16, 19, 3, 0};
38 protected byte[] probeHardwareRev = new byte[0];
39 protected AgentXOID ProbeDateTimeOID;
40 protected final static long[] ProbeDateTimeName = {1, 3, 6, 1, 2, 1, 16, 19, 4, 0};
41 protected byte[] probeDateTime = new byte[0];
42 protected byte[] undo_probeDateTime = new byte[0];
43 protected AgentXOID ProbeResetControlOID;
44 protected final static long[] ProbeResetControlName = {1, 3, 6, 1, 2, 1, 16, 19, 5, 0};
45 protected int probeResetControl = 0;
46 protected int undo_probeResetControl = 0;
47 protected AgentXOID ProbeDownloadFileOID;
48 protected final static long[] ProbeDownloadFileName = {1, 3, 6, 1, 2, 1, 16, 19, 6, 0};
49 protected byte[] probeDownloadFile = new byte[0];
50 protected byte[] undo_probeDownloadFile = new byte[0];
51 protected AgentXOID ProbeDownloadTFTPServerOID;
52 protected final static long[] ProbeDownloadTFTPServerName = {1, 3, 6, 1, 2, 1, 16, 19, 7, 0};
53 protected byte[] probeDownloadTFTPServer = new byte[4];
54 protected byte[] undo_probeDownloadTFTPServer = new byte[4];
55 protected AgentXOID ProbeDownloadActionOID;
56 protected final static long[] ProbeDownloadActionName = {1, 3, 6, 1, 2, 1, 16, 19, 8, 0};
57 protected int probeDownloadAction = 0;
58 protected int undo_probeDownloadAction = 0;
59 protected AgentXOID ProbeDownloadStatusOID;
60 protected final static long[] ProbeDownloadStatusName = {1, 3, 6, 1, 2, 1, 16, 19, 9, 0};
61 protected int probeDownloadStatus = 0;
64 oid = new AgentXOID(ProbeConfigOID);
66 ProbeCapabilitiesOID = new AgentXOID(ProbeCapabilitiesName);
67 data.addElement(ProbeCapabilitiesOID);
68 ProbeSoftwareRevOID = new AgentXOID(ProbeSoftwareRevName);
69 data.addElement(ProbeSoftwareRevOID);
70 ProbeHardwareRevOID = new AgentXOID(ProbeHardwareRevName);
71 data.addElement(ProbeHardwareRevOID);
72 ProbeDateTimeOID = new AgentXOID(ProbeDateTimeName);
73 data.addElement(ProbeDateTimeOID);
74 ProbeResetControlOID = new AgentXOID(ProbeResetControlName);
75 data.addElement(ProbeResetControlOID);
76 ProbeDownloadFileOID = new AgentXOID(ProbeDownloadFileName);
77 data.addElement(ProbeDownloadFileOID);
78 ProbeDownloadTFTPServerOID = new AgentXOID(ProbeDownloadTFTPServerName);
79 data.addElement(ProbeDownloadTFTPServerOID);
80 ProbeDownloadActionOID = new AgentXOID(ProbeDownloadActionName);
81 data.addElement(ProbeDownloadActionOID);
82 ProbeDownloadStatusOID = new AgentXOID(ProbeDownloadStatusName);
83 data.addElement(ProbeDownloadStatusOID);
86 public byte[] get_probeCapabilities()
88 return probeCapabilities;
91 public byte[] get_probeSoftwareRev()
93 return probeSoftwareRev;
96 public byte[] get_probeHardwareRev()
98 return probeHardwareRev;
101 public byte[] get_probeDateTime()
103 return probeDateTime;
106 public int set_probeDateTime(AgentXSetPhase phase, byte[] value)
108 switch (phase.getPhase()) {
109 case AgentXSetPhase.TEST_SET:
111 case AgentXSetPhase.COMMIT:
112 undo_probeDateTime = probeDateTime;
113 probeDateTime = new byte[value.length];
114 for(int i = 0; i < value.length; i++)
115 probeDateTime[i] = value[i];
117 case AgentXSetPhase.UNDO:
118 probeDateTime = undo_probeDateTime;
120 case AgentXSetPhase.CLEANUP:
121 undo_probeDateTime = null;
124 return AgentXResponsePDU.PROCESSING_ERROR;
126 return AgentXResponsePDU.NO_ERROR;
128 public int get_probeResetControl()
130 return probeResetControl;
133 public int set_probeResetControl(AgentXSetPhase phase, int value)
135 switch (phase.getPhase()) {
136 case AgentXSetPhase.TEST_SET:
138 case AgentXSetPhase.COMMIT:
139 undo_probeResetControl = probeResetControl;
140 probeResetControl = value;
142 case AgentXSetPhase.UNDO:
143 probeResetControl = undo_probeResetControl;
145 case AgentXSetPhase.CLEANUP:
148 return AgentXResponsePDU.PROCESSING_ERROR;
150 return AgentXResponsePDU.NO_ERROR;
152 public byte[] get_probeDownloadFile()
154 return probeDownloadFile;
157 public int set_probeDownloadFile(AgentXSetPhase phase, byte[] value)
159 switch (phase.getPhase()) {
160 case AgentXSetPhase.TEST_SET:
162 case AgentXSetPhase.COMMIT:
163 undo_probeDownloadFile = probeDownloadFile;
164 probeDownloadFile = new byte[value.length];
165 for(int i = 0; i < value.length; i++)
166 probeDownloadFile[i] = value[i];
168 case AgentXSetPhase.UNDO:
169 probeDownloadFile = undo_probeDownloadFile;
171 case AgentXSetPhase.CLEANUP:
172 undo_probeDownloadFile = null;
175 return AgentXResponsePDU.PROCESSING_ERROR;
177 return AgentXResponsePDU.NO_ERROR;
179 public byte[] get_probeDownloadTFTPServer()
181 return probeDownloadTFTPServer;
184 public int set_probeDownloadTFTPServer(AgentXSetPhase phase, byte[] value)
186 switch (phase.getPhase()) {
187 case AgentXSetPhase.TEST_SET:
189 case AgentXSetPhase.COMMIT:
190 undo_probeDownloadTFTPServer = probeDownloadTFTPServer;
191 probeDownloadTFTPServer = new byte[value.length];
192 for(int i = 0; i < value.length; i++)
193 probeDownloadTFTPServer[i] = value[i];
195 case AgentXSetPhase.UNDO:
196 probeDownloadTFTPServer = undo_probeDownloadTFTPServer;
198 case AgentXSetPhase.CLEANUP:
199 undo_probeDownloadTFTPServer = null;
202 return AgentXResponsePDU.PROCESSING_ERROR;
204 return AgentXResponsePDU.NO_ERROR;
206 public int get_probeDownloadAction()
208 return probeDownloadAction;
211 public int set_probeDownloadAction(AgentXSetPhase phase, int value)
213 switch (phase.getPhase()) {
214 case AgentXSetPhase.TEST_SET:
216 case AgentXSetPhase.COMMIT:
217 undo_probeDownloadAction = probeDownloadAction;
218 probeDownloadAction = value;
220 case AgentXSetPhase.UNDO:
221 probeDownloadAction = undo_probeDownloadAction;
223 case AgentXSetPhase.CLEANUP:
226 return AgentXResponsePDU.PROCESSING_ERROR;
228 return AgentXResponsePDU.NO_ERROR;
230 public int get_probeDownloadStatus()
232 return probeDownloadStatus;
235 public AgentXVarBind getScalar(AgentXOID pos, AgentXOID oid)
237 if ((pos == null) || (pos.compareTo(oid) != 0))
238 return new AgentXVarBind(oid, AgentXVarBind.NOSUCHOBJECT);
240 if (pos == ProbeCapabilitiesOID)
241 return new AgentXVarBind(oid, AgentXVarBind.OCTETSTRING,
242 get_probeCapabilities());
243 if (pos == ProbeSoftwareRevOID)
244 return new AgentXVarBind(oid, AgentXVarBind.OCTETSTRING,
245 get_probeSoftwareRev());
246 if (pos == ProbeHardwareRevOID)
247 return new AgentXVarBind(oid, AgentXVarBind.OCTETSTRING,
248 get_probeHardwareRev());
249 if (pos == ProbeDateTimeOID)
250 return new AgentXVarBind(oid, AgentXVarBind.OCTETSTRING,
251 get_probeDateTime());
252 if (pos == ProbeResetControlOID)
253 return new AgentXVarBind(oid, AgentXVarBind.INTEGER,
254 get_probeResetControl());
255 if (pos == ProbeDownloadFileOID)
256 return new AgentXVarBind(oid, AgentXVarBind.OCTETSTRING,
257 get_probeDownloadFile());
258 if (pos == ProbeDownloadTFTPServerOID)
259 return new AgentXVarBind(oid, AgentXVarBind.IPADDRESS,
260 get_probeDownloadTFTPServer());
261 if (pos == ProbeDownloadActionOID)
262 return new AgentXVarBind(oid, AgentXVarBind.INTEGER,
263 get_probeDownloadAction());
264 if (pos == ProbeDownloadStatusOID)
265 return new AgentXVarBind(oid, AgentXVarBind.INTEGER,
266 get_probeDownloadStatus());
268 return new AgentXVarBind(oid, AgentXVarBind.NOSUCHOBJECT);
271 public int setScalar(AgentXSetPhase phase, AgentXOID pos,
274 if ((pos == null) || (pos.compareTo(inVb.getOID()) != 0))
275 return AgentXResponsePDU.INCONSISTENT_NAME;
277 if (pos == ProbeDateTimeOID)
278 return set_probeDateTime(phase, inVb.bytesValue());
279 if (pos == ProbeResetControlOID)
280 return set_probeResetControl(phase, inVb.intValue());
281 if (pos == ProbeDownloadFileOID)
282 return set_probeDownloadFile(phase, inVb.bytesValue());
283 if (pos == ProbeDownloadTFTPServerOID)
284 return set_probeDownloadTFTPServer(phase, inVb.bytesValue());
285 if (pos == ProbeDownloadActionOID)
286 return set_probeDownloadAction(phase, inVb.intValue());
288 return AgentXResponsePDU.NOT_WRITABLE;
291 public AgentXVarBind getNextScalar(AgentXOID pos, AgentXOID oid)
293 if ((pos == null) || (pos.compareTo(oid) <= 0))
294 return new AgentXVarBind(oid, AgentXVarBind.ENDOFMIBVIEW);
296 if (pos == ProbeCapabilitiesOID)
297 return new AgentXVarBind(pos, AgentXVarBind.OCTETSTRING,
298 get_probeCapabilities());
299 if (pos == ProbeSoftwareRevOID)
300 return new AgentXVarBind(pos, AgentXVarBind.OCTETSTRING,
301 get_probeSoftwareRev());
302 if (pos == ProbeHardwareRevOID)
303 return new AgentXVarBind(pos, AgentXVarBind.OCTETSTRING,
304 get_probeHardwareRev());
305 if (pos == ProbeDateTimeOID)
306 return new AgentXVarBind(pos, AgentXVarBind.OCTETSTRING,
307 get_probeDateTime());
308 if (pos == ProbeResetControlOID)
309 return new AgentXVarBind(pos, AgentXVarBind.INTEGER,
310 get_probeResetControl());
311 if (pos == ProbeDownloadFileOID)
312 return new AgentXVarBind(pos, AgentXVarBind.OCTETSTRING,
313 get_probeDownloadFile());
314 if (pos == ProbeDownloadTFTPServerOID)
315 return new AgentXVarBind(pos, AgentXVarBind.IPADDRESS,
316 get_probeDownloadTFTPServer());
317 if (pos == ProbeDownloadActionOID)
318 return new AgentXVarBind(pos, AgentXVarBind.INTEGER,
319 get_probeDownloadAction());
320 if (pos == ProbeDownloadStatusOID)
321 return new AgentXVarBind(pos, AgentXVarBind.INTEGER,
322 get_probeDownloadStatus());
324 return new AgentXVarBind(pos, AgentXVarBind.ENDOFMIBVIEW);