AlexaClientSDK  1.26.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
Namespaces | Macros | Functions | Variables
NetworkInfo.cpp File Reference
#include <array>
#include <cstdio>
#include <functional>
#include <string>
#include <rapidjson/document.h>
#include <rapidjson/error/en.h>
#include <rapidjson/istreamwrapper.h>
#include <AVSCommon/Utils/Logger/Logger.h>
#include <AVSCommon/Utils/JSON/JSONGenerator.h>
#include <AVSCommon/Utils/JSON/JSONUtils.h>
#include <AVSCommon/Utils/String/StringUtils.h>
#include "Settings/Types/NetworkInfo.h"
Include dependency graph for NetworkInfo.cpp:

Namespaces

 alexaClientSDK
 Whether or not curl logs should be emitted.
 
 alexaClientSDK::settings
 
 alexaClientSDK::settings::types
 

Macros

#define LX_FAILED()   alexaClientSDK::avsCommon::utils::logger::LogEntry(TAG, std::string(__func__) + "Failed")
 

Functions

static const std::string alexaClientSDK::settings::types::TAG ("NetworkInfo")
 String to identify log entries originating from this file. More...
 
static bool alexaClientSDK::settings::types::expectedFormat (const std::string &input, const std::function< bool(unsigned int)> &valueChecker, char expectedDelimiter, bool hexFormat=false)
 
static bool alexaClientSDK::settings::types::validIpV4 (const std::string &input)
 
static bool alexaClientSDK::settings::types::verifyHextetsIPv6 (const size_t hextets, const size_t doubleColonPos)
 
static bool alexaClientSDK::settings::types::validIpV6 (const std::string &input)
 
std::ostream & alexaClientSDK::settings::types::operator<< (std::ostream &os, const NetworkInfo &info)
 
std::istream & alexaClientSDK::settings::types::operator>> (std::istream &is, NetworkInfo &info)
 

Variables

static const std::string alexaClientSDK::settings::types::CONNECTION_TYPE_KEY = "connectionType"
 Json payload key for connection type. More...
 
static const std::string alexaClientSDK::settings::types::ESSID_KEY = "ESSID"
 Json payload key for network name. More...
 
static const std::string alexaClientSDK::settings::types::BSSID_KEY = "BSSID"
 Json payload key for access point name. More...
 
static const std::string alexaClientSDK::settings::types::IP_ADDRESS_KEY = "IPAddress"
 Json payload key for IP address. More...
 
static const std::string alexaClientSDK::settings::types::SUBNET_MASK_KEY = "subnetMask"
 Json payload key for subnet mask. More...
 
static const std::string alexaClientSDK::settings::types::MAC_ADDRESS_KEY = "MACAddress"
 Json payload key for MAC address. More...
 
static const std::string alexaClientSDK::settings::types::DHCP_SERVER_ADDRESS_KEY = "DHCPServerAddress"
 Json payload key for DHCP server address. More...
 
static const std::string alexaClientSDK::settings::types::IS_STATIC_IP_KEY = "staticIP"
 Json payload key for static IP. More...
 
static const std::string alexaClientSDK::settings::types::CONNECTION_TYPE_ETHERNET = "ETHERNET"
 ConnectionType::ETHERNET string representation. More...
 
static const std::string alexaClientSDK::settings::types::CONNECTION_TYPE_WIFI = "WIFI"
 ConnectionType::WIFI string representation. More...
 
static constexpr char alexaClientSDK::settings::types::IP_V4_DELIMITER = '.'
 IPv4 format is 4 bytes where each byte is represented in decimal and seperated by '.'. More...
 
static constexpr char alexaClientSDK::settings::types::IP_V6_DELIMITER = ':'
 IPv6 format is 16 bytes where each set of 2 bytes is represented in hexadecimal and seperated by ':'. More...
 
static constexpr size_t alexaClientSDK::settings::types::MAC48_NUMBER_OF_BYTES = 6
 Number of bytes in a MAC48 address. More...
 
static constexpr char alexaClientSDK::settings::types::MAC_ADDRESS_DELIMITER = ':'
 We assume the MAC address is delimited by ':'. More...
 
static constexpr int alexaClientSDK::settings::types::IP_V4_NUMBER_OF_BYTES = 4
 Number of bytes in an IPv4 address. More...
 
static constexpr int alexaClientSDK::settings::types::IP_V6_NUMBER_OF_HEXTETS = 8
 Number of hextets (2 bytes) in an IPv6 address. More...
 
static constexpr char alexaClientSDK::settings::types::SUBNET_RANGE_DELIMETER = '/'
 Subnet mask range separator. Divides the ip portion from the range width. More...
 
static const std::string alexaClientSDK::settings::types::IP_V6_DOUBLE_COLONS = "::"
 The double colon used in IPv6 to replace groups of 0s. More...
 

Macro Definition Documentation

◆ LX_FAILED

#define LX_FAILED ( )    alexaClientSDK::avsCommon::utils::logger::LogEntry(TAG, std::string(__func__) + "Failed")

Create an error LogEntry using this file's TAG and use "functionNameFailed" as the event string.

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