MBED implementation of JAudioStream
JAudioStream.h
- Committer:
- ollie8
- Date:
- 2015-08-19
- Revision:
- 6:7e366261cd93
- Parent:
- 4:ebdd1cf0c9f7
- Child:
- 8:65d8e8882907
File content as of revision 6:7e366261cd93:
#ifndef JAUDIO_STREAM_H #define JAUDIO_STREAM_H #include "mbed.h" #include "EthernetInterface.h" #include "UDPSocket.h" #define MAX_PACKT 32 #define MESSAGE_SIZE 8 #define MESSAGE_COMP_SIZE 4 #define REQUEST_RESPONSE_MODE 1 class JAudioStream { private: const char* cont; const char* cond; const char* dcon; const char* dctd; const char* rqst; const char* begn; const char* comt; const char* hrbt; EthernetInterface eth; UDPSocket socket; Endpoint endPoint; char* remoteIp; short remotePort; volatile bool connected; volatile bool inTransmission; void buildMeassge(const char*, int, char*); void buildMeassge(const char*, int, char*, char*); void intTocharArr(int, char*); void send(char*, int); char* nowPlaying; public: JAudioStream(); bool connect(char *, short, char *); bool read(char*, int); bool isConnected(); char* getNowPlaying(); void request(char); void disconnect(); void receive(); }; #endif