Package org.geppetto.core.model.values

Examples of org.geppetto.core.model.values.AValue


                    {
                      value = hdfVariable.read(start, lenght);
                      Type type = Type.fromValue(hdfVariable.getDataType().toString());

                      PhysicalQuantity quantity = new PhysicalQuantity();
                      AValue readValue = null;
                      switch(type)
                      {
                        case DOUBLE:
                          readValue = ValuesFactory.getDoubleValue(value.getDouble(0));
                          break;
View Full Code Here


    String commonProperties = this.commonProperties(node);

    PhysicalQuantity quantity = node.consumeFirstValue();

    if (quantity != null) {
      AValue value = quantity.getValue();
      String unit = null, scale = null;

      if (quantity.getUnit() != null) {
        unit = "\"" + quantity.getUnit() + "\"";
      }
View Full Code Here

    FunctionNode functionNode = node.getDynamics();

    String specs = "", function = "";

    if (quantity != null) {
      AValue value = quantity.getValue();
      String unit = null, scale = null;

      if (quantity.getUnit() != null) {
        unit = quantity.getUnit();
      }
View Full Code Here

    String commonProperties = this.commonProperties(node);

    PhysicalQuantity quantity = node.getValue();

    if (quantity != null) {
      AValue value = quantity.getValue();
      String unit = null, scale = null;

      if (quantity.getUnit() != null) {
        unit = "\"" + quantity.getUnit() + "\"";
      }
View Full Code Here

  @Override
  public boolean visitTextMetadataNode(TextMetadataNode node) {
    String commonProperties = this.commonProperties(node);
    String valueString = "";
    if (node.getValue() != null){
      AValue value = node.getValue();
      valueString = "\"value\":" + "\"" + value + "\",";
    }
   
    _serialized.append("\"" + node.getId() + "\":{" + valueString.replaceAll("[\n\r]", "") + commonProperties+ "},");
View Full Code Here

      {
        value = v.read(start, lenght);
        Type type = Type.fromValue(v.getDataType().toString());

        PhysicalQuantity quantity = new PhysicalQuantity();
        AValue readValue = null;
        switch(type)
        {
          case DOUBLE:
            readValue = ValuesFactory.getDoubleValue(value.getDouble(0));
            break;
View Full Code Here

    AspectNode aspect_A = new AspectNode("Aspect_A");

    AspectSubTreeNode simulation = new AspectSubTreeNode(
        AspectTreeType.WATCH_TREE);

    AValue val = ValuesFactory.getDoubleValue(50d);
    AValue val2 = ValuesFactory.getDoubleValue(100d);

    PhysicalQuantity quantity = new PhysicalQuantity();
    quantity.setValue(val);
    quantity.setUnit("V");
    quantity.setScalingFactor("1.E3");

    PhysicalQuantity quantity2 = new PhysicalQuantity();
    quantity2.setValue(val2);
    quantity2.setScalingFactor("1.E3");
    quantity2.setUnit("V");

    VariableNode dummyNode = new VariableNode("dummyFloat");
    dummyNode.addPhysicalQuantity(quantity);
    dummyNode.addPhysicalQuantity(quantity2);

    VariableNode anotherDummyNode = new VariableNode("dummyDouble");

    AValue val3 = ValuesFactory.getDoubleValue(50d);
    AValue val4 = ValuesFactory.getDoubleValue(100d);

    PhysicalQuantity quantity3 = new PhysicalQuantity();
    quantity3.setValue(val3);
    quantity3.setUnit("mV");
    quantity3.setScalingFactor("1.E3");
View Full Code Here

TOP

Related Classes of org.geppetto.core.model.values.AValue

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.