/// <summary> /// Initiates the communication class /// </summary> /// <param name="spSet">The serial port used for communication to the USB receiver</param> /// <param name="parentForm">The form using this</param> public ANTCommunication(ref SerialPort spSet, ANTDataInterpreter parentForm) { sp = spSet; waitTimer = new System.Timers.Timer(500); waitTimer.Elapsed += new System.Timers.ElapsedEventHandler(waitTimer_Elapsed); parent = parentForm; //responseCodes = GetResponseCodes(); }
/// <summary> /// Initializes the buffer /// </summary> /// <param name="parentForm">The form to report information back to</param> public BufferedReader(ANTDataInterpreter parentForm) { buffer = new byte[maxIndex + 1]; readIndex = 0; writeIndex = 0; cmpWrite = 0; messages = new List<byte[]>(); readingMessage = false; parent = parentForm; }