📄 instance_protocol802_11.cpp
字号:
void Protocol80211_ChannelClass::GetValueImpl(){ DefaultProtocol802_11InstanceObject* pThis = (DefaultProtocol802_11InstanceObject*)_pThis; try { pThis->Lock(); netdev_dev netdev; if(netdev_get_device(pThis->GetKey().c_str(), netdev) != NETDEV_SUCCESS) { throw; } wnetdev_channel channel; if(wnetdev_get_channel(netdev, channel) != NETDEV_SUCCESS) { this->SetNull(true); return; } this->SetValueImpl(channel); pThis->Unlock(); } catch(...) { pThis->Unlock(); THROWIMEXCEPTION("800431C3"); }}//AuthenticationModevoid Protocol80211_AuthenticationModeClass::GetValueImpl(){ _Log( LOG_DEBUG_DEVICE, IntelMobileText("Trace: Protocol80211_AuthenticationModeClass::GetValueImpl()") ); DefaultProtocol802_11InstanceObject* pThis = (DefaultProtocol802_11InstanceObject*)_pThis; try { pThis->Lock(); this->SetNull(true); pThis->Unlock(); } catch(...) { pThis->Unlock(); THROWIMEXCEPTION("800431C3"); }}//Bandvoid Protocol80211_BandClass::GetValueImpl(){ DefaultProtocol802_11InstanceObject* pThis = (DefaultProtocol802_11InstanceObject*)_pThis; try { pThis->Lock(); IntelMobileProtocol802_11BandEnum byValue; if(pThis->Is802_11a()) { byValue = Protocol802_11BandEnum::Protocol802_11a; } else if(pThis->Is802_11b()) { byValue = Protocol802_11BandEnum::Protocol802_11b; } else if(pThis->Is802_11g()) { byValue = Protocol802_11BandEnum::Protocol802_11g; } else { byValue = Protocol802_11BandEnum::Unknown; } pThis->Unlock(); } catch(...) { pThis->Unlock(); THROWIMEXCEPTION("800431C3"); }}//Encryptionvoid Protocol80211_EncryptionModeClass::GetValueImpl(){ DefaultProtocol802_11InstanceObject* pThis = (DefaultProtocol802_11InstanceObject*)_pThis; try { pThis->Lock(); netdev_dev netdev; if(netdev_get_device(pThis->GetKey().c_str(), netdev) != NETDEV_SUCCESS) { throw; } wnetdev_wep wep; netdev_ret ret; if((ret = wnetdev_get_wep(netdev, wep)) != NETDEV_SUCCESS) { if(ret == NETDEV_FAIL) { this->SetValueImpl(Protocol802_11EncryptionModeEnum::Unknown); return; } this->SetNull(true); return; } if(wep.key_len == 40) { this->SetValueImpl(Protocol802_11EncryptionModeEnum::Wep40); } else if(wep.key_len == 104) { this->SetValueImpl(Protocol802_11EncryptionModeEnum::Wep104); } else { this->SetValueImpl(Protocol802_11EncryptionModeEnum::Unknown); } pThis->Unlock(); } catch(...) { pThis->Unlock(); THROWIMEXCEPTION("800431C3"); }}void Protocol80211_EncryptionModesClass::GetValueImpl(){ DefaultProtocol802_11InstanceObject* pThis = (DefaultProtocol802_11InstanceObject*)_pThis; try { pThis->Lock(); netdev_dev netdev; if(netdev_get_device(pThis->GetKey().c_str(), netdev) != NETDEV_SUCCESS) { throw; } wnetdev_wep wep; netdev_ret ret; if((ret = wnetdev_get_wep(netdev, wep)) == NETDEV_ERROR) { this->SetNull(true); return; } this->Clear(); this->InsertValueImpl(Protocol802_11EncryptionModeEnum::Wep40); this->InsertValueImpl(Protocol802_11EncryptionModeEnum::Wep104); pThis->Unlock(); } catch(...) { pThis->Unlock(); THROWIMEXCEPTION("800431C3"); }}//IBSSTxPower//void Protocol80211_IBSSTxPowerClass::GetValueImpl()//{// this->SetNull( true );//}////bool Protocol80211_IBSSTxPowerClass::SetValueImplOnDevice(IntelMobileUInt nIBSSTxPower)//{// return false;//}//AssociationStatevoid Protocol80211_AssociationStateClass::GetValueImpl(){ DefaultProtocol802_11InstanceObject* pThis = (DefaultProtocol802_11InstanceObject*)_pThis; try { pThis->Lock(); this->SetNull(true); pThis->Unlock(); } catch(...) { pThis->Unlock(); THROWIMEXCEPTION("800431C3"); }}//SecurityModesvoid Protocol80211_SecurityModesClass::GetValueImpl(){ DefaultProtocol802_11InstanceObject* pThis = (DefaultProtocol802_11InstanceObject*)_pThis; try { pThis->Lock(); netdev_dev netdev; if(netdev_get_device(pThis->GetKey().c_str(), netdev) != NETDEV_SUCCESS) { throw; } wnetdev_wep wep; netdev_ret ret; if((ret = wnetdev_get_wep(netdev, wep)) == NETDEV_ERROR) { this->SetNull(true); return; } this->Clear(); this->InsertValueImpl(Protocol802_11SecurityModeEnum::Wep); pThis->Unlock(); } catch(...) { pThis->Unlock(); THROWIMEXCEPTION("800431C3"); }}//Qosvoid Protocol80211_QosClass::GetValueImpl(){ this->SetValueImpl( Protocol802_11QosEnum::Unknown );}void Protocol80211_DataRateTxClass::GetValueImpl(){ DefaultProtocol802_11InstanceObject* pThis = (DefaultProtocol802_11InstanceObject*)_pThis; try { pThis->Lock(); netdev_dev netdev; if(netdev_get_device(pThis->GetKey().c_str(), netdev) != NETDEV_SUCCESS) { throw; } wnetdev_bitrate bitrate; if(wnetdev_get_bitrate(netdev, bitrate) != NETDEV_SUCCESS) { this->SetNull(true); return; } this->SetValueImpl(bitrate); pThis->Unlock(); } catch(...) { pThis->Unlock(); THROWIMEXCEPTION("800431C3"); }}void Protocol80211_DataRateRxClass::GetValueImpl(){ DefaultProtocol802_11InstanceObject* pThis = (DefaultProtocol802_11InstanceObject*)_pThis; try { pThis->Lock(); netdev_dev netdev; if(netdev_get_device(pThis->GetKey().c_str(), netdev) != NETDEV_SUCCESS) { throw; } wnetdev_bitrate bitrate; if(wnetdev_get_bitrate(netdev, bitrate) != NETDEV_SUCCESS) { this->SetNull(true); return; } this->SetValueImpl(bitrate); pThis->Unlock(); } catch(...) { pThis->Unlock(); THROWIMEXCEPTION("800431C3"); }}void Protocol80211_DataTxPacketsClass::GetValueImpl(){ _Log(IntelMobileText("Protocol80211Class::GetValueImpl()")); DefaultProtocol802_11InstanceObject* pThis = (DefaultProtocol802_11InstanceObject*)_pThis; try { pThis->Lock(); netdev_dev netdev; if(netdev_get_device(pThis->GetKey().c_str(), netdev) != NETDEV_SUCCESS) { throw; } netdev_statistics stats; if(netdev_get_statistics(netdev, stats) != NETDEV_SUCCESS) { this->SetNull(true); return; } IntelMobileUInt64 Count = stats.tx_packets; this->SetValueImpl(Count); pThis->Unlock(); } catch(...) { pThis->Unlock(); THROWIMEXCEPTION("800431C3"); }}//DataRxPacketsvoid Protocol80211_DataRxPacketsClass::GetValueImpl(){ //#ifdef _DEBUG _Log(IntelMobileText("Protocol80211Class::GetValueImpl()"));//#endif DefaultProtocol802_11InstanceObject* pThis = (DefaultProtocol802_11InstanceObject*)_pThis; try { pThis->Lock(); netdev_dev netdev; if(netdev_get_device(pThis->GetKey().c_str(), netdev) != NETDEV_SUCCESS) { throw; } netdev_statistics stats; if(netdev_get_statistics(netdev, stats) != NETDEV_SUCCESS) { this->SetNull(true); return; } IntelMobileUInt64 Count = stats.rx_packets; this->SetValueImpl(Count); pThis->Unlock(); } catch(...) { pThis->Unlock(); THROWIMEXCEPTION("800431C3"); }}//DataTxBytesvoid Protocol80211_DataTxBytesClass::GetValueImpl(){ //#ifdef _DEBUG _Log(IntelMobileText("Protocol80211Class::GetValueImpl()"));//#endif DefaultProtocol802_11InstanceObject* pThis = (DefaultProtocol802_11InstanceObject*)_pThis; try { pThis->Lock(); netdev_dev netdev; if(netdev_get_device(pThis->GetKey().c_str(), netdev) != NETDEV_SUCCESS) { throw; } netdev_statistics stats; if(netdev_get_statistics(netdev, stats) != NETDEV_SUCCESS) { this->SetNull(true); return; } IntelMobileUInt64 Count = stats.tx_bytes; this->SetValueImpl(Count); pThis->Unlock(); } catch(...) { pThis->Unlock(); THROWIMEXCEPTION("800431C3"); }}//DataRxBytesvoid Protocol80211_DataRxBytesClass::GetValueImpl(){//#ifdef _DEBUG _Log(IntelMobileText("Protocol80211Class::GetValueImpl()"));//#endif DefaultProtocol802_11InstanceObject* pThis = (DefaultProtocol802_11InstanceObject*)_pThis; try { pThis->Lock(); netdev_dev netdev; if(netdev_get_device(pThis->GetKey().c_str(), netdev) != NETDEV_SUCCESS) { throw; } netdev_statistics stats; if(netdev_get_statistics(netdev, stats) != NETDEV_SUCCESS) { this->SetNull(true); return; } IntelMobileUInt64 Count = stats.rx_bytes; this->SetValueImpl(Count); pThis->Unlock(); } catch(...) { pThis->Unlock(); THROWIMEXCEPTION("800431C3"); }}//LinkQualityvoid Protocol80211_LinkQualityClass::GetValueImpl(){ DefaultProtocol802_11InstanceObject* pThis = (DefaultProtocol802_11InstanceObject*)_pThis; IntelMobileLinkProtocolLinkQualityEnum byValue = LinkProtocolLinkQualityEnum::NoSignalDetected; bool bGotValue = false; if ( NULL != pThis ) { try { pThis->Lock(); this->SetNull( true ); pThis->Unlock(); } catch(...) { pThis->Unlock(); throw "exception"; } } if ( false == bGotValue ) this->SetNull( true ); else this->SetValueImpl( byValue ); }//ResetStatistics()bool DefaultProtocol802_11InstanceObject::ResetStatistics(){ return false;}//ScanAps()std::vector<SApStruct> DefaultProtocol802_11InstanceObject::ScanAps(){ std::vector<SApStruct> vAPs; vAPs = ScanWifiNetwork(GetKey().c_str()); return vAPs; }
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -