Esempio n. 1
0
        /// <summary>
        /// SSM's read-block operation
        /// </summary>
        private void ReadBlock(int blockStart, byte blockLength)
        {
            byte[] payload = new byte[blockLength];

            for (int offset = 0; offset < blockLength; offset++)
            {
                int  address = blockStart + offset;
                byte value   = this.GetValue(address);
                payload[offset] = value;
            }

            SsmPacket responsePacket = SsmPacket.CreateBlockReadResponse(payload);

            this.SetResponse(responsePacket.Data);
        }