Exemplo n.º 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);
     }
 }
Exemplo n.º 2
0
 public BaseCompileBehavior(BaseCompiler compiler)
 {
     _compiler = compiler;
 }
Exemplo n.º 3
0
 public CortexMBehavior(BaseCompiler compiler) : base(compiler)
 {
 }
Exemplo n.º 4
0
 public PCBehavior(BaseCompiler compiler) : base(compiler)
 {
 }