net.java.slee.resource.diameter.cca.events.avp
Interface UnitValueAvp

All Superinterfaces:
java.lang.Cloneable, net.java.slee.resource.diameter.base.events.avp.DiameterAvp, net.java.slee.resource.diameter.base.events.avp.GroupedAvp
All Known Implementing Classes:
UnitValueAvpImpl

public interface UnitValueAvp
extends net.java.slee.resource.diameter.base.events.avp.GroupedAvp

 8.8. Unit-Value AVP


   Unit-Value AVP is of type Grouped (AVP Code 445) and specifies the
   units as decimal value.  The Unit-Value is a value with an exponent;
   i.e., Unit-Value = Value-Digits AVP * 10^Exponent.  This
   representation avoids unwanted rounding off.  For example, the value
   of 2,3 is represented as Value-Digits = 23 and Exponent = -1.  The
   absence of the exponent part MUST be interpreted as an exponent equal
   to zero.

   It is defined as follows (per the grouped-avp-def of
   RFC 3588 [DIAMBASE]):

                    Unit-Value ::= < AVP Header: 445 >
                                   { Value-Digits }
                                   [ Exponent ]
        

Author:
Bartosz Baranowski , Alexandre Mendonca

Field Summary
 
Fields inherited from interface net.java.slee.resource.diameter.base.events.avp.DiameterAvp
FLAG_RULE_MAY, FLAG_RULE_MUST, FLAG_RULE_MUSTNOT
 
Method Summary
 int getExponent()
          Returns the value of the Exponent AVP, of type Integer32.
 long getValueDigits()
          Returns the value of the Value-Digits AVP, of type Integer64.
 boolean hasExponent()
          Returns true if the Exponent AVP is present in the message.
 boolean hasValueDigits()
          Returns true if the Value-Digits AVP is present in the message.
 void setExponent(int exponent)
          Sets the value of the Exponent AVP, of type Integer32.
 void setValueDigits(long digits)
          Sets the value of the Value-Digits AVP, of type Integer64.
 
Methods inherited from interface net.java.slee.resource.diameter.base.events.avp.GroupedAvp
getExtensionAvps, setExtensionAvps
 
Methods inherited from interface net.java.slee.resource.diameter.base.events.avp.DiameterAvp
byteArrayValue, clone, doubleValue, floatValue, getCode, getMandatoryRule, getName, getProtectedRule, getType, getVendorId, intValue, longValue, octetStringValue, stringValue
 

Method Detail

setValueDigits

void setValueDigits(long digits)
Sets the value of the Value-Digits AVP, of type Integer64.

Parameters:
digits -

getValueDigits

long getValueDigits()
Returns the value of the Value-Digits AVP, of type Integer64.

Returns:

setExponent

void setExponent(int exponent)
Sets the value of the Exponent AVP, of type Integer32.

Parameters:
expotent -

getExponent

int getExponent()
Returns the value of the Exponent AVP, of type Integer32.

Returns:

hasExponent

boolean hasExponent()
Returns true if the Exponent AVP is present in the message.

Returns:

hasValueDigits

boolean hasValueDigits()
Returns true if the Value-Digits AVP is present in the message.

Returns:


Copyright © 2011. All Rights Reserved.