observe updates

Fork of mbedConnectorInterface by Doug Anson

Embed: (wiki syntax)

« Back to documentation index

OptionsBuilder Class Reference

OptionsBuilder Class Reference

OptionsBuilder class. More...

#include <OptionsBuilder.h>

Inherits Connector::Options.

Public Member Functions

 OptionsBuilder ()
 Default Constructor.
 OptionsBuilder (const OptionsBuilder &ob)
 Copy Constructor.
virtual ~OptionsBuilder ()
 Destructor.
OptionsBuildersetLifetime (const char *lifetime)
 Set the NSDL Endpoint Lifetime.
OptionsBuildersetDomain (const char *domain)
 Set the NSDL Domain.
OptionsBuildersetEndpointNodename (const char *node_name)
 Set the Endpoint Node Name.
OptionsBuildersetEndpointType (const char *endpoint_type)
 Set the NSDL Endpoint Type.
OptionsBuildersetNSPPortNumber (const int port_num)
 Set the NSDL Port Number.
OptionsBuildersetRadioChannelList (const uint32_t channel_list)
 Set the underlying radio stack channel list.
OptionsBuildersetReadUpdatePeriod (const int rd_update_period_ms)
 Set the NSDL Read Update Period.
OptionsBuildersetNSPAddress (const uint8_t *nsp_address, const int nsp_address_length=NSP_IP_ADDRESS_LENGTH)
 Set the NSP IPv6 Address.
OptionsBuildersetMACAddress (const uint8_t *mac_address, const int mac_address_length=NODE_MAC_ADDRESS_LENGTH)
 Set the MAC address.
OptionsBuilderaddResource (const StaticResource *static_resource)
 Add a NSDL endpoint resource (static)
OptionsBuilderaddResource (const DynamicResource *dynamic_resource)
 Add a NSDL endpoint resource (dynamic)
OptionsBuilderaddResource (const DynamicResource *dynamic_resource, const bool use_observer)
 Add a NSDL endpoint resource (dynamic)
OptionsBuilderaddResource (const DynamicResource *dynamic_resource, const int sleep_time)
 Add a NSDL endpoint resource (dynamic)
OptionsBuilderaddResource (const DynamicResource *dynamic_resource, const int sleep_time, const bool use_observer)
 Add a NSDL endpoint resource (dynamic)
OptionsBuildersetWiFiSSID (char *ssid)
 Set the WiFi SSID.
OptionsBuildersetWiFiAuthType (WiFiAuthTypes auth_type)
 Set the WiFi AuthType.
OptionsBuildersetWiFiAuthKey (char *auth_key)
 Set the WiFi AuthKey.
OptionsBuildersetNetworkID (char *network_id)
 Set the 802.15.4 Network ID.
OptionsBuildersetRadioChannel (int channel)
 Set the 802.15.4 Radio Channel.
Optionsbuild ()
 Build our our immutable self.

Private Member Functions

char * getLifetime ()
 Get the node lifetime.
string getDomain ()
 Get the NSP domain.
string getEndpointNodename ()
 Get the node name.
string getEndpointType ()
 Get the node type.
int getNSPPortNumber ()
 Get the NSP port number.
uint32_t getRadioChannelList ()
 Get the node radio channel list.
int getReadUpdatePeriod ()
 Get the NSP read update period.
uint8_t * getNSPAddress ()
 Get the NSP address.
uint8_t * getMACAddress ()
 Get the node MAC address.
StaticResourcesList * getStaticResourceList ()
 Get the list of static resources.
DynamicResourcesList * getDynamicResourceList ()
 Get the list of dynamic resources.
string getWiFiSSID ()
 Get the WiFi SSID.
WiFiAuthTypes getWiFiAuthType ()
 Get the WiFi Auth Type.
string getWiFiAuthKey ()
 Get the WiFi Auth Key.
string getNetworkID ()
 Get the 802.15.4 Network ID.
uint8_t getRadioChannel ()
 Get the 802.15.4 Radio channel.

Detailed Description

OptionsBuilder class.

Definition at line 34 of file OptionsBuilder.h.


Constructor & Destructor Documentation

Default Constructor.

Definition at line 32 of file OptionsBuilder.cpp.

OptionsBuilder ( const OptionsBuilder ob )

Copy Constructor.

Parameters:
obinput options builder instance to deep copy

Definition at line 50 of file OptionsBuilder.cpp.

~OptionsBuilder (  ) [virtual]

Destructor.

Definition at line 61 of file OptionsBuilder.cpp.


Member Function Documentation

OptionsBuilder & addResource ( const StaticResource static_resource )

Add a NSDL endpoint resource (static)

Parameters:
static_resourceinput the NSDL static resource
Returns:
instance to ourself

Definition at line 140 of file OptionsBuilder.cpp.

OptionsBuilder & addResource ( const DynamicResource dynamic_resource )

Add a NSDL endpoint resource (dynamic)

Parameters:
dynamic_resourceinput the NSDL dynamic resource

Definition at line 149 of file OptionsBuilder.cpp.

OptionsBuilder & addResource ( const DynamicResource dynamic_resource,
const bool  use_observer 
)

Add a NSDL endpoint resource (dynamic)

Parameters:
dynamic_resourceinput the NSDL dynamic resource
use_observerinput if true, use an appropriate ResourceObserver to observer. if false, the underlying resource will handle it
Returns:
instance to ourself

Definition at line 163 of file OptionsBuilder.cpp.

OptionsBuilder & addResource ( const DynamicResource dynamic_resource,
const int  sleep_time 
)

Add a NSDL endpoint resource (dynamic)

Parameters:
dynamic_resourceinput the NSDL dynamic resource
sleep_timeinput the observation sleep time in milliseconds (for observable resource only)
Returns:
instance to ourself

Definition at line 156 of file OptionsBuilder.cpp.

OptionsBuilder & addResource ( const DynamicResource dynamic_resource,
const int  sleep_time,
const bool  use_observer 
)

Add a NSDL endpoint resource (dynamic)

Parameters:
dynamic_resourceinput the NSDL dynamic resource
sleep_timeinput the observation sleep time in milliseconds (for observable resource only)
use_observerinput if true, use an appropriate ResourceObserver to observer. if false, the underlying resource will handle it
Returns:
instance to ourself

Definition at line 170 of file OptionsBuilder.cpp.

Options * build (  )

Build our our immutable self.

Definition at line 225 of file OptionsBuilder.cpp.

OptionsBuilder & setDomain ( const char *  domain )

Set the NSDL Domain.

Parameters:
domaininput the NSDL domain to set
Returns:
instance to ourself

Definition at line 76 of file OptionsBuilder.cpp.

OptionsBuilder & setEndpointNodename ( const char *  node_name )

Set the Endpoint Node Name.

Parameters:
node_nameinput the node endpoint name
Returns:
instance to ourself

Definition at line 83 of file OptionsBuilder.cpp.

OptionsBuilder & setEndpointType ( const char *  endpoint_type )

Set the NSDL Endpoint Type.

Parameters:
endpoint_typeinput the NSDL endpoint type
Returns:
instance to ourself

Definition at line 90 of file OptionsBuilder.cpp.

OptionsBuilder & setLifetime ( const char *  lifetime )

Set the NSDL Endpoint Lifetime.

Parameters:
lifetimeinput the NSDL endpoint lifetime (seconds)
Returns:
instance to ourself

Definition at line 69 of file OptionsBuilder.cpp.

OptionsBuilder & setMACAddress ( const uint8_t *  mac_address,
const int  mac_address_length = NODE_MAC_ADDRESS_LENGTH 
)

Set the MAC address.

Parameters:
mac_addressinput the MAC address buffer
mac_address_lengthinput the MAC address buffer length
Returns:
instance to ourself

Definition at line 129 of file OptionsBuilder.cpp.

OptionsBuilder & setNetworkID ( char *  network_id )

Set the 802.15.4 Network ID.

Parameters:
network_idinput the 802.15.4 mesh Network ID

Definition at line 211 of file OptionsBuilder.cpp.

OptionsBuilder & setNSPAddress ( const uint8_t *  nsp_address,
const int  nsp_address_length = NSP_IP_ADDRESS_LENGTH 
)

Set the NSP IPv6 Address.

Parameters:
nsp_addressinput the NSP IPv6 address
nsp_address_lengthinput the length of the NSP IPv6 address buffer
Returns:
instance to ourself

Definition at line 118 of file OptionsBuilder.cpp.

OptionsBuilder & setNSPPortNumber ( const int  port_num )

Set the NSDL Port Number.

Parameters:
port_numinput the NSDL port number
Returns:
instance to ourself

Definition at line 97 of file OptionsBuilder.cpp.

OptionsBuilder & setRadioChannel ( int  channel )

Set the 802.15.4 Radio Channel.

Parameters:
channelinput the 802.15.4 radio channel

Definition at line 218 of file OptionsBuilder.cpp.

OptionsBuilder & setRadioChannelList ( const uint32_t  channel_list )

Set the underlying radio stack channel list.

Parameters:
channel_listinput the radio channel list
Returns:
instance to ourself

Definition at line 104 of file OptionsBuilder.cpp.

OptionsBuilder & setReadUpdatePeriod ( const int  rd_update_period_ms )

Set the NSDL Read Update Period.

Parameters:
rd_update_period_msinput the NSDL read update period (in ms)
Returns:
instance to ourself

Definition at line 111 of file OptionsBuilder.cpp.

OptionsBuilder & setWiFiAuthKey ( char *  auth_key )

Set the WiFi AuthKey.

Parameters:
auth_keyinput the WiFi AuthKey

Definition at line 204 of file OptionsBuilder.cpp.

OptionsBuilder & setWiFiAuthType ( WiFiAuthTypes  auth_type )

Set the WiFi AuthType.

Parameters:
auth_typeinput the WiFi AuthType

Definition at line 197 of file OptionsBuilder.cpp.

OptionsBuilder & setWiFiSSID ( char *  ssid )

Set the WiFi SSID.

Parameters:
ssidinput the WiFi SSID

Definition at line 190 of file OptionsBuilder.cpp.