Ejemplo n.º 1
0
        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());
        }
Ejemplo n.º 2
0
        public MacCommandHolder GetMacCommands()
        {
            MacCommandHolder macHolder = new MacCommandHolder(Fopts.ToArray());

            return(macHolder);
        }