Parent: [62f79d] (diff)

Download this file

FABase.cc    34 lines (25 with data), 868 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
// This program is free software: you can redistribute it and/or modify
#include "FABase.h"
FABase::FABase() {
this->FaiTable = NULL;
}
FABase::~FABase() {
this->FaiTable = NULL;
}
FAITable* FABase::getFaiTable() const {
return FaiTable;
}
void FABase::initMyAddress() {
//Setup MyAddress
cModule* ipc = this->getParentModule()->getParentModule();
MyAddress = Address(ipc->par(PAR_IPCADDR), ipc->par(PAR_DIFNAME));
EV << "SrcAddress that this FA will use is " << MyAddress << endl;
std::ostringstream description;
description << "address: " << MyAddress.getIpcAddress()
<< "\ndif: " << MyAddress.getDifName();
ipc->getDisplayString().setTagArg("t", 0, description.str().c_str());
ipc->getDisplayString().setTagArg("t", 1, "r");
}
const Address& FABase::getMyAddress() const {
return MyAddress;
}