Example #1
0
        public long GetValueAsLong(JEVisUnit unit)
        {
            double lValue = GetValueAsLong().doubleValue();
            Double dValue = GetUnit().convertTo(unit, lValue);

            return(dValue.longValue());
        }
Example #2
0
 public void SetValue(Object value, JEVisUnit unit)
 {
     if (typeof(value) == typeof(Double))
     {
         json.setValue(unit.convertTo(GetUnit(), Double.Parse(value.ToString())) + "");
     }
     else if (typeof(value) == typeof(long))
     {
         json.setValue(unit.convertTo(GetUnit(), long.Parse(value.ToString())) + "");
     }
     else
     {
         logger.Error("ClassCastException");
     }
 }
Example #3
0
 public Double GetValueAsDouble(JEVisUnit unit)
 {
     return(GetUnit().convertTo(unit, GetValueAsDouble()));
 }
Example #4
0
 public void SetUnit(JEVisUnit unit)
 {
 }
 public JEVisSample buildSample(DateTime ts, double value, JEVisUnit unit)
 {
     return(buildSample(ts, value, "", unit));
 }