Imported Upstream version 0.4.8
[platform/upstream/libsmi.git] / test / dumps / jax / IfEntry.java
1 /*
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.
4  *
5  * $Id: IfEntry.java 4432 2006-05-29 16:21:11Z strauss $
6  */
7
8 /**
9     This class represents a Java AgentX (JAX) implementation of
10     the table row ifEntry defined in IF-MIB.
11
12     @version 1
13     @author  smidump 0.4.5
14     @see     AgentXTable, AgentXEntry
15  */
16
17 import jax.AgentXOID;
18 import jax.AgentXSetPhase;
19 import jax.AgentXResponsePDU;
20 import jax.AgentXEntry;
21
22 public class IfEntry extends AgentXEntry
23 {
24
25     protected int ifIndex = 0;
26     protected byte[] ifDescr = new byte[0];
27     protected int ifType = 0;
28     protected int ifMtu = 0;
29     protected long ifSpeed = 0;
30     protected byte[] ifPhysAddress = new byte[0];
31     protected int ifAdminStatus = 0;
32     protected int undo_ifAdminStatus = 0;
33     protected int ifOperStatus = 0;
34     protected long ifLastChange = 0;
35     protected long ifInOctets = 0;
36     protected long ifInUcastPkts = 0;
37     protected long ifInNUcastPkts = 0;
38     protected long ifInDiscards = 0;
39     protected long ifInErrors = 0;
40     protected long ifInUnknownProtos = 0;
41     protected long ifOutOctets = 0;
42     protected long ifOutUcastPkts = 0;
43     protected long ifOutNUcastPkts = 0;
44     protected long ifOutDiscards = 0;
45     protected long ifOutErrors = 0;
46     protected long ifOutQLen = 0;
47     protected AgentXOID ifSpecific = new AgentXOID();
48
49     public IfEntry(int ifIndex)
50     {
51         this.ifIndex = ifIndex;
52
53         instance.append(ifIndex);
54     }
55
56     public int get_ifIndex()
57     {
58         return ifIndex;
59     }
60
61     public byte[] get_ifDescr()
62     {
63         return ifDescr;
64     }
65
66     public int get_ifType()
67     {
68         return ifType;
69     }
70
71     public int get_ifMtu()
72     {
73         return ifMtu;
74     }
75
76     public long get_ifSpeed()
77     {
78         return ifSpeed;
79     }
80
81     public byte[] get_ifPhysAddress()
82     {
83         return ifPhysAddress;
84     }
85
86     public int get_ifAdminStatus()
87     {
88         return ifAdminStatus;
89     }
90
91     public int set_ifAdminStatus(AgentXSetPhase phase, int value)
92     {
93         switch (phase.getPhase()) {
94         case AgentXSetPhase.TEST_SET:
95             break;
96         case AgentXSetPhase.COMMIT:
97             undo_ifAdminStatus = ifAdminStatus;
98             ifAdminStatus = value;
99             break;
100         case AgentXSetPhase.UNDO:
101             ifAdminStatus = undo_ifAdminStatus;
102             break;
103         case AgentXSetPhase.CLEANUP:
104             break;
105         default:
106             return AgentXResponsePDU.PROCESSING_ERROR;
107         }
108         return AgentXResponsePDU.NO_ERROR;
109     }
110     public int get_ifOperStatus()
111     {
112         return ifOperStatus;
113     }
114
115     public long get_ifLastChange()
116     {
117         return ifLastChange;
118     }
119
120     public long get_ifInOctets()
121     {
122         return ifInOctets;
123     }
124
125     public long get_ifInUcastPkts()
126     {
127         return ifInUcastPkts;
128     }
129
130     public long get_ifInNUcastPkts()
131     {
132         return ifInNUcastPkts;
133     }
134
135     public long get_ifInDiscards()
136     {
137         return ifInDiscards;
138     }
139
140     public long get_ifInErrors()
141     {
142         return ifInErrors;
143     }
144
145     public long get_ifInUnknownProtos()
146     {
147         return ifInUnknownProtos;
148     }
149
150     public long get_ifOutOctets()
151     {
152         return ifOutOctets;
153     }
154
155     public long get_ifOutUcastPkts()
156     {
157         return ifOutUcastPkts;
158     }
159
160     public long get_ifOutNUcastPkts()
161     {
162         return ifOutNUcastPkts;
163     }
164
165     public long get_ifOutDiscards()
166     {
167         return ifOutDiscards;
168     }
169
170     public long get_ifOutErrors()
171     {
172         return ifOutErrors;
173     }
174
175     public long get_ifOutQLen()
176     {
177         return ifOutQLen;
178     }
179
180     public AgentXOID get_ifSpecific()
181     {
182         return ifSpecific;
183     }
184
185 }
186