示例#1
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="args">
 /// First argument is device specification
 /// Second argument is ladder file
 /// Third argument is function block file
 /// </param>
 public static int Main(string[] args)
 {
     if (args.Count() != 4)
     {
         Console.WriteLine("Error!Too few or too much arguments!");
         return(-1);
     }
     Init();
     try
     {
         BaseCompiler compiler = _compilerPrototype[args[0]];
         if (compiler.Execute(args[1], args[2], args[3]))
         {
             return(0);
         }
         else
         {
             return(-1);
         }
     }
     catch (Exception exception)
     {
         Console.WriteLine("Error!Unknown PLC Device");
         return(-1);
     }
 }
示例#2
0
 public BaseCompileBehavior(BaseCompiler compiler)
 {
     _compiler = compiler;
 }
示例#3
0
 public CortexMBehavior(BaseCompiler compiler) : base(compiler)
 {
 }
示例#4
0
 public PCBehavior(BaseCompiler compiler) : base(compiler)
 {
 }