public override Object Attend() { if (path != null) { TISCameraDriver driver = TISCameraManager.GetReference().getDriver(camera); if (!Double.IsNaN(this.exposure)) { double expValue = this.exposure; driver.GetProperty(PropertyType.EXPOSURE).Auto = false; driver.GetProperty(PropertyType.EXPOSURE).Value = expValue; } if (quality < 0) { driver.TakeImage(path, image); } else { driver.TakeImage(path, image, quality); } return(null); } else { throw new Exception("The path is not defined."); } }
public override Object Attend() { TISCameraDriver driver = TISCameraManager.GetReference().getDriver(camera); DriverOperation operation = driver.GetCurrentOperation(); return(operation); }
public static int Main(String[] args) { ConsoleColor preColor = Console.ForegroundColor; Console.ForegroundColor = ConsoleColor.Green; Console.WriteLine("Astronomy Cameras Socket Server, v0.8.11"); Console.WriteLine("Developed by Fernando Serena, Ciclope Group. UPM"); Console.WriteLine("Copyleft @ 2012 - All wrongs reserved."); Console.ForegroundColor = preColor; int port = 11000; if (args.Length > 0) { foreach (String arg in args) { if (arg.StartsWith("logpath=")) { Log.LogPath = arg.Replace("logpath=", String.Empty); } else if (arg.StartsWith("port=")) { port = Int32.Parse(arg.Replace("port=", String.Empty)); } } } //////////////Program fails looking for DBx if not connected//////////// /*TISCameraDriver driverDBK = TISCameraManager.GetReference().getDriver("DBx 41AU02.AS"); * * driverDBK.GetProperty(Properties.PropertyType.GAIN).Value = 300; * driverDBK.GetProperty(Properties.PropertyType.GAMMA).Value = 50; * driverDBK.GetProperty(Properties.PropertyType.EXPOSURE).Value = 0.00219; * * driverDBK.ImageQuality = 700; * * Console.WriteLine("DBx 41AU02.AS Gamma set to " + driverDBK.GetProperty(Properties.PropertyType.GAMMA).Value); * Console.WriteLine("DBx 41AU02.AS Exposure set to " + driverDBK.GetProperty(Properties.PropertyType.EXPOSURE).Value); * Console.WriteLine("DBx 41AU02.AS Gain set to " + driverDBK.GetProperty(Properties.PropertyType.GAIN).Value);*/ TISCameraDriver driverDMK = TISCameraManager.GetReference().getDriver("DMx 41AU02.AS"); driverDMK.GetProperty(Properties.PropertyType.EXPOSURE).Value = 0.003; driverDMK.GetProperty(Properties.PropertyType.GAIN).Value = 300; driverDMK.GetProperty(Properties.PropertyType.GAMMA).Value = 50; Console.WriteLine("DMx 41AU02.AS Exposure set to " + driverDMK.GetProperty(Properties.PropertyType.EXPOSURE).Value); Console.WriteLine("DMx 41AU02.AS Gamma set to " + driverDMK.GetProperty(Properties.PropertyType.GAMMA).Value); Console.WriteLine("DMx 41AU02.AS Gain set to " + driverDMK.GetProperty(Properties.PropertyType.GAIN).Value); Log.LogFilterLevel = 10; SocketServer server = new CameraSocketServer(); server.StartListening(port); return(0); }
public override Object Attend() { TISCameraDriver driver = TISCameraManager.GetReference().getDriver(camera); List <String> codecs = driver.GetAvailableVideoCodecs(); return(codecs.ToArray()); }
public override Object Attend() { TISCameraDriver driver = TISCameraManager.GetReference().getDriver(camera); driver.PauseCapture(); return(null); }
public override Object Attend() { TISCameraDriver driver = TISCameraManager.GetReference().getDriver(camera); driver.FrameRate = (float)this.frameRate; return(null); }
public override Object Attend() { if (this.camera != null) { TISCameraDriver driver = TISCameraManager.GetReference().getDriver(camera); return(driver.ImageQuality); } else { throw new Exception("A problem has occurred while trying to get the driver image quality."); } }
public override Object Attend() { TISCameraDriver driver = TISCameraManager.GetReference().getDriver(camera); List <PropertyType> properties = driver.GetAvailableProperties(); List <String> strings = new List <string>(); foreach (PropertyType property in properties) { strings.Add(property.ToString()); } return(strings.ToArray()); }
public override Object Attend() { List <String> cameras = TISCameraManager.GetReference().AvailableCameras; if (cameras == null) { return new String[] { } } ; return(cameras.ToArray()); } }
public override Object Attend() { if (this.path != null) { TISCameraDriver driver = TISCameraManager.GetReference().getDriver(camera); driver.CaptureVideo(this.path, this.video, this.codec, this.time); return(null); } else { throw new Exception("The path is not defined."); } }
public override Object Attend() { if (this.camera != null) { TISCameraDriver driver = TISCameraManager.GetReference().getDriver(camera); driver.GetProperty(this.property).Auto = this.mode; return(null); } else { throw new Exception("The property does not exist."); } }
public override Object Attend() { if (this.camera != null) { TISCameraDriver driver = TISCameraManager.GetReference().getDriver(camera); double min = driver.GetProperty(this.property).MinValue; double max = driver.GetProperty(this.property).MaxValue; return(new Double[] { min, max }); } else { throw new Exception("The property does not exist."); } }
public override Object Attend() { if (this.camera != null) { Console.WriteLine("Property value requested: " + this.property); TISCameraDriver driver = TISCameraManager.GetReference().getDriver(camera); double value = driver.GetProperty(this.property).Value; return(value); } else { throw new Exception("The property does not exist."); } }
public override Object Attend() { if (this.camera != null) { TISCameraDriver driver = TISCameraManager.GetReference().getDriver(camera); driver.GetProperty(this.property).Value = value; Console.WriteLine("Property " + this.property + " value modified: " + value); return(null); } else { throw new Exception("The property does not exist."); } }
public override Object Attend() { if (this.path != null) { TISCameraDriver driver = TISCameraManager.GetReference().getDriver(camera); if (this.quality < 0) { driver.MakeTimeLapse(frames, path, image, latency); } else { driver.MakeTimeLapse(frames, path, image, latency, quality); } return(null); } else { throw new Exception("The path is not defined."); } }
public override Object Attend() { TISCameraDriver driver = TISCameraManager.GetReference().getDriver(camera); return((Double)(double)driver.FrameRate); }