Пример #1
0
        public PCCPropertyInputDistributionEditor(CyPhyGUIs.IInterpreterMainParameters mainParameters, CyPhyGUIs.SmartLogger logger)
        {
            this.Logger         = logger;
            this.MainParameters = mainParameters;
            InitializeComponent();
            this.cbDist.SelectedIndex = 0;
            this.DirtyProperties      = new List <PCC.PCCProperty>();
            this.PropertyData         = ((System.Windows.Forms.BindingSource)dataGridView1.DataSource).List;
            bool hadProperty = false;

            foreach (var property in this.GetPCCPropertiesFromComponent(true).OrderBy(p => p.Name))
            {
                this.PropertyData.Add(property);
                hadProperty = true;
            }

            if (hadProperty == false)
            {
                this.Logger.WriteWarning("No properties can be used as PCC Property Input distributions!");
                this.Logger.WriteWarning("A property can only be used if:");
                this.Logger.WriteWarning(" [1] It maps to a Modelica Parameter of a Modelica Model.");
                this.Logger.WriteWarning(" [2] It does NOT have any incoming value flows.");
                this.Logger.WriteWarning(" [3] It has a real value.");
                this.Close();
            }
        }
Пример #2
0
 public CodeGenerator(CyPhyGUIs.IInterpreterMainParameters parameters, Mode mode, GMELogger Logger)
 {
     this.Logger           = Logger;
     this.mainParameters   = parameters;
     CodeGenerator.verbose = ((CyPhy2RF.CyPhy2RF_Settings)parameters.config).Verbose;
     this.mode             = mode;
 }
 public CodeGenerator(CyPhyGUIs.IInterpreterMainParameters parameters, Mode mode, GMELogger Logger)
 {
     this.Logger = Logger;
     this.mainParameters = parameters;
     CodeGenerator.verbose = ((CyPhy2RF.CyPhy2RF_Settings)parameters.config).Verbose;
     this.mode = mode;
 }
        public CodeGenerator(CyPhyGUIs.IInterpreterMainParameters parameters, Mode mode)
        {
            this.mainParameters = parameters;
            CodeGenerator.verbose = ((CyPhy2Schematic.CyPhy2Schematic_Settings)parameters.config).Verbose;
            partNames = new Dictionary<string, int>();
            partComponentMap = new Dictionary<Eagle.part, Component>();
            componentPartMap = new Dictionary<Component, Eagle.part>();
            preRouted = new Dictionary<ComponentAssembly, Layout.LayoutParser>();

            this.mode = mode;
        }
Пример #5
0
        public CodeGenerator(IInterpreterMainParameters parameters, Mode mode, MgaTraceability traceability, Dictionary <string, CyPhy2SchematicInterpreter.IDs> mgaIdToDomainIDs, ISet <IMgaObject> selectedSpiceModels)
        {
            this.mainParameters   = parameters;
            this.Traceability     = traceability;
            this.mgaIdToDomainIDs = mgaIdToDomainIDs;
            this.verbose          = ((CyPhy2Schematic.CyPhy2Schematic_Settings)parameters.config).Verbose;
            partNames             = new Dictionary <string, int>();
            partComponentMap      = new Dictionary <Eagle.part, Component>();
            componentPartMap      = new Dictionary <Component, Eagle.part>();
            polyNetMap            = new Dictionary <Port, Eagle.net>();
            preRouted             = new Dictionary <ComponentAssembly, Layout.LayoutParser>();

            this.mode = mode;
            this.selectedSpiceModels = selectedSpiceModels;
        }