protected Datatype( IDatatypeHeader aHeader) : base(MessageType.Datatype) { Class = aHeader.Class; Size = aHeader.Size; }
private FloatingPointDataType( IDatatypeHeader aHeader, ByteOrdering aByteOrdering, byte aHighPaddingBit, byte aLowPaddingBit, byte aInternalPaddingBit, ushort aSignLocation, ushort aBitOffset, ushort aBitPrecision, byte aExponentLocation, byte aExponentSize, byte aMantissaLocation, byte aMantissaSize, uint aExponentBias) : this( aHeader.Size, aByteOrdering, aHighPaddingBit, aLowPaddingBit, aInternalPaddingBit, aSignLocation, aBitOffset, aBitPrecision, aExponentLocation, aExponentSize, aMantissaLocation, aMantissaSize, aExponentBias) { if (aHeader.Class != DatatypeClass.FloatingPoint) { throw new ArgumentException( $"Header Class must be {nameof(DatatypeClass.FixedPoint)}", nameof(aHeader)); } }
public CompoundDataType( IDatatypeHeader aHeader, IEnumerable <MemberEntry> aMembers) : this(aHeader.Size, aMembers) { if (aHeader.Class != DatatypeClass.Compound) { throw new ArgumentException( $"Header Class must be {nameof(DatatypeClass.Compound)}", nameof(aHeader)); } }
/// <summary> /// Initializes a new instance of the <see cref="T:ndf5.Messages.OpaqueDataType"/> class. /// </summary> /// <param name="aHeader">IDatatypeHeader with the basic data about this type</param> /// <param name="aAsciiTag">A ASCII tag.</param> public OpaqueDataType( IDatatypeHeader aHeader, string aAsciiTag) : this(aHeader.Size, aAsciiTag) { if (aHeader.Class != DatatypeClass.Opaque) { throw new ArgumentException( $"Header Class must be {nameof(DatatypeClass.Opaque)}", nameof(aHeader)); } }
/// <summary> /// Initializes a new instance of the <see cref="T:ndf5.Messages.ArrayType"/> class. /// </summary> /// <param name="aHeader">IDatatypeHeader with the basic data about this type</param> /// <param name="aDimensionSizes">Size of each dimension in this array</param> /// <param name="aBaseType">Type of the data elements of this array</param> public ArrayDataType( IDatatypeHeader aHeader, uint[] aDimensionSizes, Datatype aBaseType) : this(aDimensionSizes, aBaseType, aHeader.Size) { if (aHeader.Class != DatatypeClass.Array) { throw new ArgumentException( $"Header Class must be {nameof(DatatypeClass.Array)}", nameof(aHeader)); } }
private TimeDataType( IDatatypeHeader aHeader, ByteOrdering aByteOrdering, uint aBitPrecision) : this( aHeader.Size, aByteOrdering, aBitPrecision) { if (aHeader.Class != DatatypeClass.Time) { throw new ArgumentException( $"Header Class must be {nameof(DatatypeClass.Time)}", nameof(aHeader)); } }
private StringDataType( IDatatypeHeader aHeader, StringPadding aStringPadding, StringEncoding aStringEncoding) : this( aHeader.Size, aStringPadding, aStringEncoding) { if (aHeader.Class != DatatypeClass.String) { throw new ArgumentException( $"Header Class must be {nameof(DatatypeClass.String)}", nameof(aHeader)); } }
private BitFieldDataType( IDatatypeHeader aHeader, ByteOrdering aByteOrdering, byte aHighPaddingBit, byte aLowPaddingBit, ushort aBitOffset, ushort aBitPrecision) : this( aHeader.Size, aByteOrdering, aHighPaddingBit, aLowPaddingBit, aBitOffset, aBitPrecision) { if (aHeader.Class != DatatypeClass.BitField) { throw new ArgumentException( $"Header Class must be {nameof(DatatypeClass.BitField)}", nameof(aHeader)); } }
private FixedPointDataType( IDatatypeHeader aHeader, ByteOrdering aByteOrdering, byte aHighPaddingBit, byte aLowPaddingBit, bool aIsSigned, ushort aBitOffset, ushort aBitPrecision) : this( aHeader.Size, aByteOrdering, aHighPaddingBit, aLowPaddingBit, aIsSigned, aBitOffset, aBitPrecision) { if (aHeader.Class != DatatypeClass.FixedPoint) { throw new ArgumentException( $"Header Class must be {nameof(DatatypeClass.FixedPoint)}", nameof(aHeader)); } }