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 28
    bool hasBCHPdu;

    typedef std::map<unsigned short /* pduIndex */, PHYFramePtr> DlConfigRequests;
C
calin cerchez 已提交
29
    DlConfigRequests dlCfgReqs;
C
x  
calincerchez 已提交
30

C
calin cerchez 已提交
31
    typedef std::map<short /* msgKind */, PHYFramePtr> TxRequests;
C
calin cerchez 已提交
32
    TxRequests txReqs;
C
calincerchez 已提交
33

C
calin cerchez 已提交
34 35
//    bool findAndRemoveDlConfigRequestPdu(unsigned short pduIndex);
//    bool findAndRemoveTxRequestPdu(unsigned msgId);
C
x  
calincerchez 已提交
36

C
calin cerchez 已提交
37 38 39
    typedef std::list<DlConfigRequestDciDlPdu*> DCIBuffer;
    DCIBuffer dciBuffer;

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

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

C
calin cerchez 已提交
46
    void setData(unsigned short k, PHYFrame *frame);
C
calincerchez 已提交
47

C
calin cerchez 已提交
48
    virtual void stateEntered(int category, const cPolymorphic *details);
C
calin cerchez 已提交
49 50

    virtual void receiveChangeNotification(int category, const cPolymorphic *details);
C
x  
calincerchez 已提交
51 52 53
public:
    PHYenb();
    virtual ~PHYenb();
C
calin cerchez 已提交
54

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

57 58
    virtual void handleMessage(cMessage *msg);

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

    virtual void sendBufferedData();
C
x  
calincerchez 已提交
63 64 65 66
};

#endif /* PHYENB_H_ */