Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

wlan_NN.cpp

Go to the documentation of this file.
00001 #include <resources.h>
00002 #include "wlan_NN.h"
00003 #include "wlan_NNI.h"
00004 
00005 #include "netnodeinterface.h"
00006 
00007 static const char * WLanNeeds[] = 
00008     { 0
00009     };
00010 
00011 static const char * WLanProvides[] = 
00012     { "device",
00013       0
00014     };
00015 
00019 WLanNetNode::WLanNetNode() : ANetNode(tr("WLan Device")) {
00020     NSResources->addSystemFile(
00021       "interfaces", "/etc/network/interfaces", 1 );
00022     InstanceCount = 2;
00023 }
00024 
00028 WLanNetNode::~WLanNetNode(){
00029 }
00030 
00031 const QString WLanNetNode::nodeDescription(){
00032       return tr("\
00033 <p>Configure Wi/Fi or WLan network cards.</p>\
00034 <p>Defines Wireless options for those cards</p>\
00035 "
00036 );
00037 }
00038 
00039 ANetNodeInstance * WLanNetNode::createInstance( void ) {
00040       return new AWLan( this );
00041 }
00042 
00043 const char ** WLanNetNode::needs( void ) {
00044       return WLanNeeds;
00045 }
00046 
00047 const char ** WLanNetNode::provides( void ) {
00048       return WLanProvides;
00049 }
00050 
00051 QString WLanNetNode::genNic( long nr ) { 
00052       QString S; 
00053       return S.sprintf( "wlan%ld", nr );
00054 }
00055 
00056 void WLanNetNode::setSpecificAttribute( QString & A, QString & V ) {
00057       if( A == "interfacecount" ) {
00058         InstanceCount = V.toLong();
00059       }
00060 }
00061 
00062 void WLanNetNode::saveSpecificAttribute( QTextStream & TS ) {
00063       TS << "interfacecount="
00064          << InstanceCount
00065          << endl;
00066 }
00067 
00068 OPIE_NS2_PLUGIN( NetNodeInterface_T<WLanNetNode> )

Generated on Sat Nov 5 16:17:56 2005 for OPIE by  doxygen 1.4.2