Форум программистов, компьютерный форум, киберфорум
Arduino
Войти
Регистрация
Восстановить пароль
Блоги Сообщество Поиск Заказать работу  
 
0 / 0 / 0
Регистрация: 06.02.2016
Сообщений: 17

Ошибка ==> no matching function for call to 'ICMPPing::ICMPPing(SOCKET&, uint16_t)'

10.02.2017, 13:17. Показов 2318. Ответов 0
Метки нет (Все метки)

Студворк — интернет-сервис помощи студентам
Пытаюсь залить скетч для пинга IP адреса в сети.

C++
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
#define BLYNK_PRINT Serial
#include <LiquidCrystal.h>
#include <SPI.h>
#include <Ethernet.h>
#include <ICMPPing.h>
#include <BlynkSimpleEthernet.h>
 
LiquidCrystal lcd(8, 3, 9, 4, 5, 6, 7); // these are the pins used on the shield for this sketch
unsigned long start, finished, elapsed;
 
//byte mac[] = {0xDE, 0xED, 0xBA, 0xFE, 0xFE, 0xED}; // max address for ethernet shield
//byte ip[] = {10, 10, 0, 75}; // ip address for ethernet shield
IPAddress pingAddr(45,55,195,102); // ip address to ping
char auth[] = "9d13cddba3d8450ca7e8badf586f4ee3";
SOCKET pingSocket = 0;
 
char buffer [256];
ICMPPing ping(pingSocket, (uint16_t)random(0, 255));
 
const unsigned long interval = 300;
const unsigned long interval1 = 200;
const unsigned long interval2 = 100;
unsigned long timer;
unsigned long timer1;
unsigned long timer2;
 
IPAddress server_ip (45,55,195,102);
// Mac address should be different for each device in your LAN
byte arduino_mac[] = { 0xDE, 0xED, 0xBA, 0xFE, 0xFE, 0xED };
IPAddress arduino_ip ( 10,   0,   0,  75);
IPAddress dns_ip     (  8,   8,   8,   8);
IPAddress gateway_ip ( 10,   10,   0,   1);
IPAddress subnet_mask(255, 255, 255,   0);
void setup() {
 
  Serial.begin(9600);
  Blynk.begin(auth);
  lcd.begin(16, 2);
  //Print default title.
  clearPrintTitle();
  delay(2000);
}
 
void loop() {
  //Call the main menu.
 
  if ( (millis () - timer) >= interval)
    Blynk.run();
    uptime();
  if ( (millis () - timer1) >= interval1)
   pingss();
 // if ( (millis () - timer2) >= interval2)
 // uptime();
}
//Print a basic header on Row 1.
void clearPrintTitle() {
  lcd.clear();
  lcd.setCursor(0, 0);
  lcd.print(" HACKSHED.CO.UK ");
  lcd.setCursor(0, 1);
  lcd.clear();
}
 
void pingss()
{
  ICMPEchoReply echoReply = ping(pingAddr, 4);
  if (echoReply.status == SUCCESS)
  {
    lcd.setCursor(0, 0);
    lcd.print("Ping: ");
    lcd.print(millis() - echoReply.data.time);
    lcd.print("ms");
    delay(1000);
  }
 
  else
  {
    lcd.setCursor(0, 0);
    lcd.print(echoReply.status);
    delay(1000);
  }
 
}
 
void uptime()
{
  finished = millis(); // saves stop time to calculate the elapsed time
  //delay(200); // for debounce
 
  //  lcd.setCursor(0,0); // NOT needed
 
  displayResult(); // display the results on the function}
}
void displayResult()
{
  // declare variables
  float h, m, s ;
  unsigned long over;
 
  // MATH time!!!
  elapsed = finished - start;
 
  h = int(elapsed / 3600000);
  over = elapsed % 3600000;
  m    = int(over / 60000);
  over = over % 60000;
  s    = int(over / 1000);
 
 
 
  // display the results
  lcd.setCursor(0, 1);
  // display variable 'h' - the 0 after it is the number of algorithms after a comma
  //(ex: lcd.print(h, 2); would print 0,00
  lcd.print("Up  : ");
  lcd.print(h, 0);
  lcd.print("h "); // and the letter 'h' after it
  lcd.print(m, 0);
  lcd.print("m ");
  lcd.print(s, 0);
  lcd.print("s ");
 
}
________________________________________ ________________________________________ __________
Выдает ошибку:

Arduino: 1.6.12 (Windows 7), Плата:"Arduino/Genuino Uno"

sketch_feb10a:18: error: no matching function for call to 'ICMPPing::ICMPPing(SOCKET&, uint16_t)'

ICMPPing ping(pingSocket, (uint16_t)random(0, 255));

^

C:\Users\1\AppData\Local\Temp\arduino_mo dified_sketch_371941\sketch_feb10a.ino:1 8:51: note: candidates are:

In file included from C:\Users\1\AppData\Local\Temp\arduino_mo dified_sketch_371941\sketch_feb10a.ino:5 :0:

C:\Program Files (x86)\Arduino\libraries\ICMPPing/ICMPPing.h:28:2: note: ICMPPing::ICMPPing(SOCKET)

ICMPPing(SOCKET s); // construct an ICMPPing object for socket s

^

C:\Program Files (x86)\Arduino\libraries\ICMPPing/ICMPPing.h:28:2: note: candidate expects 1 argument, 2 provided

C:\Program Files (x86)\Arduino\libraries\ICMPPing/ICMPPing.h:25:7: note: constexpr ICMPPing::ICMPPing(const ICMPPing&)

class ICMPPing

^

C:\Program Files (x86)\Arduino\libraries\ICMPPing/ICMPPing.h:25:7: note: candidate expects 1 argument, 2 provided

C:\Program Files (x86)\Arduino\libraries\ICMPPing/ICMPPing.h:25:7: note: constexpr ICMPPing::ICMPPing(ICMPPing&&)

C:\Program Files (x86)\Arduino\libraries\ICMPPing/ICMPPing.h:25:7: note: candidate expects 1 argument, 2 provided

C:\Users\1\AppData\Local\Temp\arduino_mo dified_sketch_371941\sketch_feb10a.ino: In function 'void pingss()':

sketch_feb10a:66: error: 'ICMPEchoReply' was not declared in this scope

ICMPEchoReply echoReply = ping(pingAddr, 4);

^

sketch_feb10a:67: error: 'echoReply' was not declared in this scope

if (echoReply.status == SUCCESS)

^

sketch_feb10a:67: error: 'SUCCESS' was not declared in this scope

if (echoReply.status == SUCCESS)

^

Несколько библиотек найдено для "Ethernet.h"
Используется: C:\Users\1\Documents\Arduino\libraries\E thernet
Не используется: C:\Program Files (x86)\Arduino\libraries\Ethernet
Несколько библиотек найдено для "ICMPPing.h"
Используется: C:\Program Files (x86)\Arduino\libraries\ICMPPing
Не используется: C:\Program Files (x86)\Arduino\libraries\icmp_ping
exit status 1
no matching function for call to 'ICMPPing::ICMPPing(SOCKET&, uint16_t)'

Этот отчёт будет иметь больше информации с
включенной опцией Файл -> Настройки ->
"Показать подробный вывод во время компиляции"

________________________________________ ________________________________________ _______
Помогите разобраться в чем проблема?????
0
cpp_developer
Эксперт
20123 / 5690 / 1417
Регистрация: 09.04.2010
Сообщений: 22,546
Блог
10.02.2017, 13:17
Ответы с готовыми решениями:

Ошибка: no matching function for call to 'QTreeWidgetItem::setData(int, QDate&)'
из за чего может быть такая ошибка C:\Qt\Qt5.2.1\Tools\QtCreator\bin\Tree_2\mainwindow.cpp:167: ошибка: no matching function for call...

Ошибка: no matching function for call to 'QFile::write(double&, double&)' в коде программы
Написал код приведенный ниже. В нем вроде как все норм, но при компиляции выдает ошибку: no matching function for call to...

ОШИБКА no matching function for call to 'std::basic_ostream<char>::getline(std::string&, int)'
#include &lt;stdio.h&gt; #include &lt;iostream&gt; #include &lt;conio.h&gt; #include &lt;string.h&gt; #include &lt;algorithm&gt; #include &lt;fstream&gt; using...

0
Надоела реклама? Зарегистрируйтесь и она исчезнет полностью.
raxper
Эксперт
30234 / 6612 / 1498
Регистрация: 28.12.2010
Сообщений: 21,154
Блог
10.02.2017, 13:17
Помогаю со студенческими работами здесь

no matching function for call to 'QListView::setModel(QStringList&)'
в чем проблема не пойму, вот код QStringList list; list = getMusicList(); ui-&gt;listView-&gt;setModel(list); ошибка

Error: no matching function for call to 'tan(float&, int)'
#include &lt;iostream&gt; #include &lt;cmath&gt; using namespace std; int main() { float x,A,Z,B,Betta, *a; int n,...

Ошибка: no matching function for call
Добрый вечер! Только начинаю изучать с++, задали написать программу-пример, которая показывает что наследуемый класс имеет доступ с...

Ошибка: no matching function for call to
Здравствуйте. Вот такая ошибка: /usr/include/c++/4.8/bits/stl_algo.h:2235:62: required from ‘void...

Ошибка no matching function for call
Здравствуйте, не могу понять почему выдает ошибку. текст ошибки : no matching function for call to...


Искать еще темы с ответами

Или воспользуйтесь поиском по форуму:
1
Ответ Создать тему
Новые блоги и статьи
Новый ноутбук
volvo 07.12.2025
Всем привет. По скидке в "черную пятницу" взял себе новый ноутбук Lenovo ThinkBook 16 G7 на Амазоне: Ryzen 5 7533HS 64 Gb DDR5 1Tb NVMe 16" Full HD Display Win11 Pro
Музыка, написанная Искусственным Интеллектом
volvo 04.12.2025
Всем привет. Некоторое время назад меня заинтересовало, что уже умеет ИИ в плане написания музыки для песен, и, собственно, исполнения этих самых песен. Стихов у нас много, уже вышли 4 книги, еще 3. . .
От async/await к виртуальным потокам в Python
IndentationError 23.11.2025
Армин Ронахер поставил под сомнение async/ await. Создатель Flask заявляет: цветные функции - провал, виртуальные потоки - решение. Не threading-динозавры, а новое поколение лёгких потоков. Откат?. . .
Поиск "дружественных имён" СОМ портов
Argus19 22.11.2025
Поиск "дружественных имён" СОМ портов На странице: https:/ / norseev. ru/ 2018/ 01/ 04/ comportlist_windows/ нашёл схожую тему. Там приведён код на С++, который показывает только имена СОМ портов, типа,. . .
Сколько Государство потратило денег на меня, обеспечивая инсулином.
Programma_Boinc 20.11.2025
Сколько Государство потратило денег на меня, обеспечивая инсулином. Вот решила сделать интересный приблизительный подсчет, сколько государство потратило на меня денег на покупку инсулинов. . . .
Ломающие изменения в C#.NStar Alpha
Etyuhibosecyu 20.11.2025
Уже можно не только тестировать, но и пользоваться C#. NStar - писать оконные приложения, содержащие надписи, кнопки, текстовые поля и даже изображения, например, моя игра "Три в ряд" написана на этом. . .
Мысли в слух
kumehtar 18.11.2025
Кстати, совсем недавно имел разговор на тему медитаций с людьми. И обнаружил, что они вообще не понимают что такое медитация и зачем она нужна. Самые базовые вещи. Для них это - когда просто люди. . .
Создание Single Page Application на фреймах
krapotkin 16.11.2025
Статья исключительно для начинающих. Подходы оригинальностью не блещут. В век Веб все очень привыкли к дизайну Single-Page-Application . Быстренько разберем подход "на фреймах". Мы делаем одну. . .
Фото: Daniel Greenwood
kumehtar 13.11.2025
Расскажи мне о Мире, бродяга
kumehtar 12.11.2025
— Расскажи мне о Мире, бродяга, Ты же видел моря и метели. Как сменялись короны и стяги, Как эпохи стрелою летели. - Этот мир — это крылья и горы, Снег и пламя, любовь и тревоги, И бескрайние. . .
КиберФорум - форум программистов, компьютерный форум, программирование
Powered by vBulletin
Copyright ©2000 - 2025, CyberForum.ru