AlexaClientSDK  3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
Public Types | Public Member Functions | Friends | List of all members
alexaClientSDK::settings::types::NetworkInfo Class Reference

#include <NetworkInfo.h>

Public Types

enum  ConnectionType { ConnectionType::ETHERNET, ConnectionType::WIFI }
 
template<typename T >
using Optional = avsCommon::utils::Optional< T >
 

Public Member Functions

Optional< ConnectionTypegetConnectionType () const
 
Optional< std::string > getEssid () const
 
Optional< std::string > getBssid () const
 
Optional< std::string > getIpAddress () const
 
Optional< std::string > getSubnetMask () const
 
Optional< std::string > getMacAddress () const
 
Optional< std::string > getDhcpServerAddress () const
 
Optional< bool > getIsStaticIP () const
 
void setConnectionType (const ConnectionType &connectionType)
 
void setEssid (const std::string &essid)
 
bool setBssid (const std::string &bssid)
 
bool setIpAddress (const std::string &ipAddress)
 
bool setSubnetMask (const std::string &subnetMask)
 
bool setMacAddress (const std::string &macAddress)
 
bool setDhcpServerAddress (const std::string &dhcpServerAddress)
 
void setIsStaticIP (bool isStaticIP)
 
void resetConnectionType ()
 
void resetEssid ()
 
void resetBssid ()
 
void resetIpAddress ()
 
void resetSubnetMask ()
 
void resetMacAddress ()
 
void resetDhcpServerAddress ()
 
void resetIsStaticIP ()
 
bool operator== (const NetworkInfo &rhs) const
 
bool operator!= (const NetworkInfo &rhs) const
 

Friends

std::ostream & operator<< (std::ostream &os, const NetworkInfo &info)
 Friend output function. More...
 

Detailed Description

Class that represents a set of network information.

Member Typedef Documentation

◆ Optional

Member Enumeration Documentation

◆ ConnectionType

Device network connection types.

Enumerator
ETHERNET 

Represents a wired connection.

WIFI 

Represents a wireless connection.

Member Function Documentation

◆ getBssid()

Optional<std::string> alexaClientSDK::settings::types::NetworkInfo::getBssid ( ) const

Get the physical name of the access point.

Returns
The physical name of the access point if available, an empty Optional otherwise.

◆ getConnectionType()

Optional<ConnectionType> alexaClientSDK::settings::types::NetworkInfo::getConnectionType ( ) const

Get the network connection type.

Returns
The network connection type if available, an empty Optional otherwise.

◆ getDhcpServerAddress()

Optional<std::string> alexaClientSDK::settings::types::NetworkInfo::getDhcpServerAddress ( ) const

Get the DHCP server address.

Returns
The DHCP server address if available, an empty Optional otherwise.

◆ getEssid()

Optional<std::string> alexaClientSDK::settings::types::NetworkInfo::getEssid ( ) const

Get the name of the network.

Returns
The name of the network if available, an empty Optional otherwise.

◆ getIpAddress()

Optional<std::string> alexaClientSDK::settings::types::NetworkInfo::getIpAddress ( ) const

Get the IP address value of the device in this network.

Returns
The IP address value of the device in this network if available, an empty Optional otherwise.

◆ getIsStaticIP()

Optional<bool> alexaClientSDK::settings::types::NetworkInfo::getIsStaticIP ( ) const

Get whether this network uses static IP.

Returns
Whether this network uses static IP if information is available, an empty Optional otherwise.

◆ getMacAddress()

Optional<std::string> alexaClientSDK::settings::types::NetworkInfo::getMacAddress ( ) const

Get the device network physical address(MAC).

Returns
The device network physical address(MAC) if available, an empty Optional otherwise.

◆ getSubnetMask()

Optional<std::string> alexaClientSDK::settings::types::NetworkInfo::getSubnetMask ( ) const

Get the network subnet mask.

Returns
The network subnet mask if available, an empty Optional otherwise.

◆ operator!=()

bool alexaClientSDK::settings::types::NetworkInfo::operator!= ( const NetworkInfo rhs) const

◆ operator==()

bool alexaClientSDK::settings::types::NetworkInfo::operator== ( const NetworkInfo rhs) const

Equality operator.

◆ resetBssid()

void alexaClientSDK::settings::types::NetworkInfo::resetBssid ( )

Reset the physical name of the access point.

◆ resetConnectionType()

void alexaClientSDK::settings::types::NetworkInfo::resetConnectionType ( )

Reset the network connection type information.

◆ resetDhcpServerAddress()

void alexaClientSDK::settings::types::NetworkInfo::resetDhcpServerAddress ( )

Reset the DHCP server address known to the device.

◆ resetEssid()

void alexaClientSDK::settings::types::NetworkInfo::resetEssid ( )

Reset the name of the network.

◆ resetIpAddress()

void alexaClientSDK::settings::types::NetworkInfo::resetIpAddress ( )

Reset the IP address value.

◆ resetIsStaticIP()

void alexaClientSDK::settings::types::NetworkInfo::resetIsStaticIP ( )

Reset whether the IP address is static or not.

◆ resetMacAddress()

void alexaClientSDK::settings::types::NetworkInfo::resetMacAddress ( )

Reset the physical address(MAC) of the device.

◆ resetSubnetMask()

void alexaClientSDK::settings::types::NetworkInfo::resetSubnetMask ( )

Reset the network subnet mask.

◆ setBssid()

bool alexaClientSDK::settings::types::NetworkInfo::setBssid ( const std::string &  bssid)

Set the physical name of the access point.

Parameters
bssidThe physical name of the access point.
Note
The string should be formatted as a set of octets (in hexadecimal format) separated by ':'.
Returns
true if the bssid has been set; false otherwise.

◆ setConnectionType()

void alexaClientSDK::settings::types::NetworkInfo::setConnectionType ( const ConnectionType connectionType)

Set the network connection type.

Parameters
connectionTypeThe network connection type the device is connected to.

◆ setDhcpServerAddress()

bool alexaClientSDK::settings::types::NetworkInfo::setDhcpServerAddress ( const std::string &  dhcpServerAddress)

Set the DHCP server address known to the device.

Parameters
dhcpServerAddressThe address of the DHCP server using IPv6 or IPv4 mask format.
Returns
true if the HHCP serer address has been set; false otherwise.

◆ setEssid()

void alexaClientSDK::settings::types::NetworkInfo::setEssid ( const std::string &  essid)

Set the name of the network.

Parameters
essidThe name of the network.

◆ setIpAddress()

bool alexaClientSDK::settings::types::NetworkInfo::setIpAddress ( const std::string &  ipAddress)

Set the IP address value.

Parameters
ipAddressThe IP address. The value can be either IPv6 or IPv4.
Returns
true if the ip address has been set; false otherwise.

◆ setIsStaticIP()

void alexaClientSDK::settings::types::NetworkInfo::setIsStaticIP ( bool  isStaticIP)

Set whether the IP address is static or not.

Parameters
isStaticIPWhether the network uses static IP or not.

◆ setMacAddress()

bool alexaClientSDK::settings::types::NetworkInfo::setMacAddress ( const std::string &  macAddress)

Set the physical address(MAC) of the device.

Parameters
macAddressThe device MAC address.
Note
The string should be formatted as a set of octets (in hexadecimal format) separated by ':'.
Returns
true if the MAC address has been set; false otherwise.

◆ setSubnetMask()

bool alexaClientSDK::settings::types::NetworkInfo::setSubnetMask ( const std::string &  subnetMask)

Set the network subnet mask.

Parameters
subnetMaskThe network subnet mask using IPv6 or IPv4 mask format.
Returns
true if the subnet mask has been set; false otherwise.

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  os,
const NetworkInfo info 
)
friend

Friend output function.

Write a NetworkInfo value to the given stream in json format.

Parameters
streamThe stream to write the value to.
infoThe network info to write to the stream as a string.
Returns
The stream that was passed in and written to.

The documentation for this class was generated from the following file:

AlexaClientSDK 3.0.0 - Copyright 2016-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0