예제 #1
0
        public Chr4Elgen()
        {
            _PwrBus = new PwrModbus(ePWRTYPE.ElgenCharger);
            _PwrBus.Evt_ModBusConnection += On_Connection;

            _StateChk.Interval = 1000;
            _StateChk.Elapsed += _State_Elapsed;
        }
예제 #2
0
 public void Close()
 {
     _StateChk.Stop();
     if (null != _PwrBus)
     {
         _PwrBus.Close();
         _PwrBus = null;
     }
 }
예제 #3
0
 public void Close()
 {
     _StateChk.Stop();
     if (false == bUseModbus)
     {
         _PwrCom.Close();
         _PwrCom = null;
     }
     else
     {
         if (null != _PwrBus)
         {
             _PwrBus.Close();
             _PwrBus = null;
         }
     }
 }
예제 #4
0
 public Bat4Elgen()
 {
     if (false == bUseModbus)
     {
         _PwrCom               = new SerialPort();
         _PwrCom.BaudRate      = 9600;
         _PwrCom.DataBits      = 8;
         _PwrCom.Parity        = Parity.None;
         _PwrCom.StopBits      = StopBits.One;
         _PwrCom.DataReceived += SerialPort_DataReceived;
     }
     else
     {
         _PwrBus = new PwrModbus(ePWRTYPE.ElgenBattery);
         _PwrBus.Evt_ModBusConnection += On_Connection;
     }
     _StateChk.Interval = 1000;
     _StateChk.Elapsed += _State_Elapsed;
 }