Пример #1
0
 public CemiLData(CemiMessageCode messageCode, IndividualAddress srcAddress, IAddress dstAddress, byte[] tpdu,
                  Priority priority, bool repeat = true, BroadcastType broadcast = BroadcastType.Normal, bool ack = false, int hopCount = 6)
     : base(messageCode)
 {
     VerifyPayload(tpdu);
     _additionalInfoLength = 0;
     _sourceAddress        = srcAddress;
     _destinationAddress   = dstAddress;
     _payload       = (byte[])tpdu.Clone();
     _apci          = new Apci(_payload);
     _controlField1 = new ControlField1(_messageCode, false, priority, repeat, broadcast, ack);
     _controlField2 = new ControlField2(_destinationAddress.IsGroupAddress(), hopCount, 0);
     _size          = MESSAGEMINLENGTH + _payload.Length;
 }
Пример #2
0
        protected void ParseControlField2(IndividualEndianessBinaryReader br)
        {
            var ctrl = br.ReadByte();

            _controlField2 = new ControlField2(ctrl);
        }