PHYenb.h 1.9 KB
Newer Older
C
x  
calincerchez 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
//
// 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/.
// 

#ifndef PHYENB_H_
#define PHYENB_H_

C
calin cerchez 已提交
19
#include "PHY.h"
C
x  
calincerchez 已提交
20

C
calin cerchez 已提交
21
class PHYenb : public PHY {
C
x  
calincerchez 已提交
22 23 24 25
private:
    unsigned dlBandwith;
    unsigned ulBandwith;

C
calin cerchez 已提交
26 27
    typedef std::map<unsigned short /* tti */, std::list<DlConfigRequestPduPtr> > DlConfigRequests;
    DlConfigRequests dlCfgReqs;
C
x  
calincerchez 已提交
28

C
calin cerchez 已提交
29 30
    typedef std::map<unsigned short /* pduIndex */, std::list<short /* msgKinds */> > TxRequests;
    TxRequests txReqs;
C
calincerchez 已提交
31 32
    typedef std::map<unsigned char /* last resource element */, PHYFrame*> PHYFrames;
    typedef std::map<unsigned char /* symbol */, PHYFrames> TransmissionBuffer;
C
calin cerchez 已提交
33
    TransmissionBuffer buffer;
C
x  
calincerchez 已提交
34

C
calincerchez 已提交
35 36
    DlConfigRequestBchPdu *dlReqBCHpdu;

C
calin cerchez 已提交
37 38
//    bool findAndRemoveDlConfigRequestPdu(unsigned short pduIndex);
//    bool findAndRemoveTxRequestPdu(unsigned msgId);
C
x  
calincerchez 已提交
39 40

    void sendDCIFormat(DlConfigRequestPduPtr pdu);
C
calin cerchez 已提交
41

C
calincerchez 已提交
42 43 44
    void buildSubframe();
    void sendSymbol();
    void cleanup();
C
calincerchez 已提交
45

C
calincerchez 已提交
46
    void setData(PHYFrame *frame);
C
calincerchez 已提交
47

C
calin cerchez 已提交
48
    virtual void stateEntered(int category, const cPolymorphic *details);
C
x  
calincerchez 已提交
49 50 51
public:
    PHYenb();
    virtual ~PHYenb();
C
calin cerchez 已提交
52

C
x  
calincerchez 已提交
53
    virtual void initialize(int stage);
C
calin cerchez 已提交
54

55 56
    virtual void handleMessage(cMessage *msg);

C
x  
calincerchez 已提交
57
    virtual void handleUpperMessage(cMessage *msg);
C
calin cerchez 已提交
58 59 60
    virtual void handleRadioMessage(cMessage *msg);

    virtual void sendBufferedData();
C
x  
calincerchez 已提交
61 62 63 64
};

#endif /* PHYENB_H_ */