SNMPObject Type
The current SNMP object.
Remarks
This type defines an SNMP object. Each object has an Oid, ObjectType, and Value. These values are populated by the class when incoming packets are received. You may use these fields to define objects to be used in outgoing packets.
Fields
ObjectType int |
The current object's type. The default type is NULL (5). The corresponding object id and value are specified by the Oid and Value fields. Possible object type values include:
The class also supports the following artificial object values used to designate error conditions:
| ||||||||||||||||||||||||||||||
Oid String |
The current object's id which is encoded as a string of numbers separated by periods. For instance: "1.3.6.1.2.1.1.1.0" (OID for "system description"). The corresponding object type and value (if any) are specified by the ObjectType and Value fields. Example SNMPControl.Objects.Add(new SNMPObject()) SNMPControl.Objects(0).Oid = "1.3.6.1.2.1.1.1.0" | ||||||||||||||||||||||||||||||
TypeString String |
A string representation of the current object's ObjectType. The corresponding object id and value are specified by the Oid and Value fields. | ||||||||||||||||||||||||||||||
Value String |
The current object's value. The corresponding object id and type are specified by the Oid and ObjectType fields. Example SNMPControl.Objects.Add(new SNMPObject()) SNMPControl.Objects(0).Oid = "1.3.6.1.2.1.1.1.0" SNMPControl.Objects(0).Value = "New Value" | ||||||||||||||||||||||||||||||
ValueB byte[] |
The current object's value. The corresponding object id and type are specified by the Oid and ObjectType fields. Example SNMPControl.Objects.Add(new SNMPObject()) SNMPControl.Objects(0).Oid = "1.3.6.1.2.1.1.1.0" SNMPControl.Objects(0).Value = "New Value" |
Constructors
public SNMPObject();
public SNMPObject(String oid);
public SNMPObject(String oid, byte[] value);
public SNMPObject(String oid, byte[] value, int SNMPObjectType);