Пример #1
0
        public override byte[] ToBytes()
        {
            int length = 10;

            length += Frustum.Length;
            length += Camera.Length;
            if (Header.AckList != null && Header.AckList.Length > 0)
            {
                length += Header.AckList.Length * 4 + 1;
            }
            byte[] bytes = new byte[length];
            int    i     = 0;

            Header.ToBytes(bytes, ref i);
            Frustum.ToBytes(bytes, ref i);
            Camera.ToBytes(bytes, ref i);
            if (Header.AckList != null && Header.AckList.Length > 0)
            {
                Header.AcksToBytes(bytes, ref i);
            }
            return(bytes);
        }