public CemiLData(CemiMessageCode messageCode, IndividualAddress srcAddress, IAddress dstAddress, byte[] tpdu, Priority priority, ConfirmType confirm) : this(messageCode, srcAddress, dstAddress, tpdu, priority, true, BroadcastType.Normal, false, 6) { // overwrite controlField1 now including confirm _controlField1 = new ControlField1(_messageCode, false, priority, true, BroadcastType.Normal, false, confirm); }
protected override void VerifyMessageCode(CemiMessageCode messageCode) { if (messageCode != CemiMessageCode.LDATA_REQ && messageCode != CemiMessageCode.LDATA_CON && messageCode != CemiMessageCode.LDATA_IND) { throw BufferFieldException.WrongValue("MessageCode", "LDATA*", messageCode.ToString()); } }
/// <summary> /// /// </summary> /// <param name="mc"></param> /// <param name="prio"></param> /// <param name="repeat"></param> /// <param name="broadcast"></param> /// <param name="ack"></param> /// <param name="confirm"></param> public ControlField1(CemiMessageCode mc, bool extendedFrame = false, Priority prio = Priority.Normal, bool repeat = true, BroadcastType broadcast = BroadcastType.Normal, bool ack = true, ConfirmType confirm = ConfirmType.NoError) { _messageCode = mc; _extendedFrame = extendedFrame; _repeat = repeat; _broadcast = broadcast; _priority = prio; _acknowledgeRequest = ack; _confirm = confirm; ToByte(); }
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; }
/// <summary> /// Creates a ControlField1 class from an encoded byte that is parsed to the according properties /// </summary> /// <param name="messageCode">The cemi message code the controlfield was sent with</param> /// <param name="data">ControlField1 as byte representation</param> public ControlField1(CemiMessageCode messageCode, byte data) { _messageCode = messageCode; _rawData = data; ParseData(); }
public CemiLDataEx(CemiMessageCode messageCode, IndividualAddress srcAddress, IAddress dstAddress, byte[] tpdu, Priority priority, ConfirmType confirm) : this(messageCode, srcAddress, dstAddress, tpdu, priority, true, BroadcastType.Normal, false, 6) { }
public CemiLDataEx(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, srcAddress, dstAddress, tpdu, priority, repeat, broadcast, ack, hopCount) { }