/// <summary>
        /// Creates the <see cref="OpenDis.Enumerations.DistributedEmission.Iff.Type1Parameter4Mode4CodeStatus"/> instance from the ushort value.
        /// </summary>
        /// <param name="value">The ushort value which represents the <see cref="OpenDis.Enumerations.DistributedEmission.Iff.Type1Parameter4Mode4CodeStatus"/> instance.</param>
        /// <returns>The <see cref="OpenDis.Enumerations.DistributedEmission.Iff.Type1Parameter4Mode4CodeStatus"/> instance, represented by the ushort value.</returns>
        public static Type1Parameter4Mode4CodeStatus FromUInt16(ushort value)
        {
            Type1Parameter4Mode4CodeStatus ps = new Type1Parameter4Mode4CodeStatus();

            uint mask0     = 0x0fff;
            byte shift0    = 0;
            uint newValue0 = (value & mask0) >> shift0;

            ps.CodeElement1 = (Type1Parameter4Mode4CodeStatus.CodeElement1Value)newValue0;

            uint mask2     = 0x2000;
            byte shift2    = 13;
            uint newValue2 = (value & mask2) >> shift2;

            ps.Status = (Type1Parameter4Mode4CodeStatus.StatusValue)newValue2;

            uint mask3     = 0x4000;
            byte shift3    = 14;
            uint newValue3 = (value & mask3) >> shift3;

            ps.Damage = (Type1Parameter4Mode4CodeStatus.DamageValue)newValue3;

            uint mask4     = 0x8000;
            byte shift4    = 15;
            uint newValue4 = (value & mask4) >> shift4;

            ps.Malfunction = (Type1Parameter4Mode4CodeStatus.MalfunctionValue)newValue4;

            return(ps);
        }
        /// <summary>
        /// Determines whether the specified <see cref="OpenDis.Enumerations.DistributedEmission.Iff.Type1Parameter4Mode4CodeStatus"/> instance is equal to this instance.
        /// </summary>
        /// <param name="other">The <see cref="OpenDis.Enumerations.DistributedEmission.Iff.Type1Parameter4Mode4CodeStatus"/> instance to compare with this instance.</param>
        /// <returns>
        ///     <c>true</c> if the specified <see cref="OpenDis.Enumerations.DistributedEmission.Iff.Type1Parameter4Mode4CodeStatus"/> is equal to this instance; otherwise, <c>false</c>.
        /// </returns>
        public bool Equals(Type1Parameter4Mode4CodeStatus other)
        {
            // If parameter is null return false (cast to object to prevent recursive loop!)
            if ((object)other == null)
            {
                return(false);
            }

            return
                (this.CodeElement1 == other.CodeElement1 &&
                 this.Status == other.Status &&
                 this.Damage == other.Damage &&
                 this.Malfunction == other.Malfunction);
        }