Esempio n. 1
0
        /// <summary>
        /// Reads the data from a memory buffer into this packet object.
        /// </summary>
        /// <param name="data">The data to be read.</param>
        /// <remarks>
        /// Decodes the raw data into usable information.
        /// </remarks>
        public override void ReadData(TCNetBinaryReader data)
        {
            base.ReadData(data);

            data.ReadByte();
            LoopIn  = data.ReadNetworkTime();
            LoopOut = data.ReadNetworkTime();
        }
Esempio n. 2
0
        /// <summary>
        /// Reads the data from a memory buffer into this packet object.
        /// </summary>
        /// <param name="data">The data to be read.</param>
        /// <remarks>
        /// Decodes the raw data into usable information.
        /// </remarks>
        public override void ReadData(TCNetBinaryReader data)
        {
            base.ReadData(data);

            DataSize        = data.ReadNetwork32();
            TotalPackets    = data.ReadNetwork32();
            PacketNumber    = data.ReadNetwork32();
            DataClusterSize = data.ReadNetwork32();

            long            readPosition = DataClusterSize;
            List <BeatData> beats        = new List <BeatData>();

            while (readPosition > 7)
            {
                BeatData beat = new BeatData();
                beat.BeatNumber = data.ReadNetwork16();
                beat.BeatType   = (BeatTypes)data.ReadByte();
                data.ReadByte();
                beat.BeatTimeStamp = data.ReadNetworkTime();

                beats.Add(beat);

                readPosition -= 8;
            }

            Beats = beats;
        }
Esempio n. 3
0
        /// <summary>
        /// Reads the data from a memory buffer into this packet object.
        /// </summary>
        /// <param name="data">The data to be read.</param>
        /// <remarks>
        /// Decodes the raw data into usable information.
        /// </remarks>
        public override void ReadData(TCNetBinaryReader data)
        {
            base.ReadData(data);

            Layer[] layers = new Layer[] { Layer1, Layer2, Layer3, Layer4, LayerA, LayerB, LayerM, LayerC };

            //Current Time
            foreach (var layer in layers)
            {
                layer.CurrentTime = data.ReadNetworkTime();
            }

            //Total Time
            foreach (var layer in layers)
            {
                layer.TotalTime = data.ReadNetworkTime();
            }

            //Beat Marker
            foreach (var layer in layers)
            {
                layer.BeatMarker = data.ReadByte();
            }

            //Layer State
            foreach (var layer in layers)
            {
                layer.State = (DeckState)data.ReadByte();
            }

            //On Air
            foreach (var layer in layers)
            {
                layer.OnAir = data.ReadBoolean();
            }

            data.ReadBytes(42);
        }