public SlaveVariable(SlavePdo parent, string name, ushort index, byte subIndex, DataDirection dataDirection, OneDasDataType dataType, byte bitLength = 0) : base(name, dataType, dataDirection, Endianness.LittleEndian) { Contract.Requires(parent != null); this.Parent = parent; this.Index = index; this.SubIndex = subIndex; if (bitLength == 0) { this.BitLength = OneDasUtilities.GetBitLength(dataType, false); } else { this.BitLength = bitLength; } }
private bool IsAssociationAllowed(DataPort dataPort, ChannelHubSettings channelHub) { return(OneDasUtilities.GetBitLength(dataPort.DataType, true) == OneDasUtilities.GetBitLength(channelHub.DataType, true)); }