A simple implementation of DDP (version 1) for Arduinos.
Primarily created for use in my thesis project for CEIT at The University of Queensland. At the moment it's specific to my project though that will change.
DDP ddp = DDP();
void setup() {
if (ddp.setup("192.168.0.1", 3000)) {
if (ddp.connect()) {
}
}
}
void loop() {
ddp.sub();
ddp.listen();
}
Being used in my thesis project
bool setup(String host, String path ="/", int port = 80)
Partialyl implemented. host
params not currently used.
bool connect()
Im
void listen()
After a connection has successfully been made, listen()
checks for any data on the line and if any is found, what type of message it was. It then calls the appropriate function.
void ping(String id = "")
Partially implemented—doesn't yet response with ID if one was included.
void pong(String id = "")
Partially implemented—doesn't yet response with ID if one was included.
void sub()
Partiually implemented
void unsub()
Not yet implemeneted
void nosub()
Not yet implemeneted
void added()
Partially implemented.
void changed()
Partially implemented.
void removed()
Not yet implemeneted
void ready()
Partially implemented.
void addedBefore()
Not yet implemeneted
void movedBefore()
Not yet implemeneted
void method()
Partially implemented.
void result()
Partially implemented.
void updated()
Partially implemented.
At the moment these work by using absolute paths for them which is not ideal.
n/a
Tested on:
- Arduino Mega 2560
- Add tests
Contributions are welcome!