mbed Ethernet-based CoAP heartrate endpoint for Dreamforce 2015

Dependencies:   GroveEarbudSensor mbed mbedConnectorInterface mbedEndpointNetwork

Embed: (wiki syntax)

« Back to documentation index

LightResource Class Reference

LightResource Class Reference

LightResource class. More...

#include <LightResource.h>

Public Member Functions

 LightResource (const Logger *logger, const char *name, const bool observable=false)
 Default constructor.
virtual string get ()
 Get the value of the Light.
virtual void put (const string value)
 Set the value of the Light.

Detailed Description

LightResource class.

Definition at line 38 of file LightResource.h.


Constructor & Destructor Documentation

LightResource ( const Logger *  logger,
const char *  name,
const bool  observable = false 
)

Default constructor.

Parameters:
loggerinput logger instance for this resource
nameinput the Light resource name
observableinput the resource is Observable (default: FALSE)

Definition at line 48 of file LightResource.h.


Member Function Documentation

virtual string get (  ) [virtual]

Get the value of the Light.

Returns:
string containing either "0" (light off) or "1" (light on)

Definition at line 55 of file LightResource.h.

virtual void put ( const string  value ) [virtual]

Set the value of the Light.

Parameters:
stringinput the string containing "0" (light off) or "1" (light on)

Definition at line 65 of file LightResource.h.