예제 #1
0
        internal override void Build()
        {
            Block block = GetBlock();

            block.Parameters.Add(new Parameter()
            {
                Name = "Ports", Text = _Ports
            });
            block.Parameters.Add(new Parameter()
            {
                Name = "OutputSignalType", Text = _SignalType.GetDescription()
            });
            block.Parameters.Add(new Parameter()
            {
                Name = "Operator", Text = _Operator.GetDescription()
            });
            block.Parameters.Add(new Parameter()
            {
                Name = "AlgorithmType", Text = RootFindingAlgorithm.Newton_Raphson.GetDescription()
            });
            block.Parameters.Add(new Parameter()
            {
                Name = "Iterations", Text = "3"
            });
            block.Parameters.Add(new Parameter()
            {
                Name = "IntermediateResultsDataTypeStr", Text = "Inherit: Inherit via internal rule"
            });

            model.System.Block.Add(block);
        }
 internal override void Build()
 {
     model.System.Block.Add(new Block()
     {
         BlockType  = "Trigonometry",
         BlockName  = GenerateUniqueName("Trigonometry\\nFunction"),
         Parameters = new List <Parameter>()
         {
             new Parameter()
             {
                 Name = "Position", Text = base._Position
             },
             new Parameter()
             {
                 Name = "BlockMirror", Text = base._BlockMirror
             },
             new Parameter()
             {
                 Name = "Ports", Text = _Ports
             },
             new Parameter()
             {
                 Name = "Operator", Text = _Operator.GetDescription()
             },
             new Parameter()
             {
                 Name = "ApproximationMethod", Text = _Method.GetDescription()
             },
             new Parameter()
             {
                 Name = "NumberOfIterations", Text = _NumberOfIterations
             },
             new Parameter()
             {
                 Name = "OutputSignalType", Text = _SignalType.GetDescription()
             },
             new Parameter()
             {
                 Name = "SampleTime", Text = "-1"
             }
         }
     });
 }
        internal override void Build()
        {
            Block block = GetBlock();

            block.Parameters.Add(new Parameter()
            {
                Name = "OutputSignalType", Text = _OutputSignalType.GetDescription()
            });
            block.Parameters.Add(new Parameter()
            {
                Name = "Operator", Text = Operator
            });
            block.Parameters.Add(new Parameter()
            {
                Name = "AlgorithmType", Text = _Algorithm.GetDescription()
            });
            block.Parameters.Add(new Parameter()
            {
                Name = "Iterations", Text = _NumberOfIterations
            });

            model.System.Block.Add(block);
        }