Server that executes RPC commands through HTTP.

Dependencies:   EthernetInterface mbed-rpc mbed-rtos mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers RPCCommand.h Source File

RPCCommand.h

00001 #ifndef RPCCOMMAND
00002 #define RPCCOMMAND
00003 
00004 #include <list>
00005 #include "mbed_rpc.h"
00006 
00007 enum RPC_COMMAND_TYPE { INVALID, CREATE, DELETE, FUNCTION_CALL };
00008 
00009 struct rpc_arg
00010 {
00011     char *name;
00012     char *val;
00013 };
00014 
00015 class RPCCommand
00016 {
00017     public :
00018     
00019         RPCCommand();
00020 
00021         bool decode(char *buffer);
00022 
00023         char* get_cmd() const;
00024         RPC_COMMAND_TYPE get_type() const;
00025         char* get_obj_name() const;
00026         char* get_func_name() const;
00027 
00028     private :
00029         
00030         char cmd[RPC_MAX_STRING];
00031         char* obj_name;
00032         char* func_name;
00033 };
00034 
00035 #endif
00036