Пример #1
0
 public FHDR(IPayloadPart parent) : base(parent)
 {
     Length  = 7 + (Parent.RawData[4] & 0x03);
     DevAddr = new DevAddr(this);
     FCtrl   = new FCtrl(this);
     FCnt    = new FCnt(this);
     FOpts   = new FOpts(this);
 }
Пример #2
0
        public string ToVerboseString()
        {
            StringBuilder sb = new StringBuilder();

            sb.AppendFormat("       (FHDR = DevAddr[4] | FCtrl[1] | FCnt[2] | FOpts[0..15])").AppendLine();
            sb.AppendFormat("     DevAddr = {0} (Big Endian)", DevAddr.Address).AppendLine();
            sb.AppendFormat("       FCtrl = {0}", FCtrl.RawData.ToHexString()).AppendLine();
            sb.AppendFormat("        FCnt = {0} 0x{0:X4} (Big Endian)", FCnt.Value).AppendLine();
            sb.AppendFormat("       FOpts = {0}", FOpts.RawData.ToHexString()).AppendLine();
            sb.AppendLine();
            sb.Append(FCtrl.ToVerboseString());
            return(sb.ToString());
        }