Library to provide a mechanism to make it easier to add RPC to custom code by using RPCFunction and RPCVariable objects. Also includes a class to receive and process RPC over serial.
Dependents: GSL_10-Pololu_A4983_STEPMOTORDRIVER Protodrive RPC_HTTP RPC_TestHack ... more
SerialRPCInterface Class Reference
Provides an Interface to mbed over RPC. More...
#include <SerialRPCInterface.h>
Public Member Functions | |
SerialRPCInterface (PinName tx, PinName rx, int baud=9600) | |
Constructor. | |
void | Disable (void) |
Disable the RPC. | |
void | Enable (void) |
Enable the RPC. |
Detailed Description
Provides an Interface to mbed over RPC.
For the chosen communication type this class sets up the necessary interrupts to receive RPC messages. Receives the messages, passes them to the rpc function and then returns the result.
Definition at line 48 of file SerialRPCInterface.h.
Constructor & Destructor Documentation
SerialRPCInterface | ( | PinName | tx, |
PinName | rx, | ||
int | baud = 9600 |
||
) |
Constructor.
Sets up RPC communication using serial communication.
- Parameters:
-
tx The transmit pin of the serial port. rx The receive pin of the serial port. baud Set the baud rate, default is 9600.
Definition at line 35 of file SerialRPCInterface.cpp.
Member Function Documentation
void Disable | ( | void | ) |
Disable the RPC.
This will stop RPC messages being recevied and interpreted by this library. This might be used to prevent RPC commands interrupting an important piece of code on mbed.
Definition at line 65 of file SerialRPCInterface.cpp.
void Enable | ( | void | ) |
Enable the RPC.
This will set this class to receiving and executing RPC commands. The class starts in this mode so this function only needs to be called if you have previosuly disabled the RPC.
Definition at line 68 of file SerialRPCInterface.cpp.
Generated on Tue Jul 12 2022 13:34:52 by 1.7.2