Package org.destecs.protocol.structs

Examples of org.destecs.protocol.structs.GetVariablesStruct


  }

  public Map<String, List<Map<String, Object>>> getVariables(List<String> data)
      throws Exception
  {
    GetVariablesStruct vars = new GetVariablesStruct();
    try
    {
      for (Entry<String, ValueContents> p : SimulationManager.getInstance().getInstanceVariables(data).entrySet())
      {
        vars.variables.add(new GetVariablesStructvariablesStruct(p.getKey(), p.getValue().value, p.getValue().size));
      }
    } catch (RemoteSimulationException e)
    {
      ErrorLog.log(e);
      throw e;
    }
   
    return vars.toMap();
  }
View Full Code Here


      {
        switch (simulator)
        {
          case CT:
          {
            GetVariablesStruct data = ctProxy.getVariables(Arrays.asList(new String[] { name }));

            if (!data.variables.isEmpty())
            {
              return data.variables.get(0).value.get(0);
            }
           
            //If data is empty maybe the variable is a parameter
            GetParametersStruct parameterData = ctProxy.getParameters(Arrays.asList(new String[] { name }));
           
            if (!parameterData.parameters.isEmpty())
            {
              return parameterData.parameters.get(0).value.get(0);
            }
           
          }
            break;
          case DE:
          {
            GetVariablesStruct data = deProxy.getVariables(Arrays.asList(new String[] { name }));

            if (!data.variables.isEmpty())
            {
              for (GetVariablesStructvariablesStruct p : data.variables)
              {
View Full Code Here

TOP

Related Classes of org.destecs.protocol.structs.GetVariablesStruct

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.