Doug Anson / mbedConnectorInterfaceV3
Embed: (wiki syntax)

« Back to documentation index

DeviceResource Class Reference

DeviceResource Class Reference

DeviceResource is a static (GET only) resource with a value type pinned as a string type. More...

#include <DeviceResource.h>

Inherits Resource< string >.

Public Member Functions

 DeviceResource (const Logger *logger, M2MDevice::DeviceResource name, const char *value)
 Default constructor.
 DeviceResource (const Logger *logger, M2MDevice::DeviceResource name, const string value)
 string value constructor
 DeviceResource (const DeviceResource &resource)
 Copy constructor.
virtual ~DeviceResource ()
 Destructor.
virtual M2MObject * bind (void *p)
 Bind resource to endpoint.
void setDataWrapper (DataWrapper *data_wrapper)
 Set the data wrapper.
string getObjName ()
 Get the Object name.
string getResName ()
 Get the Resource name.
string getFullName ()
 Get the Full name.
string getValue ()
 Get the resource value.
void setName (const string name)
 Set the resource name.
void setValue (const stringvalue)
 Set the resource value.
void setOptions (const void *options)
 set the options
void setEndpoint (const void *endpoint)
 set the endpoint

Detailed Description

DeviceResource is a static (GET only) resource with a value type pinned as a string type.

Definition at line 37 of file DeviceResource.h.


Constructor & Destructor Documentation

DeviceResource ( const Logger logger,
M2MDevice::DeviceResource  name,
const char *  value 
)

Default constructor.

Parameters:
loggerinput logger instance for this resource
nameinput the Resource URI/Name
valueinput the Resource value (a string)

Definition at line 33 of file DeviceResource.cpp.

DeviceResource ( const Logger logger,
M2MDevice::DeviceResource  name,
const string  value 
)

string value constructor

Parameters:
loggerinput logger instance for this resource
nameinput the Resource URI/Name
valueinput the Resource value (a string)

Definition at line 40 of file DeviceResource.cpp.

DeviceResource ( const DeviceResource resource )

Copy constructor.

Parameters:
resourceinput the DeviceResource that is to be deep copied

Definition at line 48 of file DeviceResource.cpp.

~DeviceResource (  ) [virtual]

Destructor.

Definition at line 56 of file DeviceResource.cpp.


Member Function Documentation

M2MObject * bind ( void *  p ) [virtual]

Bind resource to endpoint.

Parameters:
pinput pointer to the endpoint resources necessary for binding

Implements Resource< string >.

Definition at line 60 of file DeviceResource.cpp.

string getFullName (  ) [inherited]

Get the Full name.

Returns:
the name of the object

Definition at line 99 of file Resource.h.

string getObjName (  ) [inherited]

Get the Object name.

Returns:
the name of the object

Definition at line 83 of file Resource.h.

string getResName (  ) [inherited]

Get the Resource name.

Returns:
the name of the resource

Definition at line 91 of file Resource.h.

string getValue (  ) [inherited]

Get the resource value.

Returns:
the value of the resource

Definition at line 107 of file Resource.h.

void setDataWrapper ( DataWrapper *  data_wrapper )

Set the data wrapper.

Parameters:
data_wrapperinput the data wrapper instance

Definition at line 77 of file DeviceResource.h.

void setEndpoint ( const void *  endpoint ) [inherited]

set the endpoint

Definition at line 147 of file Resource.h.

void setName ( const string  name ) [inherited]

Set the resource name.

Parameters:
nameinput the resource name

Definition at line 115 of file Resource.h.

void setOptions ( const void *  options ) [inherited]

set the options

Definition at line 140 of file Resource.h.

void setValue ( const string  value ) [inherited]

Set the resource value.

Parameters:
valueinput the resource value

Definition at line 123 of file Resource.h.