Sensor with Web Server
Dependencies: EthernetInterface mbed-rpc mbed-rtos mbed
RPCCommand.h@0:c385e589a779, 2014-04-08 (annotated)
- Committer:
- afilipem
- Date:
- Tue Apr 08 12:13:32 2014 +0000
- Revision:
- 0:c385e589a779
1 version;
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
afilipem | 0:c385e589a779 | 1 | #ifndef RPCCOMMAND |
afilipem | 0:c385e589a779 | 2 | #define RPCCOMMAND |
afilipem | 0:c385e589a779 | 3 | |
afilipem | 0:c385e589a779 | 4 | #include <list> |
afilipem | 0:c385e589a779 | 5 | #include "mbed_rpc.h" |
afilipem | 0:c385e589a779 | 6 | |
afilipem | 0:c385e589a779 | 7 | enum RPC_COMMAND_TYPE { INVALID, CREATE, DELETE, FUNCTION_CALL }; |
afilipem | 0:c385e589a779 | 8 | |
afilipem | 0:c385e589a779 | 9 | struct rpc_arg |
afilipem | 0:c385e589a779 | 10 | { |
afilipem | 0:c385e589a779 | 11 | char *name; |
afilipem | 0:c385e589a779 | 12 | char *val; |
afilipem | 0:c385e589a779 | 13 | }; |
afilipem | 0:c385e589a779 | 14 | |
afilipem | 0:c385e589a779 | 15 | class RPCCommand |
afilipem | 0:c385e589a779 | 16 | { |
afilipem | 0:c385e589a779 | 17 | public : |
afilipem | 0:c385e589a779 | 18 | |
afilipem | 0:c385e589a779 | 19 | RPCCommand(); |
afilipem | 0:c385e589a779 | 20 | |
afilipem | 0:c385e589a779 | 21 | bool decode(char *buffer); |
afilipem | 0:c385e589a779 | 22 | |
afilipem | 0:c385e589a779 | 23 | char* get_cmd() const; |
afilipem | 0:c385e589a779 | 24 | RPC_COMMAND_TYPE get_type() const; |
afilipem | 0:c385e589a779 | 25 | char* get_obj_name() const; |
afilipem | 0:c385e589a779 | 26 | char* get_func_name() const; |
afilipem | 0:c385e589a779 | 27 | |
afilipem | 0:c385e589a779 | 28 | private : |
afilipem | 0:c385e589a779 | 29 | |
afilipem | 0:c385e589a779 | 30 | char cmd[RPC_MAX_STRING]; |
afilipem | 0:c385e589a779 | 31 | char* obj_name; |
afilipem | 0:c385e589a779 | 32 | char* func_name; |
afilipem | 0:c385e589a779 | 33 | }; |
afilipem | 0:c385e589a779 | 34 | |
afilipem | 0:c385e589a779 | 35 | #endif |
afilipem | 0:c385e589a779 | 36 |