Пример #1
0
        public override List <byte[]> SerializationStatements()
        {
            var listOfSerializations = new List <byte[]>();

            listOfSerializations.AddRange(header.SerializationStatements());
            listOfSerializations.AddRange(orientation.SerializationStatements());

            Array.Resize(ref orientation_covariance, 9);
            foreach (var entry in orientation_covariance)
            {
                listOfSerializations.Add(BitConverter.GetBytes(entry));
            }
            listOfSerializations.AddRange(angular_velocity.SerializationStatements());

            Array.Resize(ref angular_velocity_covariance, 9);
            foreach (var entry in angular_velocity_covariance)
            {
                listOfSerializations.Add(BitConverter.GetBytes(entry));
            }
            listOfSerializations.AddRange(linear_acceleration.SerializationStatements());

            Array.Resize(ref linear_acceleration_covariance, 9);
            foreach (var entry in linear_acceleration_covariance)
            {
                listOfSerializations.Add(BitConverter.GetBytes(entry));
            }

            return(listOfSerializations);
        }
        public override List <byte[]> SerializationStatements()
        {
            var listOfSerializations = new List <byte[]>();

            listOfSerializations.Add(SerializeString(this.name));
            listOfSerializations.AddRange(orientation.SerializationStatements());
            listOfSerializations.Add(new[] { this.orientation_mode });
            listOfSerializations.Add(new[] { this.interaction_mode });
            listOfSerializations.Add(BitConverter.GetBytes(this.always_visible));

            listOfSerializations.Add(BitConverter.GetBytes(markers.Length));
            foreach (var entry in markers)
            {
                listOfSerializations.Add(entry.Serialize());
            }
            listOfSerializations.Add(BitConverter.GetBytes(this.independent_marker_orientation));
            listOfSerializations.Add(SerializeString(this.description));

            return(listOfSerializations);
        }