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.
DHCPConfig.cpp
00001 #include "DHCPConfig.h" 00002 00003 using namespace SmartLabMuRata; 00004 00005 DHCPConfig::DHCPConfig(const WIFIInterface wifiInterface, const DHCPMode mode) 00006 { 00007 ip = NULL; 00008 mask = NULL; 00009 gateway = NULL; 00010 first = NULL; 00011 last = NULL; 00012 SetDHCPMode(mode).SetInterface(wifiInterface); 00013 } 00014 00015 DHCPConfig::~DHCPConfig() 00016 { 00017 delete ip; 00018 delete mask; 00019 delete gateway; 00020 delete first; 00021 delete last; 00022 } 00023 00024 WIFIInterface DHCPConfig::GetInterface() 00025 { 00026 return _interface; 00027 } 00028 00029 DHCPMode DHCPConfig::GetDHCPMode() 00030 { 00031 return mode; 00032 } 00033 00034 IPAddress * DHCPConfig::GetLocalIP() 00035 { 00036 return ip; 00037 } 00038 00039 IPAddress * DHCPConfig::GetNetmask() 00040 { 00041 return mask; 00042 } 00043 00044 IPAddress * DHCPConfig::GetGatewayIP() 00045 { 00046 return gateway; 00047 } 00048 00049 IPAddress * DHCPConfig::GetIPRangeFirst() 00050 { 00051 return first; 00052 } 00053 00054 IPAddress * DHCPConfig::GetIPRangeLast() 00055 { 00056 return last; 00057 } 00058 00059 DHCPConfig & DHCPConfig::SetInterface(const WIFIInterface wifiInterface) 00060 { 00061 _interface = wifiInterface; 00062 return *this; 00063 } 00064 00065 DHCPConfig & DHCPConfig::SetDHCPMode(const DHCPMode mode) 00066 { 00067 this->mode = mode; 00068 return *this; 00069 } 00070 00071 DHCPConfig & DHCPConfig::SetLocalIP(char * ip) 00072 { 00073 this->ip = new IPAddress(ip); 00074 return *this; 00075 } 00076 00077 DHCPConfig & DHCPConfig::SetNetmask(char * netmask) 00078 { 00079 mask = new IPAddress(netmask); 00080 return *this; 00081 } 00082 00083 DHCPConfig & DHCPConfig::SetGatewayIP(char * gateway) 00084 { 00085 this->gateway = new IPAddress(gateway); 00086 return *this; 00087 } 00088 00089 DHCPConfig & DHCPConfig::SetIPRange(char * first, char * last) 00090 { 00091 this->first = new IPAddress(first); 00092 this->last = new IPAddress(last); 00093 return *this; 00094 }
Generated on Fri Jul 15 2022 01:02:11 by
1.7.2