예제 #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);
        }
예제 #2
0
 private void PrintNode(int nodeNumber, DiscoverResult info)
 {
     Debug.Print("#" + nodeNumber + " - " + info);
     led7r.TurnLightOn(nodeNumber);
 }
예제 #3
0
 private static void OnNodeDiscovered(DiscoverResult node)
 {
     Debug.Print("Node discovered: " + node.NodeInfo);
 }
예제 #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;
        }