public static CThermal_Adapter_Unit Instance(string strPort)
 {
     lock (m_Lock)
     {
         CThermal_Adapter_Unit inst = null;
         if (!m_instances.TryGetValue(strPort, out inst))
         {
             inst = new CThermal_Adapter_Unit(strPort);
             m_instances.Add(strPort, inst);
         }
         return(inst);
     }
 }
Esempio n. 2
0
        virtual public void open(CSystem_Configuration_File_Reader.CSystem_Configuration_Obj configObj)
        {
            _m_configObj = configObj;

            // TEC
            m_strThermalConfigSectionId = CSystem_Defns.cstrTECEntries[m_uiTECIndex];
            m_strThermalControllerId    = configObj.m_TEC_Channel_Configurations[m_strThermalConfigSectionId].m_strControllerName;
            _m_ThermalAdapterUnit       = CThermal_Adapter_Unit.Instance(configObj.m_ThermalControllerConfigurations[m_strThermalControllerId].m_strPort);

            _m_isOpen                  = false;
            _m_fSetpoint               = 0.0F;
            _m_fTemperatureReading     = 0.0F;
            _m_ThermalTemperatureState = eThermalTemperatureState.Idle_ThermalTempState;
            _m_ThermalAdapterUnit.open();
            return;
        }