145 lines
3.0 KiB
C++
145 lines
3.0 KiB
C++
/*
|
|
* File: Node.cc
|
|
* Author: jgaebler
|
|
*
|
|
* Created on December 13, 2012, 3:43 PM
|
|
*/
|
|
|
|
#include "Node.h"
|
|
|
|
namespace ubeeme {
|
|
namespace moversight {
|
|
|
|
Node::Node(std::string & nName) : nodeName(nName), transmissionRange(0), isMobil(false), isAP(false), connectedWith(""), timeLeft(0), connectedTime(0){
|
|
}
|
|
|
|
Node::~Node() {
|
|
}
|
|
|
|
void
|
|
Node::setMacAdress(MACAddress macAdress) {
|
|
this->macAdress = macAdress;
|
|
}
|
|
|
|
MACAddress
|
|
Node::getMacAdress() const {
|
|
return macAdress;
|
|
}
|
|
|
|
void
|
|
Node::setIsAccessPoint(bool flag) {
|
|
this->isAP = flag;
|
|
}
|
|
|
|
bool
|
|
Node::isAccessPoint() const {
|
|
return isAP;
|
|
}
|
|
|
|
void
|
|
Node::setHasMobility(bool hasMobility) {
|
|
this->isMobil = hasMobility;
|
|
}
|
|
|
|
bool
|
|
Node::hasMobility() const {
|
|
return isMobil;
|
|
}
|
|
|
|
void
|
|
Node::setConnectedTime(SimTime connectedTime) {
|
|
this->connectedTime = connectedTime;
|
|
}
|
|
|
|
SimTime
|
|
Node::getConnectedTime() const {
|
|
return connectedTime;
|
|
}
|
|
|
|
void
|
|
Node::setTimeLeft(SimTime timeLeft) {
|
|
this->timeLeft = timeLeft;
|
|
}
|
|
|
|
SimTime
|
|
Node::getTimeLeft() const {
|
|
return timeLeft;
|
|
}
|
|
|
|
void
|
|
Node::setNodeDistanceList(Node::DistanceList & distanceList) {
|
|
nodeDistanceList = distanceList;
|
|
}
|
|
|
|
Node::DistanceList &
|
|
Node::getNodeDistanceList() {
|
|
return nodeDistanceList;
|
|
}
|
|
|
|
void
|
|
Node::setConnectedWith(std::string connectedWith) {
|
|
this->connectedWith = connectedWith;
|
|
}
|
|
|
|
std::string
|
|
Node::getConnectedWith() const {
|
|
return connectedWith;
|
|
}
|
|
|
|
int
|
|
Node::getNumEqualModules() const {
|
|
return nodeDistanceList.size();
|
|
}
|
|
|
|
void
|
|
Node::setCurrentSpeed(Coord currSpeed) {
|
|
this->currSpeed = currSpeed;
|
|
}
|
|
|
|
Coord
|
|
Node::getCurrentSpeed() const {
|
|
return currSpeed;
|
|
}
|
|
|
|
void
|
|
Node::setCurrentPosition(Coord currPosition) {
|
|
this->currPosition = currPosition;
|
|
}
|
|
|
|
Coord
|
|
Node::getCurrentPosition() const {
|
|
return currPosition;
|
|
}
|
|
|
|
void
|
|
Node::setTransmissionRange(double transmissRange) {
|
|
this->transmissionRange = transmissRange;
|
|
}
|
|
|
|
double
|
|
Node::getTransmissionRange() const {
|
|
return transmissionRange;
|
|
}
|
|
|
|
void
|
|
Node::setRadioModule(cModule * radioModule) {
|
|
this->radioModule = radioModule;
|
|
}
|
|
|
|
cModule *
|
|
Node::getRadioModule() const {
|
|
return radioModule;
|
|
}
|
|
|
|
void
|
|
Node::setNodeName(std::string nodeName) {
|
|
this->nodeName = nodeName;
|
|
}
|
|
|
|
std::string
|
|
Node::getNodeName() const {
|
|
return nodeName;
|
|
}
|
|
}
|
|
}
|