GSF.Historian.Files.StateRecord.GenerateBinaryImage C# (CSharp) Method

GenerateBinaryImage() public method

Generates binary image of the StateRecord and copies it into the given buffer, for BinaryLength bytes.
is null. /// or is less than 0 -or- /// and will exceed length. ///
public GenerateBinaryImage ( byte buffer, int startIndex ) : int
buffer byte Buffer used to hold generated binary image of the source object.
startIndex int 0-based starting index in the to start writing.
return int
        public int GenerateBinaryImage(byte[] buffer, int startIndex)
        {
            int length = BinaryLength;

            buffer.ValidateParameters(startIndex, length);

            m_archivedData.GenerateBinaryImage(buffer, startIndex);
            m_previousData.GenerateBinaryImage(buffer, startIndex + 16);
            m_currentData.GenerateBinaryImage(buffer, startIndex + 32);

            LittleEndian.CopyBytes(m_activeDataBlockIndex, buffer, startIndex + 48);
            LittleEndian.CopyBytes(m_activeDataBlockSlot, buffer, startIndex + 52);
            LittleEndian.CopyBytes(m_slope1, buffer, startIndex + 56);
            LittleEndian.CopyBytes(m_slope2, buffer, startIndex + 64);

            return length;
        }