Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of mbedConnectorInterface by
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. | |
| OptionsBuilder & | setLifetime (const char *lifetime) |
| Set the NSDL Endpoint Lifetime. | |
| OptionsBuilder & | setDomain (const char *domain) |
| Set the NSDL Domain. | |
| OptionsBuilder & | setEndpointNodename (const char *node_name) |
| Set the Endpoint Node Name. | |
| OptionsBuilder & | setEndpointType (const char *endpoint_type) |
| Set the NSDL Endpoint Type. | |
| OptionsBuilder & | setNSPPortNumber (const int port_num) |
| Set the NSDL Port Number. | |
| OptionsBuilder & | setRadioChannelList (const uint32_t channel_list) |
| Set the underlying radio stack channel list. | |
| OptionsBuilder & | setReadUpdatePeriod (const int rd_update_period_ms) |
| Set the NSDL Read Update Period. | |
| OptionsBuilder & | setNSPAddress (const uint8_t *nsp_address, const int nsp_address_length=NSP_IP_ADDRESS_LENGTH) |
| Set the NSP IPv6 Address. | |
| OptionsBuilder & | setMACAddress (const uint8_t *mac_address, const int mac_address_length=NODE_MAC_ADDRESS_LENGTH) |
| Set the MAC address. | |
| OptionsBuilder & | addResource (const StaticResource *static_resource) |
| Add a NSDL endpoint resource (static) | |
| OptionsBuilder & | addResource (const DynamicResource *dynamic_resource) |
| Add a NSDL endpoint resource (dynamic) | |
| OptionsBuilder & | addResource (const DynamicResource *dynamic_resource, const bool use_observer) |
| Add a NSDL endpoint resource (dynamic) | |
| OptionsBuilder & | addResource (const DynamicResource *dynamic_resource, const int sleep_time) |
| Add a NSDL endpoint resource (dynamic) | |
| OptionsBuilder & | addResource (const DynamicResource *dynamic_resource, const int sleep_time, const bool use_observer) |
| Add a NSDL endpoint resource (dynamic) | |
| OptionsBuilder & | setWiFiSSID (char *ssid) |
| Set the WiFi SSID. | |
| OptionsBuilder & | setWiFiAuthType (WiFiAuthTypes auth_type) |
| Set the WiFi AuthType. | |
| OptionsBuilder & | setWiFiAuthKey (char *auth_key) |
| Set the WiFi AuthKey. | |
| OptionsBuilder & | setNetworkID (char *network_id) |
| Set the 802.15.4 Network ID. | |
| OptionsBuilder & | setRadioChannel (int channel) |
| Set the 802.15.4 Radio Channel. | |
| OptionsBuilder & | setImmedateObservationEnabled (bool enable) |
| Enable/Disable immediate observationing. | |
| OptionsBuilder & | setEnableGETObservationControl (bool enable) |
| Enable/Disable GET-based control of observations. | |
| Options * | build () |
| 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. | |
| bool | immedateObservationEnabled () |
| Enable/Disable Immediate Observationing. | |
| bool | enableGETObservationControl () |
| Enable/Disable Observation control via GET. | |
Detailed Description
OptionsBuilder class.
Definition at line 34 of file OptionsBuilder.h.
Constructor & Destructor Documentation
| OptionsBuilder | ( | ) |
Default Constructor.
Definition at line 32 of file OptionsBuilder.cpp.
| OptionsBuilder | ( | const OptionsBuilder & | ob ) |
Copy Constructor.
- Parameters:
-
ob input 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_resource input 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_resource input the NSDL dynamic resource
Definition at line 150 of file OptionsBuilder.cpp.
| OptionsBuilder & addResource | ( | const DynamicResource * | dynamic_resource, |
| const bool | use_observer | ||
| ) |
Add a NSDL endpoint resource (dynamic)
- Parameters:
-
dynamic_resource input the NSDL dynamic resource use_observer input if true, use an appropriate ResourceObserver to observer. if false, the underlying resource will handle it
- Returns:
- instance to ourself
Definition at line 164 of file OptionsBuilder.cpp.
| OptionsBuilder & addResource | ( | const DynamicResource * | dynamic_resource, |
| const int | sleep_time | ||
| ) |
Add a NSDL endpoint resource (dynamic)
- Parameters:
-
dynamic_resource input the NSDL dynamic resource sleep_time input the observation sleep time in milliseconds (for observable resource only)
- Returns:
- instance to ourself
Definition at line 157 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_resource input the NSDL dynamic resource sleep_time input the observation sleep time in milliseconds (for observable resource only) use_observer input if true, use an appropriate ResourceObserver to observer. if false, the underlying resource will handle it
- Returns:
- instance to ourself
Definition at line 171 of file OptionsBuilder.cpp.
| Options * build | ( | ) |
Build our our immutable self.
Definition at line 229 of file OptionsBuilder.cpp.
| OptionsBuilder & setDomain | ( | const char * | domain ) |
Set the NSDL Domain.
- Parameters:
-
domain input the NSDL domain to set
- Returns:
- instance to ourself
Definition at line 76 of file OptionsBuilder.cpp.
| OptionsBuilder & setEnableGETObservationControl | ( | bool | enable ) |
Enable/Disable GET-based control of observations.
- Parameters:
-
enable input enable GET-based observation enable/disable control
Definition at line 241 of file OptionsBuilder.cpp.
| OptionsBuilder & setEndpointNodename | ( | const char * | node_name ) |
Set the Endpoint Node Name.
- Parameters:
-
node_name input 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_type input the NSDL endpoint type
- Returns:
- instance to ourself
Definition at line 90 of file OptionsBuilder.cpp.
| OptionsBuilder & setImmedateObservationEnabled | ( | bool | enable ) |
Enable/Disable immediate observationing.
- Parameters:
-
enable input enable immediate observationing without GET
Definition at line 235 of file OptionsBuilder.cpp.
| OptionsBuilder & setLifetime | ( | const char * | lifetime ) |
Set the NSDL Endpoint Lifetime.
- Parameters:
-
lifetime input 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_address input the MAC address buffer mac_address_length input 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_id input the 802.15.4 mesh Network ID
Definition at line 215 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_address input the NSP IPv6 address nsp_address_length input 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_num input 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:
-
channel input the 802.15.4 radio channel
Definition at line 222 of file OptionsBuilder.cpp.
| OptionsBuilder & setRadioChannelList | ( | const uint32_t | channel_list ) |
Set the underlying radio stack channel list.
- Parameters:
-
channel_list input 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_ms input 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_key input the WiFi AuthKey
Definition at line 208 of file OptionsBuilder.cpp.
| OptionsBuilder & setWiFiAuthType | ( | WiFiAuthTypes | auth_type ) |
Set the WiFi AuthType.
- Parameters:
-
auth_type input the WiFi AuthType
Definition at line 201 of file OptionsBuilder.cpp.
| OptionsBuilder & setWiFiSSID | ( | char * | ssid ) |
Set the WiFi SSID.
- Parameters:
-
ssid input the WiFi SSID
Definition at line 194 of file OptionsBuilder.cpp.
Generated on Wed Jul 13 2022 02:58:58 by
1.7.2
