protected override List <IOptionEntry> generateEntries(CameraOptionsUI options, string libraryVersion)
        {
            List <IOptionEntry> entries = new List <IOptionEntry>();

            OptionsCategory GainCategory = new OptionsCategory("Gain");

            entries.Add(GainCategory);

            FloatEntry GainEntry = new FloatEntry("Gain", new Property <FlirProperties, FloatNode>(nameof(options.FakeProperties.Gain)), options.Stream);

            GainEntry.Parent = GainCategory;

            EnumEntry <GainAutoEnums> AutoGainEntry = new EnumEntry <GainAutoEnums>("Auto Gain", GainAutoEnums.Off, GainAutoEnums.NUM_GAINAUTO, new Property <FlirProperties, EnumNode <GainAutoEnums> >(nameof(options.FakeProperties.GainAuto)), options.Stream);

            AutoGainEntry.Parent = GainCategory;

            FloatEntry UpperGainEntry = new FloatEntry("  - Upper Limit", new Property <FlirProperties, FloatNode>(nameof(options.FakeProperties.AutoGainUpperLimit)), options.Stream);

            UpperGainEntry.Parent = GainCategory;

            FloatEntry LowerGainEntry = new FloatEntry("  - Lower Limit", new Property <FlirProperties, FloatNode>(nameof(options.FakeProperties.AutoGainLowerLimit)), options.Stream);

            LowerGainEntry.Parent = GainCategory;

            return(entries);
        }
示例#2
0
        public static FloatEntry[] CreateFloatChunk(int count, DateTime?start = null, double percentOfFill = 1.0, int ticksIntervalMs = 100)
        {
            var data = new FloatEntry[(int)(count * percentOfFill)];

            var ticks     = (start ?? DateTime.Now).Ticks;
            var ticksStep = TimeSpan.FromMilliseconds(ticksIntervalMs).Ticks;

            data[0].ticks = ticks;
            data[0].value = (float)(random.NextDouble() * 100.0);

            for (int i = 1, j = 1; i < count && j < data.Length; i++)
            {
                ticks += ticksStep;

                if (!(random.NextDouble() + percentOfFill >= 1.0))
                {
                    continue;
                }

                data[j].ticks = ticks;
                data[j].value = (float)(random.NextDouble() * 100.0);
                j++;
            }
            return(data);
        }
示例#3
0
        protected override List <IOptionEntry> generateEntries(CameraOptionsUI options, string libraryVersion)
        {
            List <IOptionEntry> entries = new List <IOptionEntry>();

            OptionsCategory ExposureCategory = new OptionsCategory("Exposure");

            entries.Add(ExposureCategory);

            EnumEntry <ExposureAutoEnums> ExposureAutoEntry = new EnumEntry <ExposureAutoEnums>("Auto Exposure", ExposureAutoEnums.Continuous, ExposureAutoEnums.NUM_EXPOSUREAUTO, new Property <FlirProperties, EnumNode <ExposureAutoEnums> >(nameof(options.FakeProperties.ExposureAuto)), options.Stream);

            ExposureAutoEntry.Parent = ExposureCategory;

            FloatEntry UpperExposureEntry = new FloatEntry("  - Upper Limit", new Property <FlirProperties, FloatNode>(nameof(options.FakeProperties.ExposureAutoUpperLimit)), options.Stream);

            UpperExposureEntry.Parent = ExposureCategory;

            FloatEntry LowerExposureEntry = new FloatEntry("  - Lower Limit", new Property <FlirProperties, FloatNode>(nameof(options.FakeProperties.ExposureAutoLowerLimit)), options.Stream);

            LowerExposureEntry.Parent = ExposureCategory;

            FloatEntry ExposureTimeEntry = new FloatEntry("Exposure Time", new Property <FlirProperties, FloatNode>(nameof(options.FakeProperties.ExposureTime)), options.Stream);

            ExposureTimeEntry.Parent = ExposureCategory;

            FloatEntry ExposureTimeAbsEntry = new FloatEntry("Absolute Exposure Time", new Property <FlirProperties, FloatNode>(nameof(options.FakeProperties.ExposureTimeAbs)), options.Stream);

            ExposureTimeAbsEntry.Parent = ExposureCategory;

            return(entries);

            /*
             * ExposureMode = new EnumNode<ExposureModeEnums>(camera, "ExposureMode");
             */
        }
示例#4
0
 public void SetFloat(string key, double value)
 {
     if (!entries.ContainsKey(key))
     {
         entries.Add(key, new FloatEntry(key, value));
     }
     else
     {
         entries[key] = new FloatEntry(key, value);
     }
 }