Program the control the fischertechnik robo interface or intelligent interface via tcp socket or via a java gui.

Dependencies:   mbed ConfigFile

Committer:
networker
Date:
Fri Dec 31 14:01:14 2010 +0000
Revision:
0:7f26f0680202
initial release: comprises ftlib (no usb), ft-over-ip socket server, and the http server (the html page and java jar I still have to publish somewhere)

Who changed what in which revision?

UserRevisionLine numberNew contents of line
networker 0:7f26f0680202 1
networker 0:7f26f0680202 2 /*
networker 0:7f26f0680202 3 Copyright (c) 2010 Donatien Garnier (donatiengar [at] gmail [dot] com)
networker 0:7f26f0680202 4
networker 0:7f26f0680202 5 Permission is hereby granted, free of charge, to any person obtaining a copy
networker 0:7f26f0680202 6 of this software and associated documentation files (the "Software"), to deal
networker 0:7f26f0680202 7 in the Software without restriction, including without limitation the rights
networker 0:7f26f0680202 8 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
networker 0:7f26f0680202 9 copies of the Software, and to permit persons to whom the Software is
networker 0:7f26f0680202 10 furnished to do so, subject to the following conditions:
networker 0:7f26f0680202 11
networker 0:7f26f0680202 12 The above copyright notice and this permission notice shall be included in
networker 0:7f26f0680202 13 all copies or substantial portions of the Software.
networker 0:7f26f0680202 14
networker 0:7f26f0680202 15 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
networker 0:7f26f0680202 16 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
networker 0:7f26f0680202 17 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
networker 0:7f26f0680202 18 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
networker 0:7f26f0680202 19 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
networker 0:7f26f0680202 20 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
networker 0:7f26f0680202 21 THE SOFTWARE.
networker 0:7f26f0680202 22 */
networker 0:7f26f0680202 23
networker 0:7f26f0680202 24 #ifndef RPC_HANDLER_H
networker 0:7f26f0680202 25 #define RPC_HANDLER_H
networker 0:7f26f0680202 26
networker 0:7f26f0680202 27 #include "../HTTPRequestHandler.h"
networker 0:7f26f0680202 28
networker 0:7f26f0680202 29 class RPCHandler : public HTTPRequestHandler
networker 0:7f26f0680202 30 {
networker 0:7f26f0680202 31 public:
networker 0:7f26f0680202 32 RPCHandler(const char* rootPath, const char* path, TCPSocket* pTCPSocket);
networker 0:7f26f0680202 33 virtual ~RPCHandler();
networker 0:7f26f0680202 34
networker 0:7f26f0680202 35 //protected:
networker 0:7f26f0680202 36 static inline HTTPRequestHandler* inst(const char* rootPath, const char* path, TCPSocket* pTCPSocket) { return new RPCHandler(rootPath, path, pTCPSocket); } //if we ever could do static virtual functions, this would be one
networker 0:7f26f0680202 37
networker 0:7f26f0680202 38 virtual void doGet();
networker 0:7f26f0680202 39 virtual void doPost();
networker 0:7f26f0680202 40 virtual void doHead();
networker 0:7f26f0680202 41
networker 0:7f26f0680202 42 virtual void onReadable(); //Data has been read
networker 0:7f26f0680202 43 virtual void onWriteable(); //Data has been written & buf is free
networker 0:7f26f0680202 44 virtual void onClose(); //Connection is closing
networker 0:7f26f0680202 45
networker 0:7f26f0680202 46 protected:
networker 0:7f26f0680202 47 void cleanReq(char* data);
networker 0:7f26f0680202 48 };
networker 0:7f26f0680202 49
networker 0:7f26f0680202 50 #endif