Accepts RPC commands over bluetooth (RN42)

Dependencies:   mbed m3pi

Embed: (wiki syntax)

« Back to documentation index

RPCVariable< T > Class Template Reference

RPCVariable< T > Class Template Reference

Class to read and set an attached variable using the RPC. More...

#include <RPCVariable.h>

Public Member Functions

template<class A >
 RPCVariable (A *ptr, const char *name)
 Constructor.
read ()
 Read the variable over RPC.
void write (T value)
 Write a value to the variable over RPC.

Detailed Description

template<class T>
class RPCVariable< T >

Class to read and set an attached variable using the RPC.

Definition at line 40 of file RPCVariable.h.


Constructor & Destructor Documentation

RPCVariable ( A *  ptr,
const char *  name 
)

Constructor.

Parameters:
ptrPointer to the variable to make accessible over RPC. Any type of variable can be connected
nameThe name of that this object will be over RPC

Definition at line 50 of file RPCVariable.h.


Member Function Documentation

T read (  )

Read the variable over RPC.

Returns:
The value of the variable

Definition at line 58 of file RPCVariable.h.

void write ( value )

Write a value to the variable over RPC.

Parameters:
Thevalue to be written to the attached variable.

Definition at line 66 of file RPCVariable.h.