Skip to content

Commit b2c7e06

Browse files
committed
LteAirFrame: migrated into .msg
1 parent 6ea7815 commit b2c7e06

3 files changed

Lines changed: 13 additions & 72 deletions

File tree

src/simu5g/stack/phy/packet/LteAirFrame.cc

Lines changed: 0 additions & 27 deletions
This file was deleted.

src/simu5g/stack/phy/packet/LteAirFrame.h

Lines changed: 0 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -12,51 +12,7 @@
1212
#ifndef _LTE_LTEAIRFRAME_H_
1313
#define _LTE_LTEAIRFRAME_H_
1414

15-
#include "simu5g/common/LteCommon.h"
16-
#include "simu5g/common/LteControlInfo.h"
1715
#include "simu5g/stack/phy/packet/LteAirFrame_m.h"
1816

19-
namespace simu5g {
20-
21-
using namespace omnetpp;
22-
23-
class LteAirFrame : public LteAirFrame_Base
24-
{
25-
protected:
26-
RemoteUnitPhyDataVector remoteUnitPhyDataVector;
27-
28-
public:
29-
LteAirFrame(const char *name = nullptr, int kind = 0) :
30-
LteAirFrame_Base(name, kind)
31-
{
32-
}
33-
34-
LteAirFrame(const LteAirFrame& other) :
35-
LteAirFrame_Base(other)
36-
{
37-
operator=(other);
38-
}
39-
40-
LteAirFrame& operator=(const LteAirFrame& other)
41-
{
42-
LteAirFrame_Base::operator=(other);
43-
this->remoteUnitPhyDataVector = other.remoteUnitPhyDataVector;
44-
ASSERT(other.getControlInfo() == nullptr);
45-
return *this;
46-
}
47-
48-
LteAirFrame *dup() const override
49-
{
50-
return new LteAirFrame(*this);
51-
}
52-
53-
void addRemoteUnitPhyDataVector(RemoteUnitPhyData data);
54-
RemoteUnitPhyDataVector getRemoteUnitPhyDataVector();
55-
};
56-
57-
Register_Class(LteAirFrame);
58-
59-
} //namespace
60-
6117
#endif
6218

src/simu5g/stack/phy/packet/LteAirFrame.msg

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,27 @@ import simu5g.stack.phy.packet.AirFrame;
1313
import simu5g.common.LteControlInfo;
1414

1515
cplusplus {{
16+
#include "simu5g/common/LteCommon.h" // for RemoteUnitPhyDataVector
1617
#include "simu5g/common/LteControlInfo.h"
1718
}}
1819

1920
namespace simu5g;
2021

22+
struct RemoteUnitPhyDataVector
23+
{
24+
@existingClass;
25+
@opaque;
26+
//@toString(.str());
27+
}
28+
2129
//
2230
// This is LteAirFrame.
2331
//
2432
packet LteAirFrame extends AirFrame {
25-
@customize(true);
33+
RemoteUnitPhyDataVector remoteUnitPhyDataVector;
2634
UserControlInfo additionalInfo @nopack;
2735
}
36+
37+
cplusplus(LteAirFrame) {{
38+
void addRemoteUnitPhyDataVector(const RemoteUnitPhyData& data) { remoteUnitPhyDataVector.push_back(data); }
39+
}}

0 commit comments

Comments
 (0)