예제 #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="DownlinkPktFwdMessage"/> class.
 /// This method is used in case of a response to a upstream message.
 /// </summary>
 /// <returns>DownlinkPktFwdMessage object ready to be sent.</returns>
 public DownlinkPktFwdMessage(byte[] loRaData, string datr, double freq, long tmst = 0)
 {
     this.Txpk = new Txpk()
     {
         Imme = tmst == 0 ? true : false,
         Tmst = tmst,
         Data = Convert.ToBase64String(loRaData),
         Size = (uint)loRaData.Length,
         Freq = freq,
         Rfch = 0,
         Modu = "LORA",
         Datr = datr,
         Codr = "4/5",
         // TODO put 14 for EU
         Powe = 14,
         Ipol = true
     };
 }
예제 #2
0
        public DownlinkPktFwdMessage(string data, string datr = "SF12BW125", uint rfch = 0, double freq = 869.525000, long tmst = 0)
        {
            var byteData = Convert.FromBase64String(data);

            this.Txpk = new Txpk()
            {
                Imme = tmst == 0 ? true : false,
                Tmst = tmst,
                Data = data,
                Size = (uint)byteData.Length,
                Freq = freq,
                Rfch = rfch,
                Modu = "LORA",
                Datr = datr,
                Codr = "4/5",
                // TODO put 14 for EU
                Powe = 14,
                Ipol = true
            };
        }
예제 #3
0
        public DownlinkPktFwdMessage(string data, string datr = "SF12BW125", uint rfch = 0, double freq = 869.525000, long tmst = 0)
        {
            var byteData = Convert.FromBase64String(data);

            txpk = new Txpk()
            {
                imme = tmst == 0 ? true : false,
                tmst = tmst,
                data = data,
                size = (uint)byteData.Length,
                freq = freq,
                rfch = rfch,
                modu = "LORA",
                datr = datr,
                codr = "4/5",
                //TODO put 14 for EU
                powe = 14,
                ipol = true
            };
        }