// GET api/values public List <Model.Transmitter.TransmitModel> Get() { var newResp = new List <Model.Transmitter.TransmitModel>(); var newNode = new Model.Transmitter.TransmitModel(); newNode.tx = new Model.Transmitter.Tx(); newNode.tx.moteeui = "AAABBBEE"; newNode.tx.trycount = 5; newNode.tx.txmsgid = "000000000001"; newNode.tx.txsynch = false; newNode.tx.userdata = new Model.Transmitter.Userdata(); newNode.tx.userdata.payload = "Njg2NTZjNmM2ZjIwNjM2ZjZkNzA3NTc0NjU3Mg=="; newNode.tx.userdata.port = 2; newResp.Add(newNode); return(newResp); }
// POST api/values public List <Model.Transmitter.TransmitModel> Post([FromBody] List <Model.Receiver.ReceiveModel> value) { foreach (var item in value) { Console.WriteLine("from kerlink:" + item.rx.userdata.seqno + ":" + item.rx.userdata.payload); } var newResp = new List <Model.Transmitter.TransmitModel>(); var newNode = new Model.Transmitter.TransmitModel(); newNode.tx = new Model.Transmitter.Tx(); newNode.tx.moteeui = "AAABBBEE"; newNode.tx.trycount = 5; newNode.tx.txmsgid = "000000000001"; newNode.tx.txsynch = false; newNode.tx.userdata = new Model.Transmitter.Userdata(); newNode.tx.userdata.payload = "Njg2NTZjNmM2ZjIwNjM2ZjZkNzA3NTc0NjU3Mg=="; newNode.tx.userdata.port = 2; newResp.Add(newNode); return(newResp); }