mbedConnectorInterface back port from mbedOS v3 using mbed-client C++ call interface

Embed: (wiki syntax)

« Back to documentation index

Resource< InnerType > Class Template Reference

Resource< InnerType > Class Template Reference

Resource class. More...

#include <Resource.h>

Public Member Functions

 Resource (const Logger *logger, const string obj_name, const string res_name, InnerType value)
 Default constructor.
 Resource (const Resource< InnerType > &resource)
 Copy constructor.
virtual ~Resource ()
 Destructor.
string getObjName ()
 Get the Object name.
string getResName ()
 Get the Resource name.
string getFullName ()
 Get the Full name.
InnerType getValue ()
 Get the resource value.
void setName (const string name)
 Set the resource name.
void setValue (const InnerType value)
 Set the resource value.
virtual M2MObject * bind (void *p)=0
 Bind resource to endpoint.
void setOptions (const void *options)
 set the options
void setEndpoint (const void *endpoint)
 set the endpoint

Detailed Description

template<typename InnerType>
class Resource< InnerType >

Resource class.

Definition at line 42 of file Resource.h.


Constructor & Destructor Documentation

Resource ( const Logger logger,
const string  obj_name,
const string  res_name,
InnerType  value 
)

Default constructor.

Parameters:
loggerinput the Logger instance this Resource is a part of
obj_nameinput the Object Name
res_nameinput the Resource URI/Name
valueinput the Resource value

Definition at line 52 of file Resource.h.

Resource ( const Resource< InnerType > &  resource )

Copy constructor.

Parameters:
resourceinput the Resource that is to be deep copied

Definition at line 64 of file Resource.h.

virtual ~Resource (  ) [virtual]

Destructor.

Definition at line 76 of file Resource.h.


Member Function Documentation

virtual M2MObject* bind ( void *  p ) [pure virtual]

Bind resource to endpoint.

Implemented in DeviceResource, DynamicResource, and StaticResource.

string getFullName (  )

Get the Full name.

Returns:
the name of the object

Definition at line 99 of file Resource.h.

string getObjName (  )

Get the Object name.

Returns:
the name of the object

Definition at line 83 of file Resource.h.

string getResName (  )

Get the Resource name.

Returns:
the name of the resource

Definition at line 91 of file Resource.h.

InnerType getValue (  )

Get the resource value.

Returns:
the value of the resource

Definition at line 107 of file Resource.h.

void setEndpoint ( const void *  endpoint )

set the endpoint

Definition at line 147 of file Resource.h.

void setName ( const string  name )

Set the resource name.

Parameters:
nameinput the resource name

Definition at line 115 of file Resource.h.

void setOptions ( const void *  options )

set the options

Definition at line 140 of file Resource.h.

void setValue ( const InnerType  value )

Set the resource value.

Parameters:
valueinput the resource value

Definition at line 123 of file Resource.h.