java.lang.Object
org.snmp4j.agent.mo.snmp.tc.TruthValueTC
- All Implemented Interfaces:
TextualConvention<org.snmp4j.smi.Integer32>
TruthValueTC implements the TruthValue Textual Convention from RFC
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionMOColumn
<org.snmp4j.smi.Integer32> createColumn
(int columnID, int syntax, MOAccess access, org.snmp4j.smi.Integer32 defaultValue, boolean mutableInService) Creates a MOColumn instance of this TC specified by the column ID, access, default value, and mutable flag.org.snmp4j.smi.Integer32
Creates an initial value for an object instance of this textual convention.MOScalar
<org.snmp4j.smi.Integer32> createScalar
(org.snmp4j.smi.OID oid, MOAccess access, org.snmp4j.smi.Integer32 value) Creates a MOScalar instance of this TC specified by OID, access, and optional value.static boolean
getBooleanValue
(org.snmp4j.smi.Integer32 truthValue) Gets the boolean value of a TruthValue variable.Returns the MIB module name that defined this textual convention.getName()
Returns the name of the textual convention as defined in the MIB module.static org.snmp4j.smi.Integer32
getValue
(boolean b)
-
Field Details
-
TRUE
public static final int TRUE- See Also:
-
FALSE
public static final int FALSE- See Also:
-
-
Constructor Details
-
TruthValueTC
public TruthValueTC()
-
-
Method Details
-
createColumn
public MOColumn<org.snmp4j.smi.Integer32> createColumn(int columnID, int syntax, MOAccess access, org.snmp4j.smi.Integer32 defaultValue, boolean mutableInService) Description copied from interface:TextualConvention
Creates a MOColumn instance of this TC specified by the column ID, access, default value, and mutable flag.- Specified by:
createColumn
in interfaceTextualConvention<org.snmp4j.smi.Integer32>
- Parameters:
columnID
- the column id as defined in the MIB module (typically starting at one).syntax
- the SMI syntax supported by the column.access
- the access definition.defaultValue
- the default value ornull
if there is no DEFVAL clause for this column.mutableInService
-true
if this column may be modified while row is in service.- Returns:
- the MOColumn created.
-
createScalar
public MOScalar<org.snmp4j.smi.Integer32> createScalar(org.snmp4j.smi.OID oid, MOAccess access, org.snmp4j.smi.Integer32 value) Description copied from interface:TextualConvention
Creates a MOScalar instance of this TC specified by OID, access, and optional value.- Specified by:
createScalar
in interfaceTextualConvention<org.snmp4j.smi.Integer32>
- Parameters:
oid
- the OID of the scalar isntance.access
- the access definition.value
- theVariable
instance containing the value of the scalar. Ifvalue
isnull
, the TC should create an initial value withTextualConvention.createInitialValue()
.- Returns:
- a MOScalar instance.
-
getModuleName
Description copied from interface:TextualConvention
Returns the MIB module name that defined this textual convention.- Specified by:
getModuleName
in interfaceTextualConvention<org.snmp4j.smi.Integer32>
- Returns:
- an unique module name
-
getName
Description copied from interface:TextualConvention
Returns the name of the textual convention as defined in the MIB module.- Specified by:
getName
in interfaceTextualConvention<org.snmp4j.smi.Integer32>
- Returns:
- the unique name (within the MIB module) of the TC.
-
getValue
public static org.snmp4j.smi.Integer32 getValue(boolean b) -
createInitialValue
public org.snmp4j.smi.Integer32 createInitialValue()Description copied from interface:TextualConvention
Creates an initial value for an object instance of this textual convention.- Specified by:
createInitialValue
in interfaceTextualConvention<org.snmp4j.smi.Integer32>
- Returns:
- a Variable instance with a valid value (according to this TC).
-
getBooleanValue
public static boolean getBooleanValue(org.snmp4j.smi.Integer32 truthValue) Gets the boolean value of a TruthValue variable.- Parameters:
truthValue
- a TruthValue.- Returns:
true
iftruthValue
equalsTRUE
.- Since:
- 2.0
-