Parent: [62f79d] (diff)

Download this file

RA.h    89 lines (69 with data), 2.1 kB

 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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
// This program is free software: you can redistribute it and/or modify
/**
* @file RA.h
* @author Tomas Hykel (xhykel01@stud.fit.vutbr.cz)
* @brief
* @detail
*/
#ifndef __RINA_RA_H_
#define __RINA_RA_H_
#include <omnetpp.h>
#include "RINASignals.h"
#include "PDUForwardingTable.h"
#include "FlowTable.h"
#include "DA.h"
#include "FABase.h"
#include "RMT.h"
#include "RABase.h"
#include "RAListeners.h"
//Consts
extern const char* PAR_QOSDATA;
extern const char* ELEM_QOSCUBE;
extern const char* ELEM_AVGBW;
extern const char* ELEM_AVGSDUBW;
extern const char* ELEM_PEAKBWDUR;
extern const char* ELEM_PEAKSDUBWDUR;
extern const char* ELEM_BURSTPERIOD;
extern const char* ELEM_BURSTDURATION;
extern const char* ELEM_UNDETECTBITERR;
extern const char* ELEM_MAXSDUSIZE;
extern const char* ELEM_PARTIALDELIVER;
extern const char* ELEM_INCOMPLETEDELIVER;
extern const char* ELEM_FORCEORDER;
extern const char* ELEM_MAXALLOWGAP;
extern const char* ELEM_DELAY;
extern const char* ELEM_JITTER;
extern const char* ELEM_COSTTIME;
extern const char* ELEM_COSTBITS;
class RA : public RABase
{
public:
virtual void createFlow(Flow *flow);
virtual void createFlowWithoutAllocate(Flow *flow);
virtual void removeFlow(Flow *flow);
virtual bool bindFlowToLowerFlow(Flow* flow);
virtual void bindFlowToMedium(Flow* flow);
protected:
virtual void initialize();
virtual void handleMessage(cMessage *msg);
private:
DA* difAllocator;
RMT* rmt;
RMTQueueManager* rmtQM;
PDUForwardingTable* fwTable;
FlowTable* flTable;
std::string processName;
bool onWire;
void initQoSCubes();
void setRmtMode();
RMTQueue* bindLowerFlowToRmtQueue(cModule* ipc, FABase* fab, Flow* flow);
void bindMediumToRMTQueue();
std::string normalizePortId(std::string ipcName, int flowPortId);
void initSignalsAndListeners();
simsignal_t sigRACreFloPosi;
simsignal_t sigRACreFloNega;
LisRACreFlow* lisRACreFlow;
void signalizeCreateFlowPositiveToRibd(Flow* flow);
void signalizeCreateFlowNegativeToRibd(Flow* flow);
};
#endif