69 const BitVector *serializedBits = packetModel->getSerializedPacket();
70 BitVector *encodedBits =
new BitVector(*serializedBits);
71 const IScrambling *scrambling =
nullptr;
75 EV_DEBUG <<
"Scrambled bits are: " << *encodedBits << endl;
77 const IForwardErrorCorrection *forwardErrorCorrection =
nullptr;
81 EV_DEBUG <<
"FEC encoded bits are: " << *encodedBits << endl;
83 const IInterleaving *interleaving =
nullptr;
87 EV_DEBUG <<
"Interleaved bits are: " << *encodedBits << endl;
90 if (forwardErrorCorrection ==
nullptr)
91 return new TransmissionBitModel(netHeaderBitLength, packetModel->getBitrate(), serializedBits->getSize() - netHeaderBitLength, packetModel->getBitrate(), encodedBits, forwardErrorCorrection, scrambling, interleaving);
93 int grossHeaderBitLength = forwardErrorCorrection->getEncodedLength(netHeaderBitLength);
94 bps grossBitrate = packetModel->getBitrate() / forwardErrorCorrection->getCodeRate();
95 return new TransmissionBitModel(grossHeaderBitLength, grossBitrate, serializedBits->getSize() - grossHeaderBitLength, grossBitrate, encodedBits, forwardErrorCorrection, scrambling, interleaving);
const IInterleaver * interleaver
Definition: APSKEncoder.h:40
virtual const IInterleaving * getInterleaving() const =0
virtual BitVector encode(const BitVector &informationBits) const =0
const IScrambler * scrambler
Definition: APSKEncoder.h:38
virtual BitVector scramble(const BitVector &bits) const =0
virtual const IScrambling * getScrambling() const =0
compose< b, pow< s,-1 > > bps
Definition: Units.h:985
virtual const IForwardErrorCorrection * getForwardErrorCorrection() const =0
virtual BitVector interleave(const BitVector &bits) const =0
const IFECCoder * fecEncoder
Definition: APSKEncoder.h:39
#define APSK_PHY_FRAME_HEADER_BYTE_LENGTH
Definition: APSKPhyFrameSerializer.h:28