/// <summary>
        /// Upon receiving data, unpack the byte array into the class members
        /// </summary>
        public override void Unpack(byte[] buffer)
        {
            // Read the Scmp.Base structure
            base.Unpack(buffer);

            // Create reader to easily unpack the network buffer
            var reader = new SledNetworkBufferReader(buffer, SizeOf);

            Name = reader.ReadString();
            KeyType = reader.ReadInt16();
            Value = reader.ReadString();
            What = reader.ReadInt16();

            StackLevel = reader.ReadInt16();
            Index = reader.ReadInt32();

            var count = reader.ReadUInt16();
            for (UInt16 i = 0; i < count; ++i)
            {
                var name = reader.ReadString();
                var type = reader.ReadInt16();
                Hierarchy.Add(new KeyValuePair<string, int>(name, type));
            }
        }
        /// <summary>
        /// Upon receiving data, unpack the byte array into the class members
        /// </summary>
        public override void Unpack(byte[] buffer)
        {
            // Read the Scmp.Base structure
            base.Unpack(buffer);

            // Create reader to easily unpack the network buffer
            var reader = new SledNetworkBufferReader(buffer, SizeOf);

            MaxBreakpoints = reader.ReadUInt16();
            MaxVarFilters = reader.ReadUInt16();
            ProfilerEnabled = (reader.ReadByte() == 1);
            MemoryTracerEnabled = (reader.ReadByte() == 1);
        }
Exemplo n.º 3
0
        /// <summary>
        /// Upon receiving data, unpack the byte array into the class members
        /// </summary>
        /// <param name="buffer">Received data to unpack</param>
        public override void Unpack(byte[] buffer)
        {
            // Read the Scmp.Base structure
            base.Unpack(buffer);

            // Create reader to easily unpack the network buffer
            var reader = new SledNetworkBufferReader(buffer, SizeOf);

            Major = reader.ReadUInt16();
            Minor = reader.ReadUInt16();
            Revision = reader.ReadUInt16();
        }
Exemplo n.º 4
0
        /// <summary>
        /// Upon receiving data, unpack the byte array into the class members
        /// </summary>
        /// <param name="buffer">Received data to unpack</param>
        public override void Unpack(byte[] buffer)
        {
            // Read the Scmp.Base structure
            base.Unpack(buffer);

            // Create reader to easily unpack the network buffer
            var reader = new SledNetworkBufferReader(buffer, SizeOf);

            BreakPluginId = reader.ReadUInt16();
            RelFilePath = SledUtil.FixSlashes(reader.ReadString());
            Line = reader.ReadInt32();
        }
Exemplo n.º 5
0
        /// <summary>
        /// Upon receiving data, unpack the byte array into the base SLED Control Message Protocol (SCMP) class members
        /// </summary>
        /// <param name="buffer">Received data to unpack</param>
        public virtual void Unpack(byte[] buffer)
        {
            // Create reader to easily unpack the network buffer
            var reader = new SledNetworkBufferReader(buffer);

            m_length = reader.ReadInt32();
            m_typeCode = reader.ReadUInt16();
            m_pluginId = reader.ReadUInt16();
        }
Exemplo n.º 6
0
        /// <summary>
        /// Unpack buffer and determine endianness
        /// </summary>
        /// <param name="buffer">Received data to unpack</param>
        public override void Unpack(byte[] buffer)
        {
            // Create reader to easily unpack the network buffer
            var reader = new SledNetworkBufferReader(buffer);

            Length = reader.ReadInt32();
            TypeCode = reader.ReadUInt16();
            PluginId = reader.ReadUInt16();

            // Data is potentially big endian and we need to compensate!
            if (TypeCode != (UInt16)TypeCodes.Endianness)
            {
                // Swap and re-check
                const int iSizeOfI32 = SledNetworkBufferReader.SizeOfInt32;
                const int iSizeOfU16 = SledNetworkBufferReader.SizeOfUInt16;

                Array.Reverse(buffer, 0, iSizeOfI32);
                Array.Reverse(buffer, iSizeOfI32, iSizeOfU16);
                Array.Reverse(buffer, iSizeOfI32 + iSizeOfU16, iSizeOfU16);

                Length = BitConverter.ToInt32(buffer, 0);
                TypeCode = BitConverter.ToUInt16(buffer, iSizeOfI32);
                PluginId = BitConverter.ToUInt16(buffer, iSizeOfI32 + iSizeOfU16);

                // Verify data is big endian
                if (TypeCode == (UInt16)TypeCodes.Endianness)
                    m_endianness = Endian.Big;
            }
            else
            {
                // Data is little endian
                m_endianness = Endian.Little;
            }
        }