Exemplo n.º 1
0
        public override void Receive()
        {
            try
            {
                if (arduinoHandle.Send(SEND_PACKET))
                {
                    List <byte> receivePacket = new List <byte>();

                    if (arduinoHandle.Receive(receivePacket))
                    {
                        LogHandler.WriteLog(base.division, string.Format("{0} :: Receive() Success", this.ToString()));
                    }
                }
                else
                {
                    LogHandler.PrintLog(string.Format("{0} :: Receive() Fail :: Send Fail", this.ToString()));
                }
            }
            catch (Exception ex)
            {
                LogHandler.WriteLog(base.division, string.Format("{0} :: Receive() Exception :: Message = {1}", this.ToString(), ex.Message));
            }
        }