This is the sample program that can see the decode result of barcode data on Watson IoT.

Dependencies:   AsciiFont DisplayApp GR-PEACH_video LCD_shield_config LWIPBP3595Interface_STA_for_mbed-os USBDevice

Embed: (wiki syntax)

« Back to documentation index

StaticResource Class Reference

StaticResource Class Reference

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

#include <StaticResource.h>

Inherits Resource< string >.

Public Member Functions

 StaticResource (const Logger *logger, const char *obj_name, const char *res_name, const char *value)
 Default constructor.
 StaticResource (const Logger *logger, const char *obj_name, const char *res_name, const string value)
 string value constructor
 StaticResource (const Logger *logger, const string obj_name, const string res_name, const string value)
 constructor with buffer lengths
 StaticResource (const StaticResource &resource)
 Copy constructor.
virtual ~StaticResource ()
 Destructor.
virtual void bind (void *ep)
 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
int getInstanceNumber ()
 Get our Instance Number.
void setInstanceNumber (int instance_number)
 Set our Instance Number.

Detailed Description

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

Definition at line 34 of file StaticResource.h.


Constructor & Destructor Documentation

StaticResource ( const Logger logger,
const char *  obj_name,
const char *  res_name,
const char *  value 
)

Default constructor.

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

Definition at line 30 of file StaticResource.cpp.

StaticResource ( const Logger logger,
const char *  obj_name,
const char *  res_name,
const string  value 
)

string value constructor

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

Definition at line 37 of file StaticResource.cpp.

StaticResource ( const Logger logger,
const string  obj_name,
const string  res_name,
const string  value 
)

constructor with buffer lengths

Parameters:
loggerinput logger instance for this resource
obj_nameinput the Object
nameinput the Resource URI/Name param name_length input the length of the Resource URI/Name
valueinput the Resource value (or NULL)

Definition at line 44 of file StaticResource.cpp.

StaticResource ( const StaticResource resource )

Copy constructor.

Parameters:
resourceinput the StaticResource that is to be deep copied

Definition at line 51 of file StaticResource.cpp.

~StaticResource (  ) [virtual]

Destructor.

Definition at line 58 of file StaticResource.cpp.


Member Function Documentation

void bind ( void *  ep ) [virtual]

Bind resource to endpoint.

Parameters:
epinput endpoint instance pointer

Implements Resource< string >.

Definition at line 62 of file StaticResource.cpp.

string getFullName (  ) [inherited]

Get the Full name.

Returns:
the name of the object

Definition at line 113 of file Resource.h.

int getInstanceNumber (  ) [inherited]

Get our Instance Number.

Returns:
our instance number

Definition at line 176 of file Resource.h.

string getObjName (  ) [inherited]

Get the Object name.

Returns:
the name of the object

Definition at line 97 of file Resource.h.

string getResName (  ) [inherited]

Get the Resource name.

Returns:
the name of the resource

Definition at line 105 of file Resource.h.

string getValue (  ) [inherited]

Get the resource value.

Returns:
the value of the resource

Definition at line 124 of file Resource.h.

void setDataWrapper ( DataWrapper *  data_wrapper )

Set the data wrapper.

Parameters:
data_wrapperinput the data wrapper instance

Definition at line 86 of file StaticResource.h.

void setEndpoint ( const void *  endpoint ) [inherited]

set the endpoint

Definition at line 165 of file Resource.h.

void setInstanceNumber ( int  instance_number ) [inherited]

Set our Instance Number.

Parameters:
instance_numberinput our designated instance number

Definition at line 182 of file Resource.h.

void setName ( const string  name ) [inherited]

Set the resource name.

Parameters:
nameinput the resource name

Definition at line 132 of file Resource.h.

void setOptions ( const void *  options ) [inherited]

set the options

Definition at line 158 of file Resource.h.

void setValue ( const string  value ) [inherited]

Set the resource value.

Parameters:
valueinput the resource value

Definition at line 140 of file Resource.h.