예제 #1
0
        private DevAddr UnmarshalDevAddr(byte[] devaddr)
        {
            var returnvalue = new DevAddr();

            returnvalue.NwkId   = (byte)(devaddr[0] >> 1);
            devaddr[0]          = (byte)(devaddr[0] & 1);
            returnvalue.NwkAddr = BitConverter.ToUInt32(devaddr, 0);
            return(returnvalue);
        }
예제 #2
0
 public byte[] MarshalDevAddr(DevAddr devaddr)
 {
     return(BitConverter.GetBytes(Convert.ToUInt32((devaddr.NwkId * 16777216) + devaddr.NwkAddr)));
 }