Package org.destecs.protocol.structs

Examples of org.destecs.protocol.structs.QueryInterfaceStruct


  private boolean validateInterfaces(Contract contract,
      ProxyICoSimProtocol dtProxy, ProxyICoSimProtocol ctProxy)
      throws SimulationException
  {
    QueryInterfaceStruct dtInterface = queryInterface(Simulator.DE, dtProxy);
    QueryInterfaceStruct ctInterface = queryInterface(Simulator.CT, ctProxy);

    engineInfo(Simulator.ALL, "Validating interfaces...");
    for (IVariable var : contract.getControlledVariables())
    {
      QueryInterfaceStructoutputsStruct varOut = interfaceContainsOuput(dtInterface, var.getName());
View Full Code Here


  }

  private QueryInterfaceStruct queryInterface(Simulator simulator,
      ProxyICoSimProtocol proxy) throws SimulationException
  {
    QueryInterfaceStruct intf = null;
    try
    {
      messageInfo(simulator, new Double(0), "queryInterface");
      intf = proxy.queryInterface();
      engineInfo(simulator, toStringInterface(intf));
View Full Code Here

  public Map<String, Object> queryInterface() throws RemoteSimulationException
  {
    /*
     * Shared design variables minLevel maxLevel Variables level :IN valveState :OUT Events HIGH_LEVEL LOW_LEVEL
     */
    QueryInterfaceStruct s = new QueryInterfaceStruct();

    for (LinkInfo sdp : SimulationManager.getInstance().getSharedDesignParameters().values())
    {

      // dimension does not matter at this point
      List<Integer> dimensions = new Vector<Integer>();
      dimensions.add(findVariableDimension(sdp));
      s.sharedDesignParameters.add(new QueryInterfaceStructsharedDesignParametersStruct(sdp.getIdentifier(), dimensions));
    }

    for (LinkInfo input : SimulationManager.getInstance().getInputVariables().values())
    {
      List<Integer> dimensions = new Vector<Integer>();
      dimensions.add(findVariableDimension(input));
      s.inputs.add(new QueryInterfaceStructinputsStruct(input.getIdentifier(), dimensions));

    }

    for (LinkInfo output : SimulationManager.getInstance().getOutputVariables().values())
    {
      List<Integer> dimensions = new Vector<Integer>();
      dimensions.add(findVariableDimension(output));
      s.outputs.add(new QueryInterfaceStructoutputsStruct(output.getIdentifier(), dimensions));
    }

    // No events from VDM

    return s.toMap();
  }
View Full Code Here

TOP

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

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.