Previous Topic: snmpGetUpSinceTime FunctionNext Topic: snmpObjectIDToASCIIString Function


snmpMax Function

This function returns the larger of two 64-bit values. Use this function to certify devices.

Syntax

This function has the following format:

Object snmpMax(BigInteger val1, BigInteger val2)

Parameters

val1

The first 64-bit BigInteger value.

val2

The second 64-bit BigInteger value.

Return Values

Returns the maximum of the two BigInteger values passed in, or returns "null" when either BigInteger value input is null.

Examples

The following expression produces the following result for a val1 of 2^32 and a val2 of 10:

Expression:

snmpMax (val1, val2)

Result:

2^32 

The same expression produces the following result for a val1 of 5864 and a val2 of 134556890:

Result:

134556890

Advanced Example

The following expression is taken from “Cisco CBQos ClassMap” Vendor Certification. This certification contains many snmpMax examples:

PrePolicyPackets=snmpMax(0,snmpCounter64(cbQosCMPrePolicyPktOverflow,cbQosCMPrePolicyPkt))