Search Code
About RPCInterface

First published 16 Sep 2010, with 10 revisions since.
Last update: 28 Jan 2012.
View history

Last change message: Updated to not register AnalogOut class if the LPC11U24 as it doesn\'t have AnalogOut

Related to
HTTPServer
Test HTTP Server, including RPCFunction
tag rpc, RPCFunction


MMEx_Challenge
MMEx with SPI Slave to allow legacy devices to communicate with modern media such as USB, SD cards, the internet and all of the mbed\'s other interfaces
tag HP41 calculators, network, SD Card, SPI Slave, USB


lcdtest
Web radiation monitoring system.
tag geiger, Radiation, Web

testRPCFunction
test for RPC Function connect Eathernet and type URL following: http://mbedIP/rpc/led2/write 1 http://mbedIP/rpc/LedWink/run


RPC_HTTP_garage
The program uses RPC over http to open a garage door over the internet. On a htm page is a link that calls a RPC function
tag electricity meter, garage door, rpc

TestRPC
This program demonstrates a problem with the RPC library, if the last custom function is changed from requiring \"LED4_Off_LONG_NAME\" to be typed to just \"LED4_Off_LONG\" then the mbed will respond ...

WW_wifiTank
sample program for Wi-Fi TANK.
tag TANK, Wi-Fi

WW_wifiTank_IR_Normal_SD
LAN(Wi-Fi) air controller through the Internet. Also you can use TANK. See:http://wizard.nestegg.jp/lanir.html
tag AIR, Board, conditioner, infrared, IR, light 38KHz, TANK, White, Wi-Fi, Wizard

lightcontrollegacy
Hackers Delight Weekender light display
tag Hackers_Delight

WeatherRx
Web Server and send X10 RF orders to X10 RF transceivers Switch On/Off Appliance No weather Rx at the moment...
tag web server, X10

MCBBThermostat
Web enabled thermostat demo using the Mission Cognition baseboard.
tag thermostat

GSL_09-HttpServer-RPC-Funcs_Servos
Code to demonstrate how to map 2 RPC functions to command 2 servo motors via REST HTTP Get request. Pretty useful to control a webcam PAN and TILT position when ...
tag camera, geeksessionlab, get, http, motor, pan, position, rest, rpc, Servo, tilt, webinterface

GSL_08-HttpServer-RPC-Funcs
Simple code to demonstrate how to map an RPC global function that receives 3 parameters via REST HTTP Get request. Note: Demo program to be used on the GeekSessionLab Talk ...
tag functions, geeksessionlab, get, http, rest, rpc, webserver

GSL_07-HttpServer-RPC-Vars
Simple code to demonstrate how to map an RPC global variable that controls LED blink functionality via REST HTTP Get request. Note: Demo program to be used on the GeekSessionLab ...
tag geeksessionlab, get, http, rest, rpc, vars, webserver

GSL_06-HttpServer-RPC-Hardware
Simple code to demonstrate how to manually use RPC functionality to easily access the microcontroller hardware via WebInterface. Note: Demo program to be used on the GeekSessionLab Talk (November 2011). ...
tag geeksessionlab, hardware, http, led, rest, rpc, webinterface


RPCInterface
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 ...
tag rpc

GSL_10-Pololu_A4983_STEPMOTORDRIVER
Generic Step Motor WebInterface - control a step motor using a Pololu A4983 driver from a webinterface (EXPERIMENTAL PROTOTYPE - just to be used as a proof-of-concept for a IoT ...
tag a4983, driver, motor, pololu, Step, webinterface

Protodrive

BreakoutBoardDemo
Demo Application for the Celeritous Breakout Board
tag application, Board, breakout, Celeritous, demo

Import this library into a program

RPCInterface

Published 28 Jan 2012, by   user Michael Walker   tag rpc
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.

LICENSE

Copyright (c) 2010 ARM Ltd.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Description

This class provides an object to which a variable can be attached. Any type for which a parse_args function specilisation exists can be attached. This includes all of the standard types.

Definition at line 40 of file RPCVariable.h.


Constructor & Destructor Documentation

RPCVariable ( A *  ptr,
const char *  name 
)

Constructor.

Parameters:
ptr Pointer to the variable to make accessible over RPC. Any type of variable can be connected
name The 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:
The value to be written to the attached variable.

Definition at line 66 of file RPCVariable.h.