//void PiltController_OnConnectionChanged(int id, string senserName, bool IsConnected) //{ // byte[] connect_status = new byte[2]; // connect_status[0] = PropertyBag.HWtatus[2]; // connect_status[1] = PropertyBag.HWtatus[3]; // System.Collections.BitArray ba = new System.Collections.BitArray(connect_status); // ba.Set(id, IsConnected); //} protected override SensorBase CreateDevice(SensorConfigBase config) { GenericDevice dev; if (config.com_type == "TCP") { return new GenericDevice(config.id,this, config.device_name, new System.Net.IPEndPoint(System.Net.IPAddress.Parse(config.ip_comport), config.port_baud)); } else //COM { return new GenericDevice(config.id,this, config.device_name, config.ip_comport, config.port_baud); } }
protected override Comm.SensorBase CreateDevice(SensorConfigBase conf) { GPSSensorConfig config = (GPSSensorConfig)conf; if (config.com_type == "TCP") { // if (config.is_reference) return new UbloxDevice(config.id, this, config.device_name, new System.Net.IPEndPoint(System.Net.IPAddress.Parse(config.ip_comport), config.port_baud), config.refx, config.refy, config.refz, config.is_reference); //else // return new UbloxDevice(config.id, this, config.device_name, new System.Net.IPEndPoint(System.Net.IPAddress.Parse(config.ip_comport), config.port_baud)); } else //COM { // if (config.is_reference) return new UbloxDevice(config.id, this, config.device_name, config.ip_comport, config.port_baud, config.refx, config.refy, config.refz, config.is_reference); //else // return new UbloxDevice(config.id, this, config.device_name, config.ip_comport, config.port_baud); } }
protected abstract SensorBase CreateDevice(SensorConfigBase I_sebsor_config);