示例#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
 }
示例#2
0
 public void Init(BigEndianShort maxAmqCaller, BigEndianShort maxAmqCallee, BigEndianShort pduSize)
 {
     FunctionCode = FunctionCode.CommunicationSetup;
     Reserved     = 0;
     MaxAmqCaller = maxAmqCaller;
     MaxAmqCallee = maxAmqCallee;
     PduSize      = pduSize;
 }
示例#3
0
文件: Header.cs 项目: mycroes/Sally7
 public void Init(MessageType messageType, BigEndianShort paramLength, BigEndianShort dataLength)
 {
     ProtocolId  = 0x32;
     MessageType = messageType;
     Reserved    = default;
     PduRef      = 1;
     ParamLength = paramLength;
     DataLength  = dataLength;
 }
示例#4
0
 internal static void ThrowReservedNot0(BigEndianShort reserved)
 => throw new S7ProtocolException($"Expected reserved 0, received {(int)reserved}");
示例#5
0
文件: Tpkt.cs 项目: mycroes/Sally7
 public void Init(BigEndianShort length)
 {
     Version  = IsoVersion;
     Reserved = 0;
     Length   = length;
 }