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