internal CsvSaver(ZomBUrl url)
 {
     var urlPath = url.Path.Substring(1);//remove first char
     if (urlPath == "")
         fpath = BTZomBFingerFactory.DefaultSaveLocation + "\\ZCapture" + (DateTime.Now.Ticks.ToString("x")) + ".csv";
     else if (!urlPath.Contains(":\\"))//not absoloute
         fpath = BTZomBFingerFactory.DefaultSaveLocation + "\\" + urlPath;
     else
         fpath = urlPath;
 }
 internal CsvSource(ZomBUrl url)
 {
     var urlPath = url.Path.Substring(1);//remove first char
     if (urlPath == "")
         throw new ArgumentNullException("Path required!");
     else if (!urlPath.Contains(":\\"))//not absoloute
         fpath = BTZomBFingerFactory.DefaultSaveLocation + "\\" + urlPath;
     else
         fpath = urlPath;
 }
 public SerialDataSource(ZomBUrl info)
 {
     int baud = 115200;
     int data = 8;
     Parity parity = Parity.None;
     StopBits stopbits = StopBits.One;
     if (info.Path.Length > 5 && info.Path[0] == '?')
     {
         var nv = HttpUtility.ParseQueryString(info.Path);
         if (nv["baud"] != null)
         {
             if (!int.TryParse(nv["baud"], out baud))
                 baud = 115200;
         }
         if (nv["data"] != null)
         {
             if (!int.TryParse(nv["data"], out data))
                 data = 8;
         }
         if (nv["parity"] != null)
         {
             try
             {
                 parity = (Parity)Enum.Parse(typeof(Parity), nv["parity"], true);
             }
             catch
             {
                 parity = Parity.None;
             }
         }
         if (nv["stop"] != null)
         {
             try
             {
                 stopbits = (StopBits)Enum.Parse(typeof(StopBits), nv["stop"], true);
             }
             catch
             {
                 stopbits = StopBits.One;
             }
         }
     }
     killer = new SerialPort("COM" + info.Port.ToString(), baud, parity, data, stopbits);
     killer.NewLine = "\n";
 }
 public TCPDataSender(ZomBUrl zurl)
 {
     IPAddress = zurl.IPAddress;
     Port = zurl.Port;
 }
 public TCPDataSource(ZomBUrl url)
 {
     IPAddress = url.IPAddress;
     Port = url.Port;
 }
 internal DataPlayerSource(ZomBUrl url)
 {
     FilePath = url.Path.Substring(1);//remove first char
 }
        public TestDataSource(ZomBUrl info)
        {

        }
 public SmartDataSource(ZomBUrl info, IZomBController ddh)
 {
     if (ddh != null)
         this.ddh = ddh.GetDashboardDataHub();
 }