void ethernet_NetworkDown(GT.Modules.Module.NetworkModule sender, GT.Modules.Module.NetworkModule.NetworkState state) { Debug.Print("Ethernet network is down"); ethernetConnected = false; Display.UpdateEtherStatus(false); }
/** * Esta funcion se llama cuando la conexion a la red esta funcionando */ void OnNetworkUp(GTM.Module.NetworkModule sender, GTM.Module.NetworkModule.NetworkState state) { Debug.Print("Network up."); ListNetworkInterfaces(); String _oauth_consumer_key = "B7Iv0UO3POq9Wmq8wqTBRJU4P"; String _oauth_token = "2263254559-bf9KdsZIXFLRftXVtzcHFaFhrCyXC2DnR49SMJ2"; String _oauth_consumer_secret = "ZX3XtPezAmKPDg3JoHsxNgbK0ChzokkkaQ7Ub05docptodFwWW"; String _oauth_token_secret = "GiDBFi7hpnHpsPPvfOIzo9WEBEM9PBrjp8iJMeQghLQCD"; String http_method = "POST"; String http_uri = "http://api.twitter.com/1.1/statuses/update.json"; Hashtable http_get = new Hashtable(); //http_get.Add("include_entities", "true"); Hashtable http_post = new Hashtable(); http_post.Add("status", "Hello Ladies + Gentlemen, a signed OAuth request!"); /** * Se hace una llamada al api de twitter para generar una entrada con los valores leidos de la SD */ TwitterAPI twitter = new TwitterAPI(_oauth_consumer_key, _oauth_token, _oauth_consumer_secret, _oauth_token_secret, http_method, http_uri, http_get, http_post); HttpRequest request = twitter.createSignedRequest(); request.ResponseReceived += new HttpRequest.ResponseHandler(ResponseReceived); request.SendRequest(); }
void ethernetJ11D_NetworkDown(GTM.Module.NetworkModule sender, GTM.Module.NetworkModule.NetworkState state) { if (!sender.IsNetworkConnected && !sender.IsNetworkUp) { Debug.Print("Network is not available!"); } }
private void ethernetJ11D_NetworkDown(GTM.Module.NetworkModule sender, GTM.Module.NetworkModule.NetworkState state) { Program.setInternet(false); //initializeNetwork(); //ethernetJ11D.NetworkInterface.Close(); Debug.Print("network just got down!\n"); }
// Network is online event private static void NetworkUp(GTM.Module.NetworkModule sender, GTM.Module.NetworkModule.NetworkState state) { DebugOnly.Print("Network is up!"); // Start ServerRoutine startRoutine(); }
void ethernet_NetworkUp(GTM.Module.NetworkModule sender, GTM.Module.NetworkModule.NetworkState state) { Debug.Print("Network is Up with following properties"); Debug.Print("IP:" + ethernetJ11D.NetworkSettings.IPAddress.ToString()); Gadgeteer.Networking.WebServer.StartLocalServer(ethernetJ11D.NetworkSettings.IPAddress, 80); foreach (string s in sender.NetworkSettings.DnsAddresses) { Debug.Print("Dns:" + s); } var NetworkSettings = ethernetJ11D.NetworkSettings; Debug.Print("IP Address: " + NetworkSettings.IPAddress); Debug.Print("Subnet Mask: " + NetworkSettings.SubnetMask); Debug.Print("Gateway: " + NetworkSettings.GatewayAddress); test = Gadgeteer.Networking.WebServer.SetupWebEvent("test"); test.WebEventReceived += new WebEvent.ReceivedWebEventHandler(test_WebEventReceived); seePicture = Gadgeteer.Networking.WebServer.SetupWebEvent("seepicture"); seePicture.WebEventReceived += new WebEvent.ReceivedWebEventHandler(seePicture_WebEventReceived); button.TurnLedOn(); }
/// <summary> /// evento scatenato a seguito dell'avvenuta connessione ad internet /// </summary> void ethernet_NetworkUp(Gadgeteer.Modules.Module.NetworkModule sender, Gadgeteer.Modules.Module.NetworkModule.NetworkState state) { //Set the URI for the resource Debug.Print("Network up."); led.TurnGreen(); ListNetworkInterfaces(); getServerTime(); }
void ethernetJ11D_NetworkDown(GTM.Module.NetworkModule sender, GTM.Module.NetworkModule.NetworkState state) { Debug.Print("Desconectado"); //texto.Text = "No Network"; timer.Stop(); btn_news.Enabled = false; btn_temperature.Enabled = false; }
void ethernetJ11D_NetworkUp(GTM.Module.NetworkModule sender, GTM.Module.NetworkModule.NetworkState state) { tempControl.StartChecking(); doorControl = new Door.DoorControl(ethernetJ11D, buttonDoorStatus); GetInvemtory(); GetItems(); //throw new NotImplementedException(); }
//void ethernet_J11D_NetworkDown(GTM.Module.NetworkModule sender, GTM.Module.NetworkModule.NetworkState state) //{ // multicolorLed.TurnRed(); //} void ethernet_J11D_NetworkUp(GTM.Module.NetworkModule sender, GTM.Module.NetworkModule.NetworkState state) { // wait for NW to settle ... Thread.Sleep(2500); multicolorLed.TurnGreen(); ClearDisplay(); // start timer after NW up ... timer.Start(); }
void ethernetJ11D_NetworkUp(Gadgeteer.Modules.Module.NetworkModule sender, Gadgeteer.Modules.Module.NetworkModule.NetworkState state) { StatusLed.led.SetLed(1, true); StatusLed.led.SetLed(2, true); Debug.Print("Network UP!"); PrintNetworkState(); mqtt.connectInfinite(); TimeSync.connectionEvent.Set(); }
void ethernet_NetworkUp(GTM.Module.NetworkModule sender, GTM.Module.NetworkModule.NetworkState state) { led.TurnGreen(); string ipAddress = ethernet.NetworkSettings.IPAddress; WebServer.StartLocalServer(ipAddress, 80); sayHello = WebServer.SetupWebEvent("hello"); sayHello.WebEventReceived += new WebEvent.ReceivedWebEventHandler(sayHello_WebEventReceived); }
/** * This method is triggered when the network goes up. */ private void OnNetworkUp(GTM.Module.NetworkModule sender, GTM.Module.NetworkModule.NetworkState state) { Debug.Print("Network up!"); NetworkUp = true; multicolorLED.TurnGreen(); ListNetworkInterfaces(); ethernetJ11D.NetworkDown += OnNetworkDown; WindowsManager.showWindowInsertPin(); }
/// <summary> /// Network Down Handler: Resets signal "network_up_event" to block threads that need internet /// </summary> /// <param name="sender"></param> /// <param name="state"></param> void ethernetJ11D_NetworkDown(GTM.Module.NetworkModule sender, GTM.Module.NetworkModule.NetworkState state) { #if (DEBUG) Debug.Print("Network is down"); #endif network_up_event.Reset(); network_down_up_event.Reset(); MQTT_connected_event.Reset(); }
void ethernetJ11D_NetworkUp(GTM.Module.NetworkModule sender, GTM.Module.NetworkModule.NetworkState state) { ip = ethernetJ11D.NetworkSettings.IPAddress; //texto.Text = ip; tiempox(); btn_news.Enabled = true; btn_temperature.Enabled = true; pantalla = pantallaTiempo; }
void ethernetJ11D_NetworkUp(GTM.Module.NetworkModule sender, GTM.Module.NetworkModule.NetworkState state) { #if DEBUG Debug.Print("The network is up."); Debug.Print("IP Address: " + sender.NetworkSettings.IPAddress); #endif //starting the web service ws = new WebService(boardIpAddress, 80, this, this.ethernetJ11D); }
void ethernet_NetworkUp(GT.Modules.Module.NetworkModule sender, GT.Modules.Module.NetworkModule.NetworkState state) { Debug.Print("Ethernet network is up"); PrintEthConfiguration(); ethernetConnected = true; Display.UpdateEtherStatus(true); Time.InitService(); }
void ethernetJ11D_NetworkDown(GTM.Module.NetworkModule sender, GTM.Module.NetworkModule.NetworkState state) { if (ws != null) { ws.Close(); } #if DEBUG Debug.Print("network is down"); #endif }
private void network_down(GTM.Module.NetworkModule sender, GTM.Module.NetworkModule.NetworkState state) { gestioneC.annullaConnessione(); timer.Stop(); ledStrip.TurnAllLedsOff(); ledStrip.TurnLedOn(5); ledStrip.TurnLedOn(6); //stampo a video un messaggio di errrore (Connessione assente!!!) }
// handle the network changed events void wifi_NetworkDown(GT.Modules.Module.NetworkModule sender, GT.Modules.Module.NetworkModule.NetworkState state) { if (state == GT.Modules.Module.NetworkModule.NetworkState.Down) { UserInterface.Instance.log("Network Down event; state = Down"); } else { UserInterface.Instance.log("Network Down event; state = Up"); } }
// handle the network changed events void wifi_NetworkDown(GT.Modules.Module.NetworkModule sender, GT.Modules.Module.NetworkModule.NetworkState state) { if (state == GT.Modules.Module.NetworkModule.NetworkState.Down) { Debug.Print("Network Up event; state = Down"); } else { Debug.Print("Network Up event; state = Up"); } }
void OnNetworkUp(GTM.Module.NetworkModule sender, GTM.Module.NetworkModule.NetworkState state) { Debug.Print("Network up."); connected = true; server_available = true; DrawMainWindow(); timerSend.Tick += sendData; timerSend.Start(); //sendData(); return; }
private void ethernet_NetworkUp(GTM.Module.NetworkModule sender, GTM.Module.NetworkModule.NetworkState state) { Debug.Print("Network Up!"); txtAddress.TextContent = "IP Address: " + ethernet.NetworkSettings.IPAddress + ", port 8080"; SocketServer server = new SocketServer(8080); server.DataReceived += new DataReceivedEventHandler(server_DataReceived); server.Start(); }
void wifiRS21_NetworkUp(GTM.Module.NetworkModule sender, GTM.Module.NetworkModule.NetworkState state) { //Quando la connessione è "up" inizamo a trasmettere i dati al server Debug.Print("Network is up!"); connected = true; server_available = true; DrawMainWindow(); timerSend.Tick += sendData; timerSend.Start();//TODO: Capire perche' parte dopo tot tempo!!!!solution:problema stava in gestione della coda di thread return; }
void wifi_NetworkUp(GT.Modules.Module.NetworkModule sender, GT.Modules.Module.NetworkModule.NetworkState state) { if (state == GT.Modules.Module.NetworkModule.NetworkState.Up) { UserInterface.Instance.log("Network Up event; state = Up"); Debug.Print("IP Address: " + wifi_RS21.NetworkSettings.IPAddress); } else { UserInterface.Instance.log("Network Up event; state = Down"); } }
private void wifi_NetworkUp(GTM.Module.NetworkModule sender, GTM.Module.NetworkModule.NetworkState state) { network.ConnectWIFI(); if (network.getIp() != "0.0.0.0") { multicolorLED.TurnGreen(); client.SendIpHTTP(network.getIp()); Thread t_op = new Thread(threadSendConfig); t_op.Start(); } }
void ethernet_NetworkUp(GTM.Module.NetworkModule sender, GTM.Module.NetworkModule.NetworkState state) { string ipaddress = ethernetJ11D.NetworkSettings.IPAddress; Debug.Print("IP:" + ipaddress.ToString()); Gadgeteer.Networking.WebServer.StartLocalServer(ipaddress, 80); //foreach (string s in sender.NetworkSettings.DnsAddresses) // Debug.Print("Dns:" + s); takePicture = Gadgeteer.Networking.WebServer.SetupWebEvent("takepicture"); takePicture.WebEventReceived += new WebEvent.ReceivedWebEventHandler(takePicture_WebEventReceived); }
// Network Up void wifi_RS21_NetworkUp(GTM.Module.NetworkModule sender, GTM.Module.NetworkModule.NetworkState state) { if (NetworkTimer.IsRunning == true) { NetworkTimer.Stop(); // IP = wifi_RS21.NetworkSettings.IPAddress; Debug.Print("Network Initialized. IP: " + IP); // Enable Sockets Communications EnableSockets(); } }
private void ethernetJ11D_NetworkUp(GTM.Module.NetworkModule sender, GTM.Module.NetworkModule.NetworkState state) { //initializeNetwork(); while (ethernetJ11D.NetworkSettings.IPAddress == "0.0.0.0") { //Debug.Print("Waiting for DHCP"); waiting = true; //Thread.Sleep(25); } waiting = false; Debug.Print("network just got up!\n"); setInternet(true); }
void wifi_NetworkUp(GT.Modules.Module.NetworkModule sender, GT.Modules.Module.NetworkModule.NetworkState state) { if (state == GT.Modules.Module.NetworkModule.NetworkState.Up) { Debug.Print("Network Up event; state = Up"); Debug.Print("IP:" + wifiRS21.NetworkInterface.IPAddress); characterDisplay.Clear(); characterDisplay.Print("IP:" + wifiRS21.NetworkInterface.IPAddress); } else { Debug.Print("Network Up event; state = Down"); } }