
HTTPServer example with additional functions: * Link status indication (LED4); * Local file system (create index.htm page on MBED!); * RPC-able class (myrpc, allows remote function call that blinks LED1 N times);
myrpc.h@0:5e068c08724a, 2009-12-09 (annotated)
- Committer:
- iva2k
- Date:
- Wed Dec 09 01:55:06 2009 +0000
- Revision:
- 0:5e068c08724a
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
iva2k | 0:5e068c08724a | 1 | // myrpc.h |
iva2k | 0:5e068c08724a | 2 | // |
iva2k | 0:5e068c08724a | 3 | // Based on: |
iva2k | 0:5e068c08724a | 4 | // http://mbed.org/projects/cookbook/svn/Servo/trunk/Servo.h |
iva2k | 0:5e068c08724a | 5 | // http://mbed.org/projects/cookbook/svn/Servo/trunk/Servo.cpp |
iva2k | 0:5e068c08724a | 6 | |
iva2k | 0:5e068c08724a | 7 | #ifndef MYRPC_H |
iva2k | 0:5e068c08724a | 8 | #define MYRPC_H |
iva2k | 0:5e068c08724a | 9 | |
iva2k | 0:5e068c08724a | 10 | #include "mbed.h" |
iva2k | 0:5e068c08724a | 11 | |
iva2k | 0:5e068c08724a | 12 | namespace mbed { |
iva2k | 0:5e068c08724a | 13 | |
iva2k | 0:5e068c08724a | 14 | class myrpc : public Base { |
iva2k | 0:5e068c08724a | 15 | public: |
iva2k | 0:5e068c08724a | 16 | myrpc(PinName pin, const char* name = NULL); |
iva2k | 0:5e068c08724a | 17 | void blink(int n); |
iva2k | 0:5e068c08724a | 18 | |
iva2k | 0:5e068c08724a | 19 | #ifdef MBED_RPC |
iva2k | 0:5e068c08724a | 20 | virtual const struct rpc_method *get_rpc_methods(); |
iva2k | 0:5e068c08724a | 21 | static struct rpc_class *get_rpc_class(); |
iva2k | 0:5e068c08724a | 22 | #endif // MBED_RPC |
iva2k | 0:5e068c08724a | 23 | |
iva2k | 0:5e068c08724a | 24 | protected: |
iva2k | 0:5e068c08724a | 25 | DigitalOut _pin; |
iva2k | 0:5e068c08724a | 26 | }; |
iva2k | 0:5e068c08724a | 27 | |
iva2k | 0:5e068c08724a | 28 | } // namespace mbed |
iva2k | 0:5e068c08724a | 29 | #endif // MYRPC_H |