MBED implementation of JAudioStream
Diff: JAudioStream.h
- Revision:
- 1:b49a6e72f353
- Parent:
- 0:6f03883f9b43
- Child:
- 2:22ee01f24346
--- a/JAudioStream.h Wed Aug 12 13:19:20 2015 +0000 +++ b/JAudioStream.h Thu Aug 13 13:32:51 2015 +0000 @@ -1,8 +1,7 @@ #ifndef JAUDIO_STREAM_H #define JAUDIO_STREAM_H - #include "mbed.h" -#include "EthernetNetIf.h" +#include "EthernetInterface.h" #include "UDPSocket.h" #define MAX_PACKT 24 @@ -11,21 +10,28 @@ #define REQUEST_RESPONSE_MODE 1 #define PORT 7777 +const char* cont = "cont"; +const char* cond = "cond"; +const char* dcon = "dcon"; +const char* rqst = "rqst"; +const char* begn = "begn"; +const char* comt = "comt"; + class JAudioStream { private: // use DHCP - EthernetNetIf eth; + EthernetInterface eth; UDPSocket udp; + Endpoint endPoint; char* remoteIp; short remotePort; volatile bool connected; volatile bool inTransmission; - void buildMeassge(const char*, char, char*); - void buildMeassge(const char*, char, char*, char*); - void intTocharArr(char, char*); + void buildMeassge(const char*, int, char*); + void buildMeassge(const char*, int, char*, char*); + void intTocharArr(int, char*); void send(char*, short); char* nowPlaying; - void onUDPSocketEvent(UDPSocketEvent e); public: JAudioStream(); void begin(char *, char *, short);