/// <summary>
        /// Constructor
        /// </summary>
        /// <param name="logger">The EZSP logger</param>
        //  Revision History
        //  MM/DD/YY Who Version Issue# Description
        //  -------- --- ------- ------ -------------------------------------------
        //  08/09/11 RCG 2.52.00        Created

        public EZSPSerialCommunications(EZSPLogger logger)
        {
            m_Port                   = new SerialPort();
            m_ResourceManager        = new ResourceManager(RESOURCE_FILE_PROJECT_STRINGS, GetType().Assembly);
            m_DataReceivedHandler    = new SerialDataReceivedEventHandler(DataReceivedEventHandler);
            m_ReadBuffer             = new byte[BUFFER_SIZE];
            m_ValidDataStart         = 0;
            m_ValidDataLength        = 0;
            m_SubstituteFlagOccurred = false;

            m_Logger = logger;
        }
Exemple #2
0
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="comm">The serial port communications object to be used.</param>
        /// <param name="logger">The EZSP logger</param>
        //  Revision History
        //  MM/DD/YY Who Version Issue# Description
        //  -------- --- ------- ------ -------------------------------------------
        //  08/09/11 RCG 2.52.00        Created

        public ASHProtocol(EZSPSerialCommunications comm, EZSPLogger logger)
        {
            m_SerialComm          = comm;
            m_DataReceivedHandler = new EventHandler(m_SerialComm_DataReceived);

            m_Resetting = false;
            m_Connected = false;

            m_Connected       = false;
            m_HostFrameNumber = 0;
            m_NCPFrameNumber  = 0;
            m_LastError       = 0;

            m_Logger = logger;

            m_ReceivedFrames = new List <ASHFrame>();
            m_SentFrames     = new List <ASHFrame>();
        }