org.arm4.arm40.metric
Class ArmMetricCounterFloat32

java.lang.Object
  extended by org.arm4.arm40.transaction.ArmInterface
      extended by org.arm4.arm40.metric.ArmMetric
          extended by org.arm4.arm40.metric.ArmMetricCounterFloat32
All Implemented Interfaces:
ArmMetric, ArmMetricCounterFloat32, ArmInterface

public class ArmMetricCounterFloat32
extends ArmMetric
implements ArmMetricCounterFloat32

Implements a 32-bit floating-point counter. It is roughly equivalent to the ARM 2.0 metric type=3 (ARM_CntrDivr32). Instead of providing two integer values that can be divided to produce a floating-point value, which is what was done in the C bindings for ARM 2.0 and ARM 4.0, a floating-point value is provided directly.

Objects implementing this interface are created using ArmMetricFactory.newArmMetricCounterFloat32(org.opengroup.arm40.metric.ArmMetricCounterFloat32Definition).

Version:
$Revision$ $Date$
Author:
dcarter

Field Summary
protected  float m_counter
           
 
Fields inherited from class org.arm4.arm40.transaction.ArmInterface
m_errorCode, m_factory
 
Constructor Summary
ArmMetricCounterFloat32(ArmMetricDefinition definition)
          Create ARM Metric.
 
Method Summary
 float get()
          Gets the counter value.
 int set(float value)
          Sets the counter value.
 
Methods inherited from class org.arm4.arm40.metric.ArmMetric
getDefinition
 
Methods inherited from class org.arm4.arm40.transaction.ArmInterface
getErrorCode, getErrorMessage, getFactory, setErrorCode, setFactory
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.opengroup.arm40.metric.ArmMetric
getDefinition
 
Methods inherited from interface org.opengroup.arm40.transaction.ArmInterface
getErrorCode, getErrorMessage, setErrorCode
 

Field Detail

m_counter

protected float m_counter
Constructor Detail

ArmMetricCounterFloat32

public ArmMetricCounterFloat32(ArmMetricDefinition definition)
Create ARM Metric.

Parameters:
definition - the descriptive metadata (name, units, usage, ID) for the metric
Method Detail

get

public float get()
Description copied from interface: ArmMetricCounterFloat32
Gets the counter value.

Specified by:
get in interface ArmMetricCounterFloat32
Returns:
the counter value.

set

public int set(float value)
Description copied from interface: ArmMetricCounterFloat32
Sets the counter value.

Specified by:
set in interface ArmMetricCounterFloat32
Parameters:
value - new counter value.
Returns:
0 on sucess; otherwise, a non-zero error code is returned (as specified in ArmInterface).