BlakeFoster / Arduino-Ping

ICMP ping library for the Arduino
58 stars 44 forks source link

Error with member function and error with class W5100Class #21

Closed RichardRems closed 1 year ago

RichardRems commented 1 year ago

i tryed our code example to test first

include

include

include

byte mac[] = {0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED}; // max address for ethernet shield byte ip[] = {192,168,180,177}; // ip address for ethernet shield IPAddress pingAddr(74,125,180,130); // ip address to ping

SOCKET pingSocket = 0;

char buffer [256]; ICMPPing ping(pingSocket, (uint16_t)random(0, 255));

void setup() { // start Ethernet Ethernet.begin(mac, ip); Serial.begin(9600); }

void loop() { ICMPEchoReply echoReply = ping(pingAddr, 4); if (echoReply.status == SUCCESS) { sprintf(buffer, "Reply[%d] from: %d.%d.%d.%d: bytes=%d time=%ldms TTL=%d", echoReply.data.seq, echoReply.addr[0], echoReply.addr[1], echoReply.addr[2], echoReply.addr[3], REQ_DATASIZE, millis() - echoReply.data.time, echoReply.ttl); } else { sprintf(buffer, "Echo request failed; %d", echoReply.status); } Serial.println(buffer); delay(500); }----------------------------------------------------------------------------------------------------------------------------------------- but i got this when i try to compiled

\ICMPPing.cpp: In member function 'Status ICMPPing::sendEchoRequest(const IPAddress&, const ICMPEcho&)': ICMPPing.cpp:184:11: error: 'class W5100Class' has no member named 'send_data_processing' W5100.send_data_processing(_socket, serialized, sizeof(ICMPEcho)); ICMPPing.cpp: In member function 'void ICMPPing::receiveEchoReply(const ICMPEcho&, const IPAddress&, ICMPEchoReply&)': ICMPPing.cpp:207:19: error: 'class W5100Class' has no member named 'getRXReceivedSize' if (W5100.getRXReceivedSize(_socket) < 1) ICMPPing.cpp:219:9: error: 'class W5100Class' has no member named 'read_data' W5100.read_data(_socket, (uint16_t) buffer, ipHeader, sizeof(ipHeader)); \ICMPPing.cpp:229:9: error: 'class W5100Class' has no member named 'read_data' W5100.read_data(_socket, (uint16_t) buffer, serialized, dataLen);