本文整理汇总了C++中NetworkManager::isConnected方法的典型用法代码示例。如果您正苦于以下问题:C++ NetworkManager::isConnected方法的具体用法?C++ NetworkManager::isConnected怎么用?C++ NetworkManager::isConnected使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类NetworkManager
的用法示例。
在下文中一共展示了NetworkManager::isConnected方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: loop
void loop() {
getSensorData();
screenPrinting();
if(networkManager.isConnected())
{
unsigned long currentMillis = millis();
if(currentMillis > prievous + updateFeedInterval) {
networkManager.updateFeed(temperature, 0, pressure, lightLevel);
prievous = currentMillis;
}
}
delay(500);
}
示例2: initialisationNetwork
void LoginState::initialisationNetwork()
{
NetworkManager * networkManager = NetworkManager::getInstance();
if (!networkManager->isConnected())
{
int messageErreur = networkManager->connexionToHost("85.25.251.97",60000);
if( messageErreur == 1)
{
XsiliumFramework::getInstance()->getLog()->logMessage("erreur de connexion : Le serveur est plein desoler ");
auth->setEvent("0","Le serveur est plein desoler");
}
if( messageErreur == 2)
{
XsiliumFramework::getInstance()->getLog()->logMessage("erreur de connexion : Impossible de se connecter au serveur");
auth->setEvent("0","Impossible de se connecter au serveur");
}
}
}
示例3: screenPrinting
void screenPrinting()
{
lcd.clear();
if(screenPage < screenPages - 1)
if(digitalRead(rightButtonPin)==LOW)
screenPage++;
if(screenPage > 0)
if(digitalRead(leftButtonPin)==LOW)
screenPage--;
switch(screenPage)
{
case 0:
overviewPage();
break;
case 1:
lcd.print("Status Wi-Fi:");
lcd.setCursor(0, 1);
if(!networkManager.isConnected()) {
if(digitalRead(selectButtonPin) == LOW) {
lcd.print("Laczenie...");
lcd.print(networkManager.wifiConnect("Livebox-C28B", "lubieplacki11"));
delay(10000);
}
else
lcd.print("Brak polaczenia.");
}
else
lcd.print("Polaczono z siecia!");
break;
case 2:
altitudeSet();
break;
}
}