Skip to content

Instantly share code, notes, and snippets.

@ymirpl
Created February 25, 2012 12:11
Show Gist options
  • Save ymirpl/1908133 to your computer and use it in GitHub Desktop.
Save ymirpl/1908133 to your computer and use it in GitHub Desktop.
pppGAL.h
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with this program. If not, see http://www.gnu.org/licenses/.
//
/** DEPRECATED **/
#ifndef __INET_PPPGAL_H_
#define __INET_PPPGAL_H_
#include <omnetpp.h>
#include "ModuleAccess.h"
#include <vector>
/**
* TODO - Write some comments
*/
class INET_API PppGAL : public cSimpleModule
{
public:
PppGAL() {}
long getDatarateInEAS(int eas);
struct EASEntry
{
int id;
double power;
long int datarate;
};
protected:
std::vector<EASEntry> states;
protected:
void readStatesFromXML(const cXMLElement *states);
void readEASFromXML(const cXMLElement *fec);
virtual void initialize(int stage);
virtual void handleMessage(cMessage *msg);
};
/**
* Gives access to the GAL.
*/
class INET_API PppGALAccess : public ModuleAccess<PppGAL>
{
public:
PppGALAccess() : ModuleAccess<PppGAL>("pppGAL") {}
};
#endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment