This function rounds a numeric value to the nearest integer value.
Syntax
This function has the following format:
Long snmpRound(Double dNumber)
Parameters
A Double value (floating number) to be rounded (Double is a Java data type).
Return Values
Returns a Long value, which is the nearest integer value to the value provided in dNumber (Long is a Java data type).
Examples
The following expression produces the following result for a dNumber of 3.5:
Expression:
snmpRound(dNumber)
Result:
4
The same expression produces the following result for a dNumber of 3.4:
Result:
3
Advanced Example
The following expression is taken from “Cisco IPSLA Jitter Precision Statistics” Vendor Certification:
PathAvailability=snmpRound(rttMonJitterStatsNumOfRTT / (rttMonJitterStatsNumOfRTT + rttMonJitterStatsPacketLossSD + rttMonJitterStatsPacketLossDS + rttMonJitterStatsPacketOutOfSequence + rttMonJitterStatsPacketMIA + rttMonJitterStatsPacketLateArrival + rttMonJitterStatsError + rttMonJitterStatsBusies + 1/100) * 100)
|
Copyright © 2015 CA Technologies.
All rights reserved.
|
|