// Path: java/tern/compiler/CompileException.java
// public class CompileException extends Exception {
// 
// 	public static final int ERR_NONE      = 0;
// 	public static final int ERR_NO_BLOCKS = 1;
// 	public static final int ERR_NO_BEGIN  = 2;
// 	public static final int ERR_SAVE_FILE = 3;
// 	public static final int ERR_CAMERA    = 4;
// 	public static final int ERR_NO_NQC    = 5;
// 	public static final int ERR_NO_RCX    = 6;
// 	public static final int ERR_NO_TOWER  = 7;
// 	public static final int ERR_LOAD_FILE = 8;
// 	public static final int ERR_FIRMWARE  = 9;
// 	public static final int ERR_UNKNOWN   = 10;
//         public static final int ERR_NO_NXT    = 11;
// 	
// 	protected int code = ERR_NONE;
// 
// 	public CompileException(int code) {
// 		super();
// 		this.code = code;
// 	}
// 	
// 	public int getErrorCode() {
// 		return this.code;
// 	}
// }


import java.io.BufferedInputStream;
import java.io.IOException;
import tern.compiler.CompileException;
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package tern.nqc;

/**
 *
 * @author Maruma
 */
public class NXCTransmitter {
     private String firmware = "firm0328.lgo";

	/** NXC Compiler binary (nqc.exe) */	
	private String compiler;



	/** Compiler process */
	private Process process;

	/** NQC command to execute */
	private String [] command;

        private String Path;

	
	public NXCTransmitter(java.util.Properties props) {
		this.compiler = props.getProperty("nxc.compiler");
		this.process  = null;
                this.Path = props.getProperty("nxc.path");
		this.command  = new String[4];
   }
        
       
        //Mariam
        //04-09-2011
// Path: java/tern/compiler/CompileException.java
// public class CompileException extends Exception {
// 
// 	public static final int ERR_NONE      = 0;
// 	public static final int ERR_NO_BLOCKS = 1;
// 	public static final int ERR_NO_BEGIN  = 2;
// 	public static final int ERR_SAVE_FILE = 3;
// 	public static final int ERR_CAMERA    = 4;
// 	public static final int ERR_NO_NQC    = 5;
// 	public static final int ERR_NO_RCX    = 6;
// 	public static final int ERR_NO_TOWER  = 7;
// 	public static final int ERR_LOAD_FILE = 8;
// 	public static final int ERR_FIRMWARE  = 9;
// 	public static final int ERR_UNKNOWN   = 10;
//         public static final int ERR_NO_NXT    = 11;
// 	
// 	protected int code = ERR_NONE;
// 
// 	public CompileException(int code) {
// 		super();
// 		this.code = code;
// 	}
// 	
// 	public int getErrorCode() {
// 		return this.code;
// 	}
// }


// Path: java/tern/nqc/NXCTransmitter.java
import java.io.BufferedInputStream;
import java.io.IOException;
import tern.compiler.CompileException;

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package tern.nqc;

/**
 *
 * @author Maruma
 */
public class NXCTransmitter {
     private String firmware = "firm0328.lgo";

	/** NXC Compiler binary (nqc.exe) */	
	private String compiler;



	/** Compiler process */
	private Process process;

	/** NQC command to execute */
	private String [] command;

        private String Path;

	
	public NXCTransmitter(java.util.Properties props) {
		this.compiler = props.getProperty("nxc.compiler");
		this.process  = null;
                this.Path = props.getProperty("nxc.path");
		this.command  = new String[4];
   }
        
       
        //Mariam
        //04-09-2011
        public void Run(String filename)throws CompileException