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.
WIFIInfo.cpp
00001 #include "WIFIInfo.h" 00002 00003 using namespace SmartLabMuRata; 00004 00005 const char * WIFIInfo::GetSSID() 00006 { 00007 return ssid; 00008 } 00009 00010 SecurityMode WIFIInfo::GetSecurityMode() 00011 { 00012 return mode; 00013 } 00014 00015 char WIFIInfo::GetChannel() 00016 { 00017 return channel; 00018 } 00019 00020 WIFIInfo::WIFIInfo() 00021 { 00022 ssid = NULL; 00023 } 00024 00025 WIFIInfo::WIFIInfo(const char * SSID, const SecurityMode securityMode) 00026 { 00027 ssid = NULL; 00028 SetSSID(SSID)->SetSecurityMode(securityMode); 00029 } 00030 00031 00032 WIFIInfo::~WIFIInfo() 00033 { 00034 if (ssid != NULL) 00035 delete[] ssid; 00036 } 00037 00038 00039 WIFIInfo * WIFIInfo::SetSSID(const char * SSID) 00040 { 00041 if (SSID == NULL) 00042 return this; 00043 00044 if (ssid != NULL) 00045 delete[] ssid; 00046 00047 int length = strlen(SSID) + 1; 00048 ssid = new char[length]; 00049 memcpy(ssid, SSID, length); 00050 return this; 00051 } 00052 00053 WIFIInfo * WIFIInfo::SetSecurityMode(const SecurityMode securityMode) 00054 { 00055 this->mode = securityMode; 00056 return this; 00057 } 00058 00059 WIFIInfo * WIFIInfo::SetChannel(const char channel) 00060 { 00061 this->channel = channel; 00062 return this; 00063 } 00064 00065 const char * WIFIInfo::ToString() 00066 { 00067 return ssid; 00068 }
Generated on Fri Jul 15 2022 01:02:11 by 1.7.2