/**
 * Copyright (c) 2016, All partners of the iTesla project (http://www.itesla-project.eu/consortium)
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 */
package itesla.test;

import itesla.converter.Converter;

import java.io.IOException;
import java.util.HashMap;
import java.util.List;
import java.util.Map;


public class iTesla {

	private static Converter converter;
	private static Converter converter_init;
	private static final String pathFRM = "C:\\Users\\viruezr\\Desktop\\Conversiones\\goverRTE22\\edftur1c.frm";
	private static final String pathOUT = "C:\\Users\\viruezr\\Desktop\\Conversiones\\goverRTE22\\modelica\\";

	public static void main(String[] args) throws IOException {
		converter = new Converter(pathFRM, pathOUT, false);
		converter_init = new Converter(pathFRM, pathOUT, true);
		try {
			converter.convert2MO();
			//converter.printLinkNames();
			converter_init.convert2MO();
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		
		/*
		 * Function that returns all the sets of parameters in a hashmap.
		 * The key of this hashmap is the reference id of the parameters set.
		 * The value of this hashmap is another hashmap wih the name of the parameter and its value
		 */
		HashMap<Integer, HashMap<String, String>> allParameterSets = converter.parData.getParameters();
		
		
		/*
		 * Function that returns a specific set of parameters given by its reference id
		 */
		Integer idSet = 1;
		HashMap<String, String> nthParameterSet = converter.parData.getSetParameters(idSet);
		
		for (Map.Entry<String, String> entry : nthParameterSet.entrySet()) {
			System.out.println(entry.getKey() + "; " + entry.getValue());
		}
		
		/*
		 * Function that returns the names of the input and output pins of the regulator in a listArray
		 */
//		List<String> pinNames = new ArrayList<String>();
//		pinNames = converter.getConnections();
//		for (String pinName : pinNames) {
//			System.out.println(pinName);
//		}
		
		
		HashMap<String, String> interfaceVariables = converter.getInterfaceVariables();
		for (Map.Entry<String, String> entry : interfaceVariables.entrySet()) {
			System.out.println(entry.getKey() + "; " + entry.getValue());
		}
		
		
		List<String> init_friParameters = converter.getInit_friParameters();
		for (String initParameter : init_friParameters) {
			System.out.println(initParameter);
		}
		System.out.println("-------------------");
		List<String> init_InterfaceParameters = converter.getInit_InterfaceParameters();
		for (String initInterfaceParameter : init_InterfaceParameters) {
			System.out.println(initInterfaceParameter);
		}
		
		System.out.println("THE END");		
	}

}

@@ -484,17 +484,16 @@
 Tesla %7B%0A
-%0A
 %09private
@@ -603,188 +603,46 @@
 hFRM
- = %22C:%5C%5CUsers%5C%5Cviruezr%5C%5CDesktop%5C%5CConversiones%5C%5CgoverRTE22%5C%5Cedftur1c.frm%22;%0A%09private static final String pathOUT = %22C:%5C%5CUsers%5C%5Cviruezr%5C%5CDesktop%5C%5CConversiones%5C%5CgoverRTE22%5C%5Cmodelica%5C%5C%22
+;%0A%09private static final String pathOUT
 ;%0A%0A%09
@@ -701,16 +701,58 @@
 ption %7B%0A
+%09%09pathFRM = args%5B1%5D;%0A%09%09pathOUT = args%5B2%5D;%0A
 %09%09conver
@@ -987,46 +987,8 @@
 ) %7B%0A
-%09%09%09// TODO Auto-generated catch block%0A
 %09%09%09e
@@ -1360,19 +1360,16 @@
 s();%0A%09%09%0A
-%09%09%0A
 %09%09/*%0A%09%09 
@@ -1711,297 +1711,8 @@
 %0A%09%09%0A
-%09%09/*%0A%09%09 * Function that returns the names of the input and output pins of the regulator in a listArray%0A%09%09 */%0A//%09%09List%3CString%3E pinNames = new ArrayList%3CString%3E();%0A//%09%09pinNames = converter.getConnections();%0A//%09%09for (String pinName : pinNames) %7B%0A//%09%09%09System.out.println(pinName);%0A//%09%09%7D%0A%09%09%0A%09%09%0A
 %09%09Ha
@@ -1935,19 +1935,16 @@
 %0A%09%09%7D%0A%09%09%0A
-%09%09%0A
 %09%09List%3CS
@@ -2100,16 +2100,19 @@
 r);%0A%09%09%7D%0A
+%09%09%0A
 %09%09System
@@ -2341,35 +2341,32 @@
 Parameter);%0A%09%09%7D%0A
-%09%09%0A
 %09%09System.out.pri
@@ -2388,10 +2388,9 @@
 ;%09%09%0A
+
 %09%7D%0A
-%0A
 %7D%0A

Format changes