-
Notifications
You must be signed in to change notification settings - Fork 577
Closed
Description
I'm trying to implement a wired ethernet connection using nodemcu and ENC28J60.
I tried the example WebSocketClientAVR.ino with no success then I noticed i could change the connection method by
#define WEBSOCKETS_NETWORK_TYPE NETWORK_ENC28J60
but it runs into a compilation error
In file included from /Users/andreferraz/Dropbox/projetos/Arduino/libraries/WebSockets/src/WebSocketsClient.h:28:0,
from /var/folders/3n/7q9hvh8x79x5c1vtwj1w4b5h0000gn/T/arduino_modified_sketch_303209/WebSocketClientAVR.ino:14:
/Users/andreferraz/Dropbox/projetos/Arduino/libraries/WebSockets/src/WebSockets.h:224:17: error: 'function' in namespace 'std' does not name a type
typedef std::function<void(WSclient_t * client, bool ok)> WSreadWaitCb;
^
In file included from /Users/andreferraz/Dropbox/projetos/Arduino/libraries/WebSockets/src/WebSocketsClient.h:28:0,
from /var/folders/3n/7q9hvh8x79x5c1vtwj1w4b5h0000gn/T/arduino_modified_sketch_303209/WebSocketClientAVR.ino:14:
/Users/andreferraz/Dropbox/projetos/Arduino/libraries/WebSockets/src/WebSockets.h:246:66: error: 'WSreadWaitCb' has not been declared
bool readCb(WSclient_t * client, uint8_t *out, size_t n, WSreadWaitCb cb);
^
In file included from /var/folders/3n/7q9hvh8x79x5c1vtwj1w4b5h0000gn/T/arduino_modified_sketch_303209/WebSocketClientAVR.ino:14:0:
/Users/andreferraz/Dropbox/projetos/Arduino/libraries/WebSockets/src/WebSocketsClient.h:35:17: error: 'function' in namespace 'std' does not name a type
typedef std::function<void (WStype_t type, uint8_t * payload, size_t length)> WebSocketClientEvent;
^
In file included from /var/folders/3n/7q9hvh8x79x5c1vtwj1w4b5h0000gn/T/arduino_modified_sketch_303209/WebSocketClientAVR.ino:14:0:
/Users/andreferraz/Dropbox/projetos/Arduino/libraries/WebSockets/src/WebSocketsClient.h:60:22: error: 'WebSocketClientEvent' has not been declared
void onEvent(WebSocketClientEvent cbEvent);
^
/Users/andreferraz/Dropbox/projetos/Arduino/libraries/WebSockets/src/WebSocketsClient.h:88:9: error: 'WebSocketClientEvent' does not name a type
WebSocketClientEvent _cbEvent;
^
/Users/andreferraz/Dropbox/projetos/Arduino/libraries/WebSockets/src/WebSocketsClient.h: In member function 'virtual void WebSocketsClient::runCbEvent(WStype_t, uint8_t*, size_t)':
/Users/andreferraz/Dropbox/projetos/Arduino/libraries/WebSockets/src/WebSocketsClient.h:116:16: error: '_cbEvent' was not declared in this scope
if(_cbEvent) {
^
/var/folders/3n/7q9hvh8x79x5c1vtwj1w4b5h0000gn/T/arduino_modified_sketch_303209/WebSocketClientAVR.ino: In function 'void webSocketEvent(WStype_t, uint8_t*, size_t)':
/var/folders/3n/7q9hvh8x79x5c1vtwj1w4b5h0000gn/T/arduino_modified_sketch_303209/WebSocketClientAVR.ino:32:11: warning: enumeration value 'WStype_ERROR' not handled in switch [-Wswitch]
switch(type) {
^
/var/folders/3n/7q9hvh8x79x5c1vtwj1w4b5h0000gn/T/arduino_modified_sketch_303209/WebSocketClientAVR.ino: In function 'void setup()':
WebSocketClientAVR:88: error: invalid conversion from 'void (*)(WStype_t, uint8_t*, size_t) {aka void (*)(WStype_t, unsigned char*, unsigned int)}' to 'int' [-fpermissive]
webSocket.onEvent(webSocketEvent);
^
In file included from /var/folders/3n/7q9hvh8x79x5c1vtwj1w4b5h0000gn/T/arduino_modified_sketch_303209/WebSocketClientAVR.ino:14:0:
/Users/andreferraz/Dropbox/projetos/Arduino/libraries/WebSockets/src/WebSocketsClient.h:60:14: error: initializing argument 1 of 'void WebSocketsClient::onEvent(int)' [-fpermissive]
void onEvent(WebSocketClientEvent cbEvent);
Does anybody know what could be done?
Metadata
Metadata
Assignees
Labels
No labels