Passing class members functions as callbacks of setMultiPathStreamCallback #377
-
Hello error: no matching function for call to 'FB_RTDB::setMultiPathStreamCallback(FirebaseData*, void (MyClass::)(MultiPathStream), void (MyClass::)(bool))' I tried: But I got the same error Any help please Regards |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
You can declare your callback function as static inside your class. Using your class member function without object as a callback function is not allowed in C++. You can create the ESP8266 schedule task that executes these 3 functions i.e. Firebase-ESP8266/examples/DataChangesListener/NoCallback/NoCallback.ino Lines 165 to 176 in e2c2989 And call to your callback function for the result. This is the same way as the library works for callback. |
Beta Was this translation helpful? Give feedback.
You can declare your callback function as static inside your class. Using your class member function without object as a callback function is not allowed in C++.
You can create the ESP8266 schedule task that executes these 3 functions i.e.
Firebase.readStream
,stream.streamTimeout()
andstream.streamAvailable()
repeatedly in your class.Firebase-ESP8266/examples/DataChangesListener/NoCallback/NoCallback.ino
Lines 165 to 176 in e2c2989