mbed RPC

Dependents:   RPC_Serial_OVFZ RPCHTTPServer SerialRPC_rtos_example RPC_HTTP ... more

Fork of mbed-rpc by mbed official

Embed: (wiki syntax)

« Back to documentation index

RPCFunction Class Reference

RPCFunction Class Reference

Class to call custom functions over RPC. More...

#include <RPCFunction.h>

Inherits mbed::RPC.

Public Member Functions

 RPCFunction (void(*f)(Arguments *, Reply *), const char *=NULL)
 Constructor.
void run (Arguments *args, Reply *r)
 run

Detailed Description

Class to call custom functions over RPC.

Definition at line 29 of file RPCFunction.h.


Constructor & Destructor Documentation

RPCFunction ( void(*)(Arguments *, Reply *)  f,
const char *  name = NULL 
)

Constructor.

Parameters:
fPointer to the function to call. the function must be of the form void foo(char * input, char * output)
nameThe name of this object

Definition at line 25 of file RPCFunction.cpp.


Member Function Documentation

void run ( Arguments *  args,
Reply *  r 
)

run

Calls the attached function passing the string in but doesn't return the result.

Parameters:
strThe string to be passed into the attached function. This string can consist of any ASCII characters apart from escape codes. The usual limtations on argument content for RPC strings has been removed
Returns:
A string output from the function

Definition at line 30 of file RPCFunction.cpp.