Control of mbed using OSC. Based on code from the Make Controller. Right now you can turn the onboard LEDs on/off and toggle 8 digital out pins. More I/O will be done in the future.

Dependencies:   mbed

Committer:
pehrhovey
Date:
Wed Mar 17 03:17:38 2010 +0000
Revision:
0:439354122597

        

Who changed what in which revision?

UserRevisionLine numberNew contents of line
pehrhovey 0:439354122597 1 #ifndef TCPITEM_H
pehrhovey 0:439354122597 2 #define TCPITEM_H
pehrhovey 0:439354122597 3
pehrhovey 0:439354122597 4 #include "arch/cc.h"
pehrhovey 0:439354122597 5 #include "lwip/err.h"
pehrhovey 0:439354122597 6 #include "lwip/tcp.h"
pehrhovey 0:439354122597 7
pehrhovey 0:439354122597 8 namespace mbed {
pehrhovey 0:439354122597 9 class NetServer;
pehrhovey 0:439354122597 10
pehrhovey 0:439354122597 11 /**
pehrhovey 0:439354122597 12 * A simple object which provides the base for all TCP enabled objects.
pehrhovey 0:439354122597 13 * Do not ues it directly unless you know what you doing.
pehrhovey 0:439354122597 14 * Normaly what you want to use is TCPListener or TCPConnector.
pehrhovey 0:439354122597 15 */
pehrhovey 0:439354122597 16 class TCPItem {
pehrhovey 0:439354122597 17 public:
pehrhovey 0:439354122597 18 TCPItem() : _pcb(NULL) {}
pehrhovey 0:439354122597 19 TCPItem(struct tcp_pcb *pcb) : _pcb(pcb) {}
pehrhovey 0:439354122597 20 virtual ~TCPItem() {}
pehrhovey 0:439354122597 21
pehrhovey 0:439354122597 22 void abort() const;
pehrhovey 0:439354122597 23 void release_callbacks() const;
pehrhovey 0:439354122597 24 err_t close();
pehrhovey 0:439354122597 25 void open();
pehrhovey 0:439354122597 26 protected:
pehrhovey 0:439354122597 27 struct tcp_pcb *_pcb;
pehrhovey 0:439354122597 28 };
pehrhovey 0:439354122597 29
pehrhovey 0:439354122597 30 };
pehrhovey 0:439354122597 31
pehrhovey 0:439354122597 32 #endif /* TCPITEM_H */