Esempio n. 1
0
        /// <summary>
        /// Parses a string of ECG data into a list of ECG packet objects.
        /// </summary>
        /// <param name="ecgStream">The string of ECG data</param>
        /// <returns>A list containing the packets of ECG data.</returns>
        private static List <ModeECGPacket> ParseECGStream(string ecgStream)
        {
            List <ModeECGPacket> packets = new List <ModeECGPacket>();

            int byteIndex = 0;

            while (byteIndex < ecgStream.Length)
            {
                string        packetValues = ecgStream.Substring(byteIndex, ModeECGPacket.ECGPacketHexTextLength);
                ModeECGPacket packet       = new ModeECGPacket(packetValues);
                packets.Add(packet);
                byteIndex += ModeECGPacket.ECGPacketHexTextLength;
            }

            return(packets);
        }
Esempio n. 2
0
        /// <summary>
        /// Parses a string of ECG data into a list of ECG packet objects.
        /// </summary>
        /// <param name="ecgStream">The string of ECG data</param>
        /// <returns>A list containing the packets of ECG data.</returns>
        private static List<ModeECGPacket> ParseECGStream(string ecgStream)
        {
            List<ModeECGPacket> packets = new List<ModeECGPacket>();

            int byteIndex = 0;
            while (byteIndex < ecgStream.Length)
            {
                string packetValues = ecgStream.Substring(byteIndex, ModeECGPacket.ECGPacketHexTextLength);
                ModeECGPacket packet = new ModeECGPacket(packetValues);
                packets.Add(packet);
                byteIndex += ModeECGPacket.ECGPacketHexTextLength;
            }

            return packets;
        }