Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
mbed-os/tools/data/rpc/class.cpp@0:9fca2b23d0ba, 2019-02-23 (annotated)
- Committer:
- marcozecchini
- Date:
- Sat Feb 23 12:13:36 2019 +0000
- Revision:
- 0:9fca2b23d0ba
final commit
Who changed what in which revision?
| User | Revision | Line number | New contents of line | 
|---|---|---|---|
| marcozecchini | 0:9fca2b23d0ba | 1 | class Rpc{{name}} : public RPC { | 
| marcozecchini | 0:9fca2b23d0ba | 2 | public: | 
| marcozecchini | 0:9fca2b23d0ba | 3 | Rpc{{name}}({{cons_proto}}) : RPC(name), o({{cons_call}}) {} | 
| marcozecchini | 0:9fca2b23d0ba | 4 | |
| marcozecchini | 0:9fca2b23d0ba | 5 | {{methods}} | 
| marcozecchini | 0:9fca2b23d0ba | 6 | |
| marcozecchini | 0:9fca2b23d0ba | 7 | virtual const struct rpc_method *get_rpc_methods() { | 
| marcozecchini | 0:9fca2b23d0ba | 8 | static const rpc_method rpc_methods[] = { | 
| marcozecchini | 0:9fca2b23d0ba | 9 | {{rpc_methods}}, | 
| marcozecchini | 0:9fca2b23d0ba | 10 | RPC_METHOD_SUPER(RPC) | 
| marcozecchini | 0:9fca2b23d0ba | 11 | }; | 
| marcozecchini | 0:9fca2b23d0ba | 12 | return rpc_methods; | 
| marcozecchini | 0:9fca2b23d0ba | 13 | } | 
| marcozecchini | 0:9fca2b23d0ba | 14 | static struct rpc_class *get_rpc_class() { | 
| marcozecchini | 0:9fca2b23d0ba | 15 | static const rpc_function funcs[] = { | 
| marcozecchini | 0:9fca2b23d0ba | 16 | {"new", rpc_function_caller<const char*, {{cons_type}}, &RPC::construct<Rpc{{name}}, {{cons_type}}> >}, | 
| marcozecchini | 0:9fca2b23d0ba | 17 | RPC_METHOD_END | 
| marcozecchini | 0:9fca2b23d0ba | 18 | }; | 
| marcozecchini | 0:9fca2b23d0ba | 19 | static rpc_class c = {"{{name}}", funcs, NULL}; | 
| marcozecchini | 0:9fca2b23d0ba | 20 | return &c; | 
| marcozecchini | 0:9fca2b23d0ba | 21 | } | 
| marcozecchini | 0:9fca2b23d0ba | 22 | private: | 
| marcozecchini | 0:9fca2b23d0ba | 23 | {{name}} o; | 
| marcozecchini | 0:9fca2b23d0ba | 24 | }; |