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.
DHCPConfig.h
00001 #ifndef SmartLab_MuRata_Config_DHCPConfig 00002 #define SmartLab_MuRata_Config_DHCPConfig 00003 00004 #include "WIFIInterface.h" 00005 #include "DHCPMode.h" 00006 #include "IPAddress.h" 00007 00008 namespace SmartLabMuRata 00009 { 00010 class DHCPConfig 00011 { 00012 /* 00013 * 0: interface is assigned the static IP, NetMask and Gateway IP. First IP and Last IP are not present. Any active DHCP client or server is stopped. 00014 * 1: STA interface uses DHCP to obtain the address. All subsequent fields are not present. STA DHCP client is started if necessary. 00015 * 2: only for AP interface. If the soft AP is not started or SNIC_INIT_REQ is not done, this command fails. Otherwise, this command stops the HTTP server, DNS server and DHCP server if configured, and restarts them with new parameters. It assigns IP for clients in range [First IP, Last IP] within the subnet mask. The AP itself is assigned the address within the same subnet specified by IP which must not be in the range of [First IP, Last IP]. The value of GTW IP and IP should be the same. If there are clients connected to the soft AP before this command, make sure the clients reconnect to the soft AP after this command. 00016 */ 00017 00018 private : 00019 WIFIInterface _interface; 00020 DHCPMode mode; 00021 00022 IPAddress * ip; 00023 IPAddress * mask; 00024 IPAddress * gateway; 00025 IPAddress * first; 00026 IPAddress * last; 00027 00028 public : 00029 00030 DHCPConfig(const WIFIInterface wifiInterface, const DHCPMode mode); 00031 00032 ~DHCPConfig(); 00033 00034 WIFIInterface GetInterface(); 00035 00036 DHCPMode GetDHCPMode(); 00037 00038 IPAddress * GetLocalIP(); 00039 00040 IPAddress * GetNetmask(); 00041 00042 IPAddress * GetGatewayIP(); 00043 00044 IPAddress * GetIPRangeFirst(); 00045 00046 IPAddress * GetIPRangeLast(); 00047 00048 DHCPConfig & SetInterface(const WIFIInterface wifiInterface); 00049 00050 DHCPConfig & SetDHCPMode(const DHCPMode mode); 00051 00052 DHCPConfig & SetLocalIP(char * ip); 00053 00054 DHCPConfig & SetNetmask(char * netmask); 00055 00056 DHCPConfig & SetGatewayIP(char * gateway); 00057 00058 DHCPConfig & SetIPRange(char * first, char * last); 00059 }; 00060 } 00061 00062 #endif
Generated on Fri Jul 15 2022 01:02:11 by 1.7.2