Beispiel #1
0
 private void ExtractDCSBIOSOutputsInFormula()
 {
     try
     {
         var found    = false;
         var controls = DCSBIOSControlLocator.GetControls();
         foreach (var dcsbiosControl in controls)
         {
             if (_formula.Contains(dcsbiosControl.identifier))
             {
                 //   Console.WriteLine("Variable " + dcsbiosControl.identifier + " set to 0");
                 _variables.Add(dcsbiosControl.identifier, 0);
                 var dcsbiosOutput = DCSBIOSControlLocator.GetDCSBIOSOutput(dcsbiosControl.identifier);
                 _dcsbiosOutputs.Add(dcsbiosOutput);
                 DCSBIOSProtocolParser.RegisterAddressToBroadCast(dcsbiosOutput.Address);
                 found = true;
             }
         }
         if (!found)
         {
             throw new Exception("Could not find any DCS-BIOS Controls in formula expression.");
         }
         //_expression = new Expression(_formula);
     }
     catch (Exception ex)
     {
         Common.LogError(1955594, ex, "ExtractDCSBIOSOutputsInFormula() function");
         throw;
     }
 }
        public static DCSBIOSOutput GetUpdateCounter()
        {
            var counter = DCSBIOSControlLocator.GetDCSBIOSOutput("_UPDATE_COUNTER");

            return(counter);
        }