Exemplo n.º 1
0
        public UbloxGPSController(GPSControllerConfig config, PropertyBag property)
            : base(config, property)
        {
            try
             {

                 this.Configuration = config;
                 this.PropertyBag.TransmitMode = 1;
                 this.PropertyBag.TransmitCycle = 10;
                 this.SetTransmitCycleTmr();

             }
             catch(Exception ex)
             {
                 Console.WriteLine("config.xml 讀取錯誤!,"+ex.Message);
                 Environment.Exit(-1);
             }

             try
             {
                 refDevice = (UbloxDevice)CreateDevice(Configuration.ref_gps);

                 refDevice.ProcessCompletedEvent += new ProcessCompletedHandler(dev_ProcessCompletedEvent);

             }
             catch (Exception Exception){
                 Console.WriteLine(Exception.Message+","+Exception.StackTrace);}
        }
Exemplo n.º 2
0
 // SensorBase[] devices;
 public GenericController(ControllerConfigBase config,PropertyBag propertybag)
     : base(config, propertybag)
 {
     //initialProperty();
     this.PropertyBag.TransmitCycle = 10;
     this.PropertyBag.TransmitMode = 1;
     SetTransmitCycleTmr();
       //  this.config = config;
 }
Exemplo n.º 3
0
        public SirfGPSController(GPSControllerConfig config, PropertyBag property)
            : base(config, property)
        {
            try
             {

                 this.Configuration = config;
                 this.PropertyBag.TransmitCycle = 10;
                 this.PropertyBag.TransmitMode = 1;

             //    protocol.Parse(System.IO.File.ReadAllText("protocol.txt"), false);

             }
             catch(Exception ex)
             {
                 Console.WriteLine("config.xml 讀取錯誤!,"+ex.Message);
                 Environment.Exit(-1);
             }

             try
             {
                 refDevice =(GPSDevice) CreateDevice(Configuration.ref_gps);

                 refDevice.ProcessCompletedEvent += new ProcessCompletedHandler(dev_ProcessCompletedEvent);
                 //devices = new GPSDevice[Configuration.gps_configs.Length];
                 //for (int i = 0; i < devices.Length; i++)
                 //{
                 //    try
                 //    {
                 //        devices[i] = (GPSDevice)CreateDevice(Configuration.gps_configs[i]);
                 //    }
                 //    catch { ;}
                 //}
             }
             catch (Exception Exception){
                 Console.WriteLine(Exception.Message+","+Exception.StackTrace);}
        }
Exemplo n.º 4
0
 public SSHDataController(ControllerConfigBase config, PropertyBag propertybag)
     : base(config, propertybag)
 {
 }