public void Init() { ConnectionRequestAndCredit = 0b1110_0000; ClassAndOption = 0; // Only class 0 is supported when using TPKT over TCP DestinationReference = default; // Anything SourceReference = default; // Anything }
public void Init(BigEndianShort maxAmqCaller, BigEndianShort maxAmqCallee, BigEndianShort pduSize) { FunctionCode = FunctionCode.CommunicationSetup; Reserved = 0; MaxAmqCaller = maxAmqCaller; MaxAmqCallee = maxAmqCallee; PduSize = pduSize; }
public void Init(MessageType messageType, BigEndianShort paramLength, BigEndianShort dataLength) { ProtocolId = 0x32; MessageType = messageType; Reserved = default; PduRef = 1; ParamLength = paramLength; DataLength = dataLength; }
internal static void ThrowReservedNot0(BigEndianShort reserved) => throw new S7ProtocolException($"Expected reserved 0, received {(int)reserved}");
public void Init(BigEndianShort length) { Version = IsoVersion; Reserved = 0; Length = length; }