Beispiel #1
0
        public DiscoverResult[] DiscoverNodes()
        {
            var timeoutResponse = Send(AtCmd.NodeDiscoverTimeout).GetResponse();
            var timeout         = GetDiscoverTimeout(timeoutResponse);
            var request         = CreateDiscoverRequest(timeout);
            var responses       = request.GetResponses();
            var result          = new DiscoverResult[responses.Length];

            for (var i = 0; i < responses.Length; i++)
            {
                result[i] = GetDiscoverResponse(responses[i]);
            }

            return(result);
        }
Beispiel #2
0
 private void PrintNode(int nodeNumber, DiscoverResult info)
 {
     Debug.Print("#" + nodeNumber + " - " + info);
     led7r.TurnLightOn(nodeNumber);
 }
Beispiel #3
0
 private static void OnNodeDiscovered(DiscoverResult node)
 {
     Debug.Print("Node discovered: " + node.NodeInfo);
 }
Beispiel #4
0
        public DiscoverResult[] DiscoverNodes()
        {
            var timeoutResponse = Send(AtCmd.NodeDiscoverTimeout).GetResponse();
            var timeout = GetDiscoverTimeout(timeoutResponse);
            var request = CreateDiscoverRequest(timeout);
            var responses = request.GetResponses();
            var result = new DiscoverResult[responses.Length];

            for (var i = 0; i < responses.Length; i++)
                result[i] = GetDiscoverResponse(responses[i]);

            return result;
        }