public override byte[] GetByteMessage() { List <byte> messageArray = new List <byte>(); messageArray.AddRange(Mhdr.ToArray()); DevAddr.Span.Reverse(); messageArray.AddRange(DevAddr.ToArray()); DevAddr.Span.Reverse(); messageArray.AddRange(Fctrl.ToArray()); messageArray.AddRange(Fcnt.ToArray()); if (!Fopts.Span.IsEmpty) { messageArray.AddRange(Fopts.ToArray()); } if (!Fport.Span.IsEmpty) { messageArray.AddRange(Fport.ToArray()); } if (!Frmpayload.Span.IsEmpty) { messageArray.AddRange(Frmpayload.ToArray()); } if (Mic.Span != null) { messageArray.AddRange(Mic.Span.ToArray()); } return(messageArray.ToArray()); }
public MacCommandHolder GetMacCommands() { MacCommandHolder macHolder = new MacCommandHolder(Fopts.ToArray()); return(macHolder); }