Murata RF modules are designed to simplify wireless development and certification by minimizing the amount of RF expertise you need to wirelessly enable a wide range of applications.
Config/DHCPConfig.cpp
- Committer:
- yangcq88517
- Date:
- 2015-02-03
- Revision:
- 0:8e83b9448758
- Child:
- 1:fd19bd683e90
File content as of revision 0:8e83b9448758:
#include "DHCPConfig.h" using namespace SmartLabMuRata; DHCPConfig::DHCPConfig(const WIFIInterface wifiInterface, const DHCPMode mode) { ip = NULL; mask = NULL; gateway = NULL; first = NULL; last = NULL; SetDHCPMode(mode).SetInterface(wifiInterface); } /* DHCPConfig::~DHCPConfig() { delete ip; delete mask; delete gateway; delete first; delete last; } */ WIFIInterface DHCPConfig::GetInterface() { return _interface; } DHCPMode DHCPConfig::GetDHCPMode() { return mode; } IPAddress * DHCPConfig::GetLocalIP() { return ip; } IPAddress * DHCPConfig::GetNetmask() { return mask; } IPAddress * DHCPConfig::GetGatewayIP() { return gateway; } IPAddress * DHCPConfig::GetIPRangeFirst() { return first; } IPAddress * DHCPConfig::GetIPRangeLast() { return last; } DHCPConfig & DHCPConfig::SetInterface(const WIFIInterface wifiInterface) { _interface = wifiInterface; return *this; } DHCPConfig & DHCPConfig::SetDHCPMode(const DHCPMode mode) { this->mode = mode; return *this; } DHCPConfig & DHCPConfig::SetLocalIP(const char * ip) { this->ip = new IPAddress(ip); return *this; } DHCPConfig & DHCPConfig::SetNetmask(const char * netmask) { mask = new IPAddress(netmask); return *this; } DHCPConfig & DHCPConfig::SetGatewayIP(const char * gateway) { this->gateway = new IPAddress(gateway); return *this; } DHCPConfig & DHCPConfig::SetIPRange(const char * first, const char * last) { this->first = new IPAddress(first); this->last = new IPAddress(last); return *this; }