DlMapIeNum_link* Mac802_16::SearchDlMapIeNum_link(int NodeID)
{
DlMapIeNum_link* tmp = DlMapIeNum_link_head;
while(tmp) {
if(tmp->NodeID == NodeID)
return tmp;
tmp = tmp->next;
}
return NULL;
}
2007年3月22日 星期四
SearchUlMapIeNum_link(int NodeID)
UlMapIeNum_link* Mac802_16::SearchUlMapIeNum_link(int NodeID)
{
UlMapIeNum_link* tmp = UlMapIeNum_link_head;
while(tmp){
if(tmp->NodeID == NodeID)
return tmp;
tmp = tmp->next;
}
return NULL;
}
{
UlMapIeNum_link* tmp = UlMapIeNum_link_head;
while(tmp){
if(tmp->NodeID == NodeID)
return tmp;
tmp = tmp->next;
}
return NULL;
}
CreateDlMapIeNum_link(int NodeID)
DlMapIeNum_link* Mac802_16::CreateDlMapIeNum_link(int NodeID)
{
DlMapIeNum_link* tmp = new DlMapIeNum_link;
tmp->NodeID = NodeID;
tmp->DlMapIeNum = 0;
if(!DlMapIeNum_link_head) {
DlMapIeNum_link_head = DlMapIeNum_link_tail = tmp;
tmp->next = NULL;
}
else {
DlMapIeNum_link_tail->next = tmp;
DlMapIeNum_link_tail = tmp;
tmp->next = NULL;
}
return tmp;
}
{
DlMapIeNum_link* tmp = new DlMapIeNum_link;
tmp->NodeID = NodeID;
tmp->DlMapIeNum = 0;
if(!DlMapIeNum_link_head) {
DlMapIeNum_link_head = DlMapIeNum_link_tail = tmp;
tmp->next = NULL;
}
else {
DlMapIeNum_link_tail->next = tmp;
DlMapIeNum_link_tail = tmp;
tmp->next = NULL;
}
return tmp;
}
CreateUlMapIeNum_link(int NodeID)
UlMapIeNum_link* Mac802_16::CreateUlMapIeNum_link(int NodeID)
{
UlMapIeNum_link* tmp = new UlMapIeNum_link;
tmp->NodeID = NodeID;
tmp->UlMapIeNum = 0;
if(!UlMapIeNum_link_head) {
UlMapIeNum_link_head = UlMapIeNum_link_tail = tmp;
tmp->next = NULL;
}
else {
UlMapIeNum_link_tail->next = tmp;
UlMapIeNum_link_tail = tmp;
tmp->next = NULL;
}
return tmp;
}
{
UlMapIeNum_link* tmp = new UlMapIeNum_link;
tmp->NodeID = NodeID;
tmp->UlMapIeNum = 0;
if(!UlMapIeNum_link_head) {
UlMapIeNum_link_head = UlMapIeNum_link_tail = tmp;
tmp->next = NULL;
}
else {
UlMapIeNum_link_tail->next = tmp;
UlMapIeNum_link_tail = tmp;
tmp->next = NULL;
}
return tmp;
}
SearchUlAvailSymbol_link(int NodeID)
UlAvailSymbol_link* Mac802_16::SearchUlAvailSymbol_link(int NodeID)
{
UlAvailSymbol_link* tmp = UlAvailSymbol_link_head;
while(tmp) {
if(tmp->NodeID == NodeID)
return tmp;
tmp = tmp->next;
}
return NULL;
}
{
UlAvailSymbol_link* tmp = UlAvailSymbol_link_head;
while(tmp) {
if(tmp->NodeID == NodeID)
return tmp;
tmp = tmp->next;
}
return NULL;
}
SearchDlAvailSymbol_link(int NodeID)
DlAvailSymbol_link* Mac802_16::SearchDlAvailSymbol_link(int NodeID)
{
DlAvailSymbol_link* tmp = DlAvailSymbol_link_head;
while(tmp){
if(tmp->NodeID == NodeID)
return tmp;
tmp = tmp->next;
}
return NULL;
}
{
DlAvailSymbol_link* tmp = DlAvailSymbol_link_head;
while(tmp){
if(tmp->NodeID == NodeID)
return tmp;
tmp = tmp->next;
}
return NULL;
}
CreateUlAvailSymbol_link(int NodeID)
UlAvailSymbol_link* Mac802_16::CreateUlAvailSymbol_link(int NodeID)
{
UlAvailSymbol_link *tmp = new UlAvailSymbol_link;
if(!UlAvailSymbol_link_head) {
tmp->NodeID = NodeID;
tmp->UlAvailSymbol = 0;
UlAvailSymbol_link_head = UlAvailSymbol_link_tail = tmp;
tmp->next = NULL;
return tmp;
}
else {
UlAvailSymbol_link *pt = UlAvailSymbol_link_head;
while(pt) {
if(pt->NodeID == NodeID) {
return pt;
}
pt = pt->next;
}
tmp->NodeID = NodeID;
tmp->UlAvailSymbol = 0;
UlAvailSymbol_link_tail->next = tmp;
UlAvailSymbol_link_tail = tmp;
tmp->next = NULL;
return tmp;
}
}
{
UlAvailSymbol_link *tmp = new UlAvailSymbol_link;
if(!UlAvailSymbol_link_head) {
tmp->NodeID = NodeID;
tmp->UlAvailSymbol = 0;
UlAvailSymbol_link_head = UlAvailSymbol_link_tail = tmp;
tmp->next = NULL;
return tmp;
}
else {
UlAvailSymbol_link *pt = UlAvailSymbol_link_head;
while(pt) {
if(pt->NodeID == NodeID) {
return pt;
}
pt = pt->next;
}
tmp->NodeID = NodeID;
tmp->UlAvailSymbol = 0;
UlAvailSymbol_link_tail->next = tmp;
UlAvailSymbol_link_tail = tmp;
tmp->next = NULL;
return tmp;
}
}
CreateDlAvailSymbol_link(int NodeID)
DlAvailSymbol_link* Mac802_16::CreateDlAvailSymbol_link(int NodeID)
{
DlAvailSymbol_link *tmp = new DlAvailSymbol_link;
if(!DlAvailSymbol_link_head) {
tmp->NodeID = NodeID;
tmp->DlAvailSymbol = 0;
DlAvailSymbol_link_head = DlAvailSymbol_link_tail = tmp;
tmp->next = NULL;
return tmp;
}
else {
DlAvailSymbol_link *pt = DlAvailSymbol_link_head;
while(pt) {
if(pt->NodeID == NodeID) {
return pt;
}
pt = pt->next;
}
tmp->NodeID = NodeID;
tmp->DlAvailSymbol = 0;
DlAvailSymbol_link_tail->next = tmp;
DlAvailSymbol_link_tail = tmp;
tmp->next = NULL;
return tmp;
}
}
{
DlAvailSymbol_link *tmp = new DlAvailSymbol_link;
if(!DlAvailSymbol_link_head) {
tmp->NodeID = NodeID;
tmp->DlAvailSymbol = 0;
DlAvailSymbol_link_head = DlAvailSymbol_link_tail = tmp;
tmp->next = NULL;
return tmp;
}
else {
DlAvailSymbol_link *pt = DlAvailSymbol_link_head;
while(pt) {
if(pt->NodeID == NodeID) {
return pt;
}
pt = pt->next;
}
tmp->NodeID = NodeID;
tmp->DlAvailSymbol = 0;
DlAvailSymbol_link_tail->next = tmp;
DlAvailSymbol_link_tail = tmp;
tmp->next = NULL;
return tmp;
}
}
UlMapIeNum_link
struct UlMapIeNum_link {
UlMapIeNum_link() {next = NULL;}
int NodeID;
int UlMapIeNum;
UlMapIeNum_link *next;
};
UlMapIeNum_link() {next = NULL;}
int NodeID;
int UlMapIeNum;
UlMapIeNum_link *next;
};
DlMapIeNum_link
struct DlMapIeNum_link {
DlMapIeNum_link() {next = NULL;}
int NodeID;
int DlMapIeNum;
DlMapIeNum_link *next;
};
DlMapIeNum_link() {next = NULL;}
int NodeID;
int DlMapIeNum;
DlMapIeNum_link *next;
};
UlAvailSymbol_link
struct UlAvailSymbol_link {
UlAvailSymbol_link() {next = NULL;}
int NodeID;
int UlAvailSymbol;
UlAvailSymbol_link *next;
};
UlAvailSymbol_link() {next = NULL;}
int NodeID;
int UlAvailSymbol;
UlAvailSymbol_link *next;
};
DlAvailSymbol_link
struct DlAvailSymbol_link {
DlAvailSymbol_link() {next = NULL;}
int NodeID;
int DlAvailSymbol;
DlAvailSymbol_link *next;
};
DlAvailSymbol_link() {next = NULL;}
int NodeID;
int DlAvailSymbol;
DlAvailSymbol_link *next;
};
2007年3月21日 星期三
SearchAllocationStartTime(int NodeID)
AllocationStartTime_link* Mac802_16::SearchAllocationStartTime(int NodeID)
{
AllocationStartTime_link *tmp = AllocationStartTime_link_head;
while(tmp) {
if(tmp->NodeID == NodeID) {
return tmp;
}
tmp = tmp->next;
}
return NULL;
}
{
AllocationStartTime_link *tmp = AllocationStartTime_link_head;
while(tmp) {
if(tmp->NodeID == NodeID) {
return tmp;
}
tmp = tmp->next;
}
return NULL;
}
CreateAllocationStartTime(int NodeID)
AllocationStartTime_link* Mac802_16::CreateAllocationStartTime(int NodeID)
{
AllocationStartTime_link *tmp = new AllocationStartTime_link;
tmp->NodeID = NodeID;
tmp->AllocationStartTime = 0;
if(!AllocationStartTime_link_head) {
AllocationStartTime_link_head = AllocationStartTime_link_tail = tmp;
tmp->next = NULL;
}
else {
AllocationStartTime_link_tail->next = tmp;
AllocationStartTime_link_tail = tmp;
tmp->next = NULL;
}
return tmp;
}
{
AllocationStartTime_link *tmp = new AllocationStartTime_link;
tmp->NodeID = NodeID;
tmp->AllocationStartTime = 0;
if(!AllocationStartTime_link_head) {
AllocationStartTime_link_head = AllocationStartTime_link_tail = tmp;
tmp->next = NULL;
}
else {
AllocationStartTime_link_tail->next = tmp;
AllocationStartTime_link_tail = tmp;
tmp->next = NULL;
}
return tmp;
}
2007年3月20日 星期二
2007年3月17日 星期六
ns2 得知 signal power
The propagation model in mobilenode computes the signal power. see
~ns/mobile/propagation.*
DeleteUlMapIe(int NodeID)
void Mac802_16::DeleteUlMapIe(int NodeID)
{
UlMapIe_link *pt = UlMapIe_link_head;
UlMapIe_link *backup,*tmp;
backup = tmp = NULL;
while(pt) {
if(pt->NodeID == NodeID) {
backup = pt->next;
delete pt;
if(!tmp)
UlMapIe_link_head = backup;
else
tmp->next = backup;
return;
}
tmp = pt;
pt = pt->next;
}
return;
}
{
UlMapIe_link *pt = UlMapIe_link_head;
UlMapIe_link *backup,*tmp;
backup = tmp = NULL;
while(pt) {
if(pt->NodeID == NodeID) {
backup = pt->next;
delete pt;
if(!tmp)
UlMapIe_link_head = backup;
else
tmp->next = backup;
return;
}
tmp = pt;
pt = pt->next;
}
return;
}
DeleteDlMapIe(int NodeID)
void Mac802_16::DeleteDlMapIe(int NodeID)
{
DlMapIe_link *pt = DlMapIe_link_head;
DlMapIe_link *backup,*tmp;
backup = tmp = NULL;
while(pt) {
if(pt->NodeID == NodeID) {
backup = pt->next;
delete pt;
if(!tmp)
DlMapIe_link_head = backup;
else
tmp->next = backup;
return;
}
tmp = pt;
pt = pt->next;
}
return;
}
{
DlMapIe_link *pt = DlMapIe_link_head;
DlMapIe_link *backup,*tmp;
backup = tmp = NULL;
while(pt) {
if(pt->NodeID == NodeID) {
backup = pt->next;
delete pt;
if(!tmp)
DlMapIe_link_head = backup;
else
tmp->next = backup;
return;
}
tmp = pt;
pt = pt->next;
}
return;
}
2007年3月16日 星期五
CreateDlBurstProfile_link(int NodeID)
DownlinkBurstProfile* Mac802_16::CreateDlBurstProfile_link(int NodeID)
{
DownlinkBurstProfile_link *tmp = new DownlinkBurstProfile_link;
DownlinkBurstProfile *tmp2 = new DownlinkBurstProfile;
tmp->NodeID = NodeID;
if(!DownlinkBurstProfile_link_head) {
tmp->DlBurstProfile_head = tmp->DlBurstProfile_tail = tmp2;
tmp2->next = NULL;
DownlinkBurstProfile_link_head = DownlinkBurstProfile_link_tail = tmp;
tmp->next = NULL;
return tmp2;
}
else {
DownlinkBurstProfile_link *pt = DownlinkBurstProfile_link_head;
while(pt) {
if(pt->NodeID == NodeID) {
pt->DlBurstProfile_tail->next = tmp2;
pt->DlBurstProfile_tail = tmp2;
tmp2->next = NULL;
return tmp2;
}
pt = pt->next;
}
tmp->DlBurstProfile_head = tmp->DlBurstProfile_tail = tmp2;
tmp2->next = NULL;
DownlinkBurstProfile_link_tail->next = tmp;
DownlinkBurstProfile_link_tail = tmp;
tmp->next = NULL;
return tmp2;
}
}
{
DownlinkBurstProfile_link *tmp = new DownlinkBurstProfile_link;
DownlinkBurstProfile *tmp2 = new DownlinkBurstProfile;
tmp->NodeID = NodeID;
if(!DownlinkBurstProfile_link_head) {
tmp->DlBurstProfile_head = tmp->DlBurstProfile_tail = tmp2;
tmp2->next = NULL;
DownlinkBurstProfile_link_head = DownlinkBurstProfile_link_tail = tmp;
tmp->next = NULL;
return tmp2;
}
else {
DownlinkBurstProfile_link *pt = DownlinkBurstProfile_link_head;
while(pt) {
if(pt->NodeID == NodeID) {
pt->DlBurstProfile_tail->next = tmp2;
pt->DlBurstProfile_tail = tmp2;
tmp2->next = NULL;
return tmp2;
}
pt = pt->next;
}
tmp->DlBurstProfile_head = tmp->DlBurstProfile_tail = tmp2;
tmp2->next = NULL;
DownlinkBurstProfile_link_tail->next = tmp;
DownlinkBurstProfile_link_tail = tmp;
tmp->next = NULL;
return tmp2;
}
}
CreateUlBurstProfile_link(int NodeID)
UplinkBurstProfile* Mac802_16::CreateUlBurstProfile_link(int NodeID)
{
UplinkBurstProfile_link *tmp = new UplinkBurstProfile_link;
UplinkBurstProfile *tmp2 = new UplinkBurstProfile;
tmp->NodeID = NodeID;
if(!UplinkBurstProfile_link_head) {
tmp->UlBurstProfile_head = tmp->UlBurstProfile_tail = tmp2;
tmp2->next = NULL;
UplinkBurstProfile_link_head = UplinkBurstProfile_link_tail = tmp;
tmp->next = NULL;
return tmp2;
}
else {
UplinkBurstProfile_link *pt = UplinkBurstProfile_link_head;
while(pt) {
if(pt->NodeID == NodeID) {
pt->UlBurstProfile_tail->next = tmp2;
pt->UlBurstProfile_tail = tmp2;
tmp2->next = NULL;
return tmp2;
}
pt = pt->next;
}
tmp->UlBurstProfile_head = tmp->UlBurstProfile_tail = tmp2;
tmp2->next = NULL;
UplinkBurstProfile_link_tail->next = tmp;
UplinkBurstProfile_link_tail = tmp;
tmp->next = NULL;
return tmp2;
}
}
{
UplinkBurstProfile_link *tmp = new UplinkBurstProfile_link;
UplinkBurstProfile *tmp2 = new UplinkBurstProfile;
tmp->NodeID = NodeID;
if(!UplinkBurstProfile_link_head) {
tmp->UlBurstProfile_head = tmp->UlBurstProfile_tail = tmp2;
tmp2->next = NULL;
UplinkBurstProfile_link_head = UplinkBurstProfile_link_tail = tmp;
tmp->next = NULL;
return tmp2;
}
else {
UplinkBurstProfile_link *pt = UplinkBurstProfile_link_head;
while(pt) {
if(pt->NodeID == NodeID) {
pt->UlBurstProfile_tail->next = tmp2;
pt->UlBurstProfile_tail = tmp2;
tmp2->next = NULL;
return tmp2;
}
pt = pt->next;
}
tmp->UlBurstProfile_head = tmp->UlBurstProfile_tail = tmp2;
tmp2->next = NULL;
UplinkBurstProfile_link_tail->next = tmp;
UplinkBurstProfile_link_tail = tmp;
tmp->next = NULL;
return tmp2;
}
}
SearchDlBurstProfile(int NodeID)
DownlinkBurstProfile_link* Mac802_16::SearchDlBurstProfile(int NodeID)
{
DownlinkBurstProfile_link *tmp = DownlinkBurstProfile_link_head;
while(tmp) {
if(tmp->NodeID == NodeID) {
return tmp;
}
tmp = tmp->next;
}
return NULL;
}
{
DownlinkBurstProfile_link *tmp = DownlinkBurstProfile_link_head;
while(tmp) {
if(tmp->NodeID == NodeID) {
return tmp;
}
tmp = tmp->next;
}
return NULL;
}
SearchUlBurstProfile(int NodeID)
UplinkBurstProfile_link* Mac802_16::SearchUlBurstProfile(int NodeID)
{
UplinkBurstProfile_link *tmp = UplinkBurstProfile_link_head;
while(tmp) {
if(tmp->NodeID == NodeID)
return tmp;
tmp = tmp->next;
}
return NULL;
}
{
UplinkBurstProfile_link *tmp = UplinkBurstProfile_link_head;
while(tmp) {
if(tmp->NodeID == NodeID)
return tmp;
tmp = tmp->next;
}
return NULL;
}
CreateBsServiceFlow_link(int NodeID)
BsServiceFlow* Mac802_16::CreateBsServiceFlow_link(int NodeID)
{
BsServiceFlow_link *tmp = new BsServiceFlow_link;
BsServiceFlow *tmp2 = new BsServiceFlow;
tmp->NodeID = NodeID;
if(!BsSF_link_head) {
tmp->BsSF_head = tmp->BsSF_tail = tmp2;
tmp2->next = NULL;
BsSF_link_head = BsSF_link_tail = tmp;
tmp->next = NULL;
return tmp2;
}
else {
BsServiceFlow_link *pt = BsSF_link_head;
while(pt) {
if(pt->NodeID == NodeID) {
pt->BsSF_tail->next = tmp2;
pt->BsSF_tail = tmp2;
tmp2->next = NULL;
return tmp2;
}
pt = pt->next;
}
tmp->BsSF_head = tmp->BsSF_tail = tmp2;
tmp2->next = NULL;
BsSF_link_tail->next = tmp;
BsSF_link_tail = tmp;
tmp->next = NULL;
return tmp2;
}
}
{
BsServiceFlow_link *tmp = new BsServiceFlow_link;
BsServiceFlow *tmp2 = new BsServiceFlow;
tmp->NodeID = NodeID;
if(!BsSF_link_head) {
tmp->BsSF_head = tmp->BsSF_tail = tmp2;
tmp2->next = NULL;
BsSF_link_head = BsSF_link_tail = tmp;
tmp->next = NULL;
return tmp2;
}
else {
BsServiceFlow_link *pt = BsSF_link_head;
while(pt) {
if(pt->NodeID == NodeID) {
pt->BsSF_tail->next = tmp2;
pt->BsSF_tail = tmp2;
tmp2->next = NULL;
return tmp2;
}
pt = pt->next;
}
tmp->BsSF_head = tmp->BsSF_tail = tmp2;
tmp2->next = NULL;
BsSF_link_tail->next = tmp;
BsSF_link_tail = tmp;
tmp->next = NULL;
return tmp2;
}
}
SearchBsServiceFlow_link(int NodeID)
BsServiceFlow_link* Mac802_16::SearchBsServiceFlow_link(int NodeID)
{
BsServiceFlow_link *tmp = BsSF_link_head;
while(tmp) {
if(tmp->NodeID == NodeID)
return tmp;
tmp = tmp->next;
}
return NULL;
}
{
BsServiceFlow_link *tmp = BsSF_link_head;
while(tmp) {
if(tmp->NodeID == NodeID)
return tmp;
tmp = tmp->next;
}
return NULL;
}
CreateBsSsInfo_link(int NodeID)
BsSsInfo* Mac802_16::CreateBsSsInfo_link(int NodeID)
{
BsSsInfo_link *tmp = new BsSsInfo_link;
BsSsInfo *tmp2 = new BsSsInfo;
tmp->NodeID = NodeID;
if(!BsSsInfo_link_head) {
tmp->BsSsInfo_head = tmp->BsSsInfo_tail = tmp2;
tmp2->next = NULL;
BsSsInfo_link_head = BsSsInfo_link_tail = tmp;
tmp->next = NULL;
return tmp2;
}
else {
BsSsInfo_link *pt = BsSsInfo_link_head;
while(pt) {
if(pt->NodeID == NodeID) {
pt->BsSsInfo_tail->next = tmp2;
pt->BsSsInfo_tail = tmp2;
tmp2->next = NULL;
return tmp2;
}
pt = pt->next;
}
tmp->BsSsInfo_head = tmp->BsSsInfo_tail = tmp2;
tmp2->next = NULL;
BsSsInfo_link_tail->next = tmp;
BsSsInfo_link_tail = tmp;
tmp->next = NULL;
return tmp2;
}
}
{
BsSsInfo_link *tmp = new BsSsInfo_link;
BsSsInfo *tmp2 = new BsSsInfo;
tmp->NodeID = NodeID;
if(!BsSsInfo_link_head) {
tmp->BsSsInfo_head = tmp->BsSsInfo_tail = tmp2;
tmp2->next = NULL;
BsSsInfo_link_head = BsSsInfo_link_tail = tmp;
tmp->next = NULL;
return tmp2;
}
else {
BsSsInfo_link *pt = BsSsInfo_link_head;
while(pt) {
if(pt->NodeID == NodeID) {
pt->BsSsInfo_tail->next = tmp2;
pt->BsSsInfo_tail = tmp2;
tmp2->next = NULL;
return tmp2;
}
pt = pt->next;
}
tmp->BsSsInfo_head = tmp->BsSsInfo_tail = tmp2;
tmp2->next = NULL;
BsSsInfo_link_tail->next = tmp;
BsSsInfo_link_tail = tmp;
tmp->next = NULL;
return tmp2;
}
}
SearchBsSsInfo(int NodeID)
BsSsInfo_link* Mac802_16::SearchBsSsInfo(int NodeID)
{
BsSsInfo_link *tmp = BsSsInfo_link_head;
while(tmp) {
if(tmp->NodeID == NodeID) {
return tmp;
}
tmp = tmp->next;
}
return NULL;
}
{
BsSsInfo_link *tmp = BsSsInfo_link_head;
while(tmp) {
if(tmp->NodeID == NodeID) {
return tmp;
}
tmp = tmp->next;
}
return NULL;
}
DeleteUlBurstProfile(int NodeID)
void Mac802_16::DeleteUlBurstProfile(int NodeID)
{
UplinkBurstProfile_link *tmp,*backup;
UplinkBurstProfile_link *pt = UplinkBurstProfile_link_head;
tmp = backup = NULL;
if(UplinkBurstProfile_link_head) {
while(pt) {
if(pt->NodeID == NodeID) {
backup = pt->next;
delete pt;
if(!tmp)
UplinkBurstProfile_link_head = backup;
else
tmp->next = backup;
return ;
}
tmp = pt;
pt = pt->next;
}
return;
}
else
return;
}
{
UplinkBurstProfile_link *tmp,*backup;
UplinkBurstProfile_link *pt = UplinkBurstProfile_link_head;
tmp = backup = NULL;
if(UplinkBurstProfile_link_head) {
while(pt) {
if(pt->NodeID == NodeID) {
backup = pt->next;
delete pt;
if(!tmp)
UplinkBurstProfile_link_head = backup;
else
tmp->next = backup;
return ;
}
tmp = pt;
pt = pt->next;
}
return;
}
else
return;
}
DeleteDlBurstProfile(int NodeID)
void Mac802_16::DeleteDlBurstProfile(int NodeID)
{
DownlinkBurstProfile_link *tmp,*backup;
DownlinkBurstProfile_link *pt = DownlinkBurstProfile_link_head;
tmp = backup = NULL;
if(DownlinkBurstProfile_link_head) {
while(pt) {
if(pt->NodeID == NodeID) {
backup = pt->next;
delete pt;
if(!tmp)
DownlinkBurstProfile_link_head = backup;
else
tmp->next = backup;
return;
}
tmp = pt;
pt = pt->next;
}
return;
}
else
return;
}
{
DownlinkBurstProfile_link *tmp,*backup;
DownlinkBurstProfile_link *pt = DownlinkBurstProfile_link_head;
tmp = backup = NULL;
if(DownlinkBurstProfile_link_head) {
while(pt) {
if(pt->NodeID == NodeID) {
backup = pt->next;
delete pt;
if(!tmp)
DownlinkBurstProfile_link_head = backup;
else
tmp->next = backup;
return;
}
tmp = pt;
pt = pt->next;
}
return;
}
else
return;
}
CreateSsServiceFlow(int NodeID)
SsServiceFlow* Mac802_16::CreateSsServiceFlow(int NodeID)
{
SsServiceFlow_link *tmp = new SsServiceFlow_link;
SsServiceFlow *tmp2 = new SsServiceFlow;
if(!SsSF_link_head) {
tmp->NodeID = NodeID;
tmp->SsSF_head = tmp->SsSF_tail = tmp2;
tmp2->next = NULL;
SsSF_link_head = SsSF_link_tail = tmp;
tmp->next = NULL;
}
else {
SsServiceFlow_link *pt = SsSF_link_head;
while(pt) {
if(pt->NodeID == NodeID){
pt->SsSF_tail->next = tmp2;
pt->SsSF_tail = tmp2;
tmp2->next = NULL;
return tmp2;
}
pt = pt->next;
}
tmp->NodeID = NodeID;
tmp->SsSF_head = tmp->SsSF_tail = tmp2;
tmp2->next = NULL;
SsSF_link_tail->next = tmp;
SsSF_link_tail = tmp;
tmp->next = NULL;
return tmp2;
}
}
{
SsServiceFlow_link *tmp = new SsServiceFlow_link;
SsServiceFlow *tmp2 = new SsServiceFlow;
if(!SsSF_link_head) {
tmp->NodeID = NodeID;
tmp->SsSF_head = tmp->SsSF_tail = tmp2;
tmp2->next = NULL;
SsSF_link_head = SsSF_link_tail = tmp;
tmp->next = NULL;
}
else {
SsServiceFlow_link *pt = SsSF_link_head;
while(pt) {
if(pt->NodeID == NodeID){
pt->SsSF_tail->next = tmp2;
pt->SsSF_tail = tmp2;
tmp2->next = NULL;
return tmp2;
}
pt = pt->next;
}
tmp->NodeID = NodeID;
tmp->SsSF_head = tmp->SsSF_tail = tmp2;
tmp2->next = NULL;
SsSF_link_tail->next = tmp;
SsSF_link_tail = tmp;
tmp->next = NULL;
return tmp2;
}
}
SsServiceFlow_link
struct SsServiceFlow_link {
SsServiceFlow_link() {next = NULL;}
int NodeID;
SsServiceFlow *SsSF_head;
SsServiceFlow *SsSF_tail;
SsServiceFlow_link *next;
};
SsServiceFlow_link() {next = NULL;}
int NodeID;
SsServiceFlow *SsSF_head;
SsServiceFlow *SsSF_tail;
SsServiceFlow_link *next;
};
BsSsInfo_link
struct BsSsInfo_link {
BsSsInfo_link() {next = NULL;}
int NodeID;
BsSsInfo *BsSsInfo_head;
BsSsInfo *BsSsInfo_tail;
BsSsInfo_link *next;
};
BsSsInfo_link() {next = NULL;}
int NodeID;
BsSsInfo *BsSsInfo_head;
BsSsInfo *BsSsInfo_tail;
BsSsInfo_link *next;
};
BsServiceFlow_link
struct BsServiceFlow_link {
BsServiceFlow_link() {next = NULL;}
int NodeID;
BsServiceFlow *BsSF_head;
BsServiceFlow *BsSF_tail;
BsServiceFlow_link *next;
};
BsServiceFlow_link() {next = NULL;}
int NodeID;
BsServiceFlow *BsSF_head;
BsServiceFlow *BsSF_tail;
BsServiceFlow_link *next;
};
UplinkBurstProfile_link {
struct UplinkBurstProfile_link {
UplinkBurstProfile_link() {next = NULL;}
int NodeID;
UplinkBurstProfile *UlBurstProfile_head;
UplinkBurstProfile *UlBurstProfile_tail;
UplinkBurstProfile_link *next;
};
UplinkBurstProfile_link() {next = NULL;}
int NodeID;
UplinkBurstProfile *UlBurstProfile_head;
UplinkBurstProfile *UlBurstProfile_tail;
UplinkBurstProfile_link *next;
};
DownlinkBurstProfile_link
struct DownlinkBurstProfile_link {
DownlinkBurstProfile_link () {next = NULL;}
int NodeID;
DownlinkBurstProfile *DlBurstProfile_head;
DownlinkBurstProfile *DlBurstProfile_tail;
DownlinkBurstProfile_link *next;
};
DownlinkBurstProfile_link () {next = NULL;}
int NodeID;
DownlinkBurstProfile *DlBurstProfile_head;
DownlinkBurstProfile *DlBurstProfile_tail;
DownlinkBurstProfile_link *next;
};
2007年3月12日 星期一
CreateUlMapIe_link(int NodeID)
UlMapIe* Mac802_16::CreateUlMapIe_link(int NodeID)
{
UlMapIe_link *tmp = new UlMapIe_link;
UlMapIe *tmp2 = new UlMapIe;
if (!UlMapIe_link_head) {
tmp->NodeID = NodeID;
//Each Bs UlMapIe data
tmp->UlMapIe_head = tmp->UlMapIe_tail = tmp2;
tmp2->next = NULL;
UlMapIe_link_head = UlMapIe_link_tail = tmp;
tmp->next = NULL;
return tmp2;
}
else {//已經有資料在link裡面 尋找是否有該node資料
UlMapIe_link *pt = UlMapIe_link_head;
//
while(pt) {
if(pt->NodeID == NodeID) {
pt->UlMapIe_tail->next = tmp2;
pt->UlMapIe_tail = tmp2;
tmp2->next = NULL;
return tmp2;
}
pt = pt->next;
}
////沒找到該NodeID的資料 因此建立新的link data
tmp->NodeID = NodeID;
tmp->UlMapIe_head = tmp->UlMapIe_tail = tmp2;
tmp2->next = NULL;
UlMapIe_link_tail->next = tmp;
UlMapIe_link_tail = tmp;
tmp->next = NULL;
return tmp2;
}
}
{
UlMapIe_link *tmp = new UlMapIe_link;
UlMapIe *tmp2 = new UlMapIe;
if (!UlMapIe_link_head) {
tmp->NodeID = NodeID;
//Each Bs UlMapIe data
tmp->UlMapIe_head = tmp->UlMapIe_tail = tmp2;
tmp2->next = NULL;
UlMapIe_link_head = UlMapIe_link_tail = tmp;
tmp->next = NULL;
return tmp2;
}
else {//已經有資料在link裡面 尋找是否有該node資料
UlMapIe_link *pt = UlMapIe_link_head;
//
while(pt) {
if(pt->NodeID == NodeID) {
pt->UlMapIe_tail->next = tmp2;
pt->UlMapIe_tail = tmp2;
tmp2->next = NULL;
return tmp2;
}
pt = pt->next;
}
////沒找到該NodeID的資料 因此建立新的link data
tmp->NodeID = NodeID;
tmp->UlMapIe_head = tmp->UlMapIe_tail = tmp2;
tmp2->next = NULL;
UlMapIe_link_tail->next = tmp;
UlMapIe_link_tail = tmp;
tmp->next = NULL;
return tmp2;
}
}
CreateDlMapIe_link(int NodeID)
DlMapIe* Mac802_16::CreateDlMapIe_link(int NodeID)
{
DlMapIe_link *tmp = new DlMapIe_link;
DlMapIe *tmp2 = new DlMapIe;
if (!DlMapIe_link_head) {
tmp->NodeID = NodeID;
//Each Bs DlMapIe data
tmp->DlMapIe_head = tmp->DlMapIe_tail = tmp2;
tmp2->next = NULL;
DlMapIe_link_head = DlMapIe_link_tail = tmp;
tmp->next = NULL;
return tmp2;
}else {
DlMapIe_link *pt = DlMapIe_link_head;
while(pt) {
if(pt->NodeID == NodeID) {
pt->DlMapIe_tail->next = tmp2;
pt->DlMapIe_tail = tmp2;
tmp2->next = NULL;
return tmp2;
}
pt = pt->next;
}
tmp->NodeID = NodeID;
tmp->DlMapIe_head = tmp->DlMapIe_tail = tmp2;
tmp2->next = NULL;
DlMapIe_link_tail->next = tmp;
DlMapIe_link_tail = tmp;
tmp->next = NULL;
return tmp2;
}
}
{
DlMapIe_link *tmp = new DlMapIe_link;
DlMapIe *tmp2 = new DlMapIe;
if (!DlMapIe_link_head) {
tmp->NodeID = NodeID;
//Each Bs DlMapIe data
tmp->DlMapIe_head = tmp->DlMapIe_tail = tmp2;
tmp2->next = NULL;
DlMapIe_link_head = DlMapIe_link_tail = tmp;
tmp->next = NULL;
return tmp2;
}else {
DlMapIe_link *pt = DlMapIe_link_head;
while(pt) {
if(pt->NodeID == NodeID) {
pt->DlMapIe_tail->next = tmp2;
pt->DlMapIe_tail = tmp2;
tmp2->next = NULL;
return tmp2;
}
pt = pt->next;
}
tmp->NodeID = NodeID;
tmp->DlMapIe_head = tmp->DlMapIe_tail = tmp2;
tmp2->next = NULL;
DlMapIe_link_tail->next = tmp;
DlMapIe_link_tail = tmp;
tmp->next = NULL;
return tmp2;
}
}
SearchUlMapIe(int NodeID)
UlMapIe_link* Mac802_16::SearchUlMapIe(int NodeID)
{//printf("start search ul %d\n",NodeID);
if(UlMapIe_link_head) {
UlMapIe_link *tmp = UlMapIe_link_head;
//printf("test %d\n",tmp->NodeID);
while (tmp) {
if(tmp->NodeID == NodeID) {
// printf("test2 %d\n",tmp->NodeID);
return tmp;
}
else
tmp = tmp->next;
}
}
//printf("test2 \n");
return NULL;
}
{//printf("start search ul %d\n",NodeID);
if(UlMapIe_link_head) {
UlMapIe_link *tmp = UlMapIe_link_head;
//printf("test %d\n",tmp->NodeID);
while (tmp) {
if(tmp->NodeID == NodeID) {
// printf("test2 %d\n",tmp->NodeID);
return tmp;
}
else
tmp = tmp->next;
}
}
//printf("test2 \n");
return NULL;
}
SearchDlMapIe(int NodeID)
DlMapIe_link* Mac802_16::SearchDlMapIe(int NodeID)
{
DlMapIe_link *tmp = DlMapIe_link_head;
while (tmp) {
if(tmp->NodeID == NodeID) {
return tmp;
}
else
tmp = tmp->next;
}
return NULL;
}
{
DlMapIe_link *tmp = DlMapIe_link_head;
while (tmp) {
if(tmp->NodeID == NodeID) {
return tmp;
}
else
tmp = tmp->next;
}
return NULL;
}
DlMapIe_link and UlMapIe_link
紀錄每個BS的DlMapIe
struct DlMapIe_link {
DlMapIe_link () {next = NULL;}
int NodeID;
DlMapIe *DlMapIe_head;
DlMapIe *DlMapIe_tail;
DlMapIe_link *next;
};
struct UlMapIe_link {
UlMapIe_link () {next = NULL;}
int NodeID;
UlMapIe *UlMapIe_head;
UlMapIe *UlMapIe_tail;
UlMapIe_link *next;
};
struct DlMapIe_link {
DlMapIe_link () {next = NULL;}
int NodeID;
DlMapIe *DlMapIe_head;
DlMapIe *DlMapIe_tail;
DlMapIe_link *next;
};
struct UlMapIe_link {
UlMapIe_link () {next = NULL;}
int NodeID;
UlMapIe *UlMapIe_head;
UlMapIe *UlMapIe_tail;
UlMapIe_link *next;
};
2007年3月11日 星期日
struct BsSsInfo_link
用來存每個BS自己的 BsSsInfo
struct BsSsInfo_link {
BsSsInfo_link() {next = NULL;}
BsSsInfo *BsSsInfo_head;
BsSsInfo *BsSsInfo_tail;
BsSsInfo_link *next;
};
struct BsSsInfo_link {
BsSsInfo_link() {next = NULL;}
BsSsInfo *BsSsInfo_head;
BsSsInfo *BsSsInfo_tail;
BsSsInfo_link *next;
};
BsCreateFrameNumber(int NodeID)
創造 每個BS的 framenumber counter link list
void Mac802_16::BsCreateFrameNumber(int NodeID)
{
FrameNumber_Counters* tmp = new FrameNumber_Counters;
tmp->NodeID = NodeID;
tmp->Counter = 0;
if (!FrameNumber_Counter_head) {
FrameNumber_Counter_head = FrameNumber_Counter_tail = tmp;
}
else {
FrameNumber_Counter_tail->next = tmp;
FrameNumber_Counter_tail = tmp;
tmp->next = NULL;
}
}
void Mac802_16::BsCreateFrameNumber(int NodeID)
{
FrameNumber_Counters* tmp = new FrameNumber_Counters;
tmp->NodeID = NodeID;
tmp->Counter = 0;
if (!FrameNumber_Counter_head) {
FrameNumber_Counter_head = FrameNumber_Counter_tail = tmp;
}
else {
FrameNumber_Counter_tail->next = tmp;
FrameNumber_Counter_tail = tmp;
tmp->next = NULL;
}
}
BsSearchFrameNumber(int NodeID)
用來找尋 每個node的framenumber
FrameNumber_Counters* Mac802_16::BsSearchFrameNumber(int NodeID)
{
FrameNumber_Counters* tmp = FrameNumber_Counter_head;
while (tmp) {
if (tmp->NodeID == NodeID)
return tmp;
else tmp = tmp->next; }
return NULL;
}
FrameNumber_Counters* Mac802_16::BsSearchFrameNumber(int NodeID)
{
FrameNumber_Counters* tmp = FrameNumber_Counter_head;
while (tmp) {
if (tmp->NodeID == NodeID)
return tmp;
else tmp = tmp->next; }
return NULL;
}
struct FrameNumber_Counter
為了讓每個BS擁有自己的FrameNumber_Counter
所以用 link list 來紀錄每個BS的FrameNumber_Counter
struct FrameNumber_Counter {
FrameNumber_Counter(){next = NULL;}
int Counter
int NodeID;
FrameNumber_Counter *next;
};
所以用 link list 來紀錄每個BS的FrameNumber_Counter
struct FrameNumber_Counter {
FrameNumber_Counter(){next = NULL;}
int Counter
int NodeID;
FrameNumber_Counter *next;
};
2007年3月10日 星期六
IsBs(int NodeID)
用來檢查該Node是否為Bs
bool Mac802_16::IsBs(int NodeID)
{
if (NodeID %2 ==0)
return true;
return false;
}
bool Mac802_16::IsBs(int NodeID)
{
if (NodeID %2 ==0)
return true;
return false;
}
修改標記
收到DCD 要作 signal判斷,決定是否要啟動handoff 或是 從無bs 服務 換到有bs服務
if(BsMac != -1 && mac->macSA() == BsMac && hdr->signal < T_signal)
{ if(SearchScanning_link(NodeID))
SearchScanning_link(NodeID)->scan = true;
else
CreateScanning_link(NodeID)->scan = true;
}
if(mac->macSA() == BsMac)
BsSignal = hdr->signal;
else if((mac->macSA() != BsMac && hdr->signal > BsSignal) || BsMac == -1) {
printf("Change BS to bs%d with signal %e,%e\n",mac->macSA(),hdr->signal,BsSignal);
BsMac = mac->macSA();
BsSignal = hdr->signal;
}
要作handoff之前,ss 需要去掃描目前可用的bs訊號
為了簡化這過程, 可以設計一個 global link,去紀錄每個ss現在是否在找尋新的bs訊號
這樣bs每次要傳送資料給ss之前,可以先查這個link ,看看該ss是否在找新的訊號
而ss部份,當進入找新訊號的階段時,每次接到ULMAP就丟掉,這樣就可以不用傳資料了
或許有queuing time問題,這個要等測試後才能確定
BS_Arr[]
BS 可以不用固定是某些數的倍數
可以使用上面這個array,先輸入哪些node 要成為BS
搜尋DlBurstProfile_head;的時候 目前要先固定搜尋BS 0,因為還沒有加入讓ss可以判斷使用那一個bs的功能
各種新建的head,tail
SsServiceFlow_link *SsSF_link_head;
SsServiceFlow_link *SsSF_link_tail;
BsSsInfo_link *BsSsInfo_link_head;
BsSsInfo_link *BsSsInfo_link_tail;
BsServiceFlow_link *BsSF_link_head;
BsServiceFlow_link *BsSF_link_tail;
DownlinkBurstProfile_link *DownlinkBurstProfile_link_head;
DownlinkBurstProfile_link *DownlinkBurstProfile_link_tail;
UplinkBurstProfile_link *UplinkBurstProfile_link_head;
UplinkBurstProfile_link *UplinkBurstProfile_link_tail;
UlMapIe_link *UlMapIe_link_head;
UlMapIe_link *UlMapIe_link_tail;
DlMapIe_link *DlMapIe_link_head;
DlMapIe_link *DlMapIe_link_tail;
AllocationStartTime_link *AllocationStartTime_link_head;
AllocationStartTime_link *AllocationStartTime_link_tail;
DlAvailSymbol_link *DlAvailSymbol_link_head;
DlAvailSymbol_link *DlAvailSymbol_link_tail;
UlAvailSymbol_link *UlAvailSymbol_link_head;
UlAvailSymbol_link *UlAvailSymbol_link_tail;
UlMapIeNum_link *UlMapIeNum_link_head;
UlMapIeNum_link *UlMapIeNum_link_tail;
DlMapIeNum_link *DlMapIeNum_link_head;
DlMapIeNum_link *DlMapIeNum_link_tail;
sendDSA-REQ :
不能讓BS 送給BS
目前先讓BS不能送出任何DSA-REQ
ULMAP 和DLMAP都需要每個BS建立一份
所以使用link list來存
SS在找尋ULMAP OR DLMAP時 需要確認現在要跟那一個BS通訊(未開發)
Mac802_16() : 裡面有一個 frameTimer.start(Bs_Counter*0.1); 這個原本是zero,但因為每個BS如果用同一個時間 ,將會造成行程大亂,所以要丟不同的值
FrameNumber_Counter 在2.02版裡面 因為只有一個BS 所以他只有一個FrameNumber_Counter
但是因為現在有多個BS,所以FrameNumber_Counter變成一個BS擁有自己一個
FrameNumber_Counter改為structure ,用link list串起來
BsID 改為 mac addr為2倍數都是Bs (0,2,4......)
if(BsMac != -1 && mac->macSA() == BsMac && hdr->signal < T_signal)
{ if(SearchScanning_link(NodeID))
SearchScanning_link(NodeID)->scan = true;
else
CreateScanning_link(NodeID)->scan = true;
}
if(mac->macSA() == BsMac)
BsSignal = hdr->signal;
else if((mac->macSA() != BsMac && hdr->signal > BsSignal) || BsMac == -1) {
printf("Change BS to bs%d with signal %e,%e\n",mac->macSA(),hdr->signal,BsSignal);
BsMac = mac->macSA();
BsSignal = hdr->signal;
}
要作handoff之前,ss 需要去掃描目前可用的bs訊號
為了簡化這過程, 可以設計一個 global link,去紀錄每個ss現在是否在找尋新的bs訊號
這樣bs每次要傳送資料給ss之前,可以先查這個link ,看看該ss是否在找新的訊號
而ss部份,當進入找新訊號的階段時,每次接到ULMAP就丟掉,這樣就可以不用傳資料了
或許有queuing time問題,這個要等測試後才能確定
BS_Arr[]
BS 可以不用固定是某些數的倍數
可以使用上面這個array,先輸入哪些node 要成為BS
搜尋DlBurstProfile_head;的時候 目前要先固定搜尋BS 0,因為還沒有加入讓ss可以判斷使用那一個bs的功能
各種新建的head,tail
SsServiceFlow_link *SsSF_link_head;
SsServiceFlow_link *SsSF_link_tail;
BsSsInfo_link *BsSsInfo_link_head;
BsSsInfo_link *BsSsInfo_link_tail;
BsServiceFlow_link *BsSF_link_head;
BsServiceFlow_link *BsSF_link_tail;
DownlinkBurstProfile_link *DownlinkBurstProfile_link_head;
DownlinkBurstProfile_link *DownlinkBurstProfile_link_tail;
UplinkBurstProfile_link *UplinkBurstProfile_link_head;
UplinkBurstProfile_link *UplinkBurstProfile_link_tail;
UlMapIe_link *UlMapIe_link_head;
UlMapIe_link *UlMapIe_link_tail;
DlMapIe_link *DlMapIe_link_head;
DlMapIe_link *DlMapIe_link_tail;
AllocationStartTime_link *AllocationStartTime_link_head;
AllocationStartTime_link *AllocationStartTime_link_tail;
DlAvailSymbol_link *DlAvailSymbol_link_head;
DlAvailSymbol_link *DlAvailSymbol_link_tail;
UlAvailSymbol_link *UlAvailSymbol_link_head;
UlAvailSymbol_link *UlAvailSymbol_link_tail;
UlMapIeNum_link *UlMapIeNum_link_head;
UlMapIeNum_link *UlMapIeNum_link_tail;
DlMapIeNum_link *DlMapIeNum_link_head;
DlMapIeNum_link *DlMapIeNum_link_tail;
sendDSA-REQ :
不能讓BS 送給BS
目前先讓BS不能送出任何DSA-REQ
ULMAP 和DLMAP都需要每個BS建立一份
所以使用link list來存
SS在找尋ULMAP OR DLMAP時 需要確認現在要跟那一個BS通訊(未開發)
Mac802_16() : 裡面有一個 frameTimer.start(Bs_Counter*0.1); 這個原本是zero,但因為每個BS如果用同一個時間 ,將會造成行程大亂,所以要丟不同的值
FrameNumber_Counter 在2.02版裡面 因為只有一個BS 所以他只有一個FrameNumber_Counter
但是因為現在有多個BS,所以FrameNumber_Counter變成一個BS擁有自己一個
FrameNumber_Counter改為structure ,用link list串起來
BsID 改為 mac addr為2倍數都是Bs (0,2,4......)
長庚WiMAX NS2模組 運作流程
- BS broadcast DCD ,UCD
- SS收到DCD之後會去算出他對這個BS要使用哪一種編碼
- SS會對BS送出RNG-REQ
- BS收到RNG-REQ之後,會比對Ssinfo class是否有這個SS的資訊 ,如果沒有的話就建立該SS資訊
- BS回傳給SS RNG-RSP
- SS收到RNG-RSP之後,可以知道他可以使用的BasicCID 和PrimaryCID
- SS在我們設定的的traffic起始時間,會使用SsCreateServiceFlow建立sf
- SS建立sf之後,會送DSA-REQ給BS
- BS收到DSA-REQ之後,會先回送DSX-RVD通知SS,說明BS已經收到DSA-REQ
- BS會使用BsCreateServiceFlow來建立sf,此時會使用CallAdmissionControl來判斷是否可以建立這個sf,如果成功建立sf,會傳給SS一個DSA-RSP
- SS收到DSA-RSP之後,會回傳BS一個DSX-ACK
- SS開始傳送資料
CallAdmissionControl
這個函數 是用在建立service flow之前要檢查的項目
所以可以在 BsCreateServiceFlow這個函數中看到他的使用
長庚2.02版本中
把CallAdmissionControl這個函數內容移除了
可能是要留給使用者自己去設計
或是他們還在開發新的函數
所以可以在 BsCreateServiceFlow這個函數中看到他的使用
長庚2.02版本中
把CallAdmissionControl這個函數內容移除了
可能是要留給使用者自己去設計
或是他們還在開發新的函數
SsServiceFlow
紀錄SS 要求的service flow資訊 有以下資訊
int MacAddr; 要求 sf的 ss macaddr
int DstMacAddr;sf 的終點macaddr
int SrcMacAddr; //sf起點macaddr
int TransactionID;
int TransportCID;
int BwReqSize;
int SFID; //Service Flow ID
int ScheduleType; //Service_Flow_Scheduling_Type
int MaxTrafficRate; //Maximum_Sustained_Traffic_Rate
int MinTrafficRate; //Minimum_Reserved_Traffic_Rate
int ToleratedJitter; //Tolerated_Jitter
int MaxLatency; //Maximum_Latency
int TrafficPriority; //Traffic_Priority
int ReqTxPolicy; //Request_Transmission_Policy
SfStatus Status; //QoS_Parameter_Set_Type
double QueueTime;
PacketQueue SduQueue;
PacketQueue PduQueue;
PacketQueue FragQueue;
SfDirection Direction;
int MacAddr; 要求 sf的 ss macaddr
int DstMacAddr;sf 的終點macaddr
int SrcMacAddr; //sf起點macaddr
int TransactionID;
int TransportCID;
int BwReqSize;
int SFID; //Service Flow ID
int ScheduleType; //Service_Flow_Scheduling_Type
int MaxTrafficRate; //Maximum_Sustained_Traffic_Rate
int MinTrafficRate; //Minimum_Reserved_Traffic_Rate
int ToleratedJitter; //Tolerated_Jitter
int MaxLatency; //Maximum_Latency
int TrafficPriority; //Traffic_Priority
int ReqTxPolicy; //Request_Transmission_Policy
SfStatus Status; //QoS_Parameter_Set_Type
double QueueTime;
PacketQueue SduQueue;
PacketQueue PduQueue;
PacketQueue FragQueue;
SfDirection Direction;
2007年3月8日 星期四
BsSearchSsInfo(rngreq->SS_MAC_Address, CID)
找尋 該address的相關資訊
如果後面參數是 -1 ,代表要確認是否有該address的資訊
如果前面參數是 -1,代表是要找尋該CID的資訊
如果後面參數是 -1 ,代表要確認是否有該address的資訊
如果前面參數是 -1,代表是要找尋該CID的資訊
改成802.16e 需要修改的程式部份
mac-801_16.cc :
sendRNGREQ(): mac->macDA() = BsID;
原始碼部份 只有一個BS 所以只需這樣設定
但是16e環境裡面有許多BS ,又RNGREQ是針對BS來發送的
所以必須想辦法 判斷 要傳送給哪一個特定BS
sendRNGREQ(): mac->macDA() = BsID;
原始碼部份 只有一個BS 所以只需這樣設定
但是16e環境裡面有許多BS ,又RNGREQ是針對BS來發送的
所以必須想辦法 判斷 要傳送給哪一個特定BS
2007年3月6日 星期二
geographic
TOMAC class 使用Mod class來紀錄每個node的 x,y軸
Mod class用來紀錄每個node的 x,y軸
他裡面有一個函數叫ToMod(x,y) ,只要傳入一組x,y軸 就會計算出該組x,y距離該node的距離
並且回傳這組x,y跟該node可以使用那一種編碼
計算 BS 和SS 之間距離
並且判斷 在什麼距離內 要用哪一種編碼
Mod class用來紀錄每個node的 x,y軸
他裡面有一個函數叫ToMod(x,y) ,只要傳入一組x,y軸 就會計算出該組x,y距離該node的距離
並且回傳這組x,y跟該node可以使用那一種編碼
計算 BS 和SS 之間距離
並且判斷 在什麼距離內 要用哪一種編碼
WiMAX 2.02 新參數
FrameNumber_Counter : BS已經送出去的frame counter
NodeID : Node ID
DownlinkBurstProfile: 放在 packet-802_16.h
NodeID : Node ID
DownlinkBurstProfile: 放在 packet-802_16.h
2007年3月4日 星期日
WiMAX 模組在TCL上面的使用方式
Real-time traffic 的呼叫方式 如下
[new Application/Traffic/UGS]
Nonreal-time traffic 的呼叫方式如下
[new Application/BE]
[new Application/Traffic/UGS]
Nonreal-time traffic 的呼叫方式如下
[new Application/BE]
2007年3月2日 星期五
mac-802_16.cc
recv()
這個函數 裡面分成兩大部份運作: 從下層收到的封包,從上層收到的封包
ModulCoding = CalMod->search(NodeID)->ToMod(CalMod->search(0)->x,CalMod->search(0)->y);
這是用來呼叫function 去計算 SS 跟BS之間的距離 進而得知 要使用哪一種編碼
index_ : 是 ns2 裡面原本的mac.h 的變數 是代表MAC address
node id = 0 的Node 就是 BS ,需要作修改
可以用簡單的方式 就是 寫死 固定 二的倍數 或是三的倍數都是BS
複雜方式 就是要MAC 去認得誰是 BS 和 SS 這個方式比較花時間
BCID 是依照 BS 收到RNGREQ 的順序來分配
從 1 開始分配 一次增加一
SS編號是依據 在TCL上面建立node順序來分配
從 1 開始分配 一次增加一
if(creatid == 0) BS編號固定為zero ,為了要改成802.16e 需要讓mac認得多個BS
目前最簡單的方式就是讓BS編號 都為 2的倍數
{
if(channelSize_ == 10)
{
DL_subchannelNum_ = 30;
UL_subchannelNum_ = 35;
}
else if(channelSize_ == 20)
{
DL_subchannelNum_ = 60;
UL_subchannelNum_ = 92;
}
BS_UL_BW = UL_subchannelNum_;
BS_DL_BW = DL_symbolNum_;
Tmp_UL_BW = CAC_UL = BS_UL_BW;
FrameTimer.start(0);
}
if(creatid!=BSID) 因為設定成2倍數的node id 都是 BS 所以這邊要改成 creatid 不是2倍數
{
if(check_list->check(creatid)==0)
{
check_list->enque(creatid);
check_list->unlock(creatid);
ss_buf->enque(creatid);
Queue_list->enque(creatid);
sendRNGREQ(creatid);
}
}
這個函數 裡面分成兩大部份運作: 從下層收到的封包,從上層收到的封包
ModulCoding = CalMod->search(NodeID)->ToMod(CalMod->search(0)->x,CalMod->search(0)->y);
這是用來呼叫function 去計算 SS 跟BS之間的距離 進而得知 要使用哪一種編碼
index_ : 是 ns2 裡面原本的mac.h 的變數 是代表MAC address
node id = 0 的Node 就是 BS ,需要作修改
可以用簡單的方式 就是 寫死 固定 二的倍數 或是三的倍數都是BS
複雜方式 就是要MAC 去認得誰是 BS 和 SS 這個方式比較花時間
BCID 是依照 BS 收到RNGREQ 的順序來分配
從 1 開始分配 一次增加一
SS編號是依據 在TCL上面建立node順序來分配
從 1 開始分配 一次增加一
if(creatid == 0) BS編號固定為zero ,為了要改成802.16e 需要讓mac認得多個BS
目前最簡單的方式就是讓BS編號 都為 2的倍數
{
if(channelSize_ == 10)
{
DL_subchannelNum_ = 30;
UL_subchannelNum_ = 35;
}
else if(channelSize_ == 20)
{
DL_subchannelNum_ = 60;
UL_subchannelNum_ = 92;
}
BS_UL_BW = UL_subchannelNum_;
BS_DL_BW = DL_symbolNum_;
Tmp_UL_BW = CAC_UL = BS_UL_BW;
FrameTimer.start(0);
}
if(creatid!=BSID) 因為設定成2倍數的node id 都是 BS 所以這邊要改成 creatid 不是2倍數
{
if(check_list->check(creatid)==0)
{
check_list->enque(creatid);
check_list->unlock(creatid);
ss_buf->enque(creatid);
Queue_list->enque(creatid);
sendRNGREQ(creatid);
}
}
訂閱:
文章 (Atom)