This is the libary for the connection with the socket. This libary allows you to send a temperature to the socket.
Revision 0:fc4b4cf5371c, committed 2015-12-25
- Comitter:
- de_geeter_alexander
- Date:
- Fri Dec 25 20:38:57 2015 +0000
- Commit message:
- With the libary you can connect to the socket
Changed in this revision
TempDashSocketConnection.cpp | Show annotated file Show diff for this revision Revisions of this file |
TempDashSocketConnection.h | Show annotated file Show diff for this revision Revisions of this file |
diff -r 000000000000 -r fc4b4cf5371c TempDashSocketConnection.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/TempDashSocketConnection.cpp Fri Dec 25 20:38:57 2015 +0000 @@ -0,0 +1,9 @@ +#include "TempDashSocketConnection.h" +#include "EthernetInterface.h" + +void TempDashSocketConnection::sendSensorData(std::string data) +{ + send(const_cast<char*>(data.c_str()), data.length()); +} + +
diff -r 000000000000 -r fc4b4cf5371c TempDashSocketConnection.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/TempDashSocketConnection.h Fri Dec 25 20:38:57 2015 +0000 @@ -0,0 +1,14 @@ +#ifndef TEMPDASHSOCKETCONNECTION_H +#define TEMPDASHSOCKETCONNECTION_H + +#include "EthernetInterface.h" +#include <string> + +class TempDashSocketConnection : public TCPSocketConnection +{ +public: + void sendSensorData(std::string); +private: +}; + +#endif \ No newline at end of file