D2dUePhy< Base > Class Template Reference

Simu5G: D2dUePhy< Base > Class Template Reference
Simu5G
D2dUePhy< Base > Class Template Reference

#include <D2dUePhy.h>

Protected Member Functions

bool isStaleFrame (const UserControlInfo *lteInfo) override
 D2D/D2D_MULTI frames legitimately arrive from peers, not the serving cell.
void frameAccepted (UserControlInfo *lteInfo) override
bool isControlFrameType (LtePhyFrameType type) override
 D2D mode-switch notifications are control frames too.
bool interceptIncomingFrame (LteAirFrame *frame, UserControlInfo *lteInfo) override
 D2D-multicast capture effect: store the frame and decode it at the end of the TTI.
void validateOutgoingFrame (const UserControlInfo *info) override
void recordExtraTxCqi (double cqi, const UserControlInfo *info) override
 D2D CQI accounting for outgoing data packets.
const char * airFrameNameFor (const UserControlInfo *info) override
 keep the historical D2D frame naming (all control frames named "harqFeedback-grant")
void transmitFrame (LteAirFrame *frame, const UserControlInfo *info) override
 one-to-many D2D transmissions go out via sendDirect to all group members
void sendMulticast (LteAirFrame *frame)

Detailed Description

template<class Base>
class simu5g::D2dUePhy< Base >

CRTP mixin that adds D2D support to a UE PHY.

The core UE PHY (PhyUe) carries no D2D code; this mixin layers the D2D UE-PHY logic (D2D Tx power, D2D CQI accounting, one-to-many D2D transmission, the D2D-multicast capture effect) on top of it. The capture-effect machinery lives in D2dUePhyHelper; the mixin holds the module-side glue. It has native protected access to the Base internals it needs.

The concrete Define_Module'd PHY is PhyUeD2D = D2dUePhy<PhyUe>.

Note: handleAirFrame() fully replaces the Base implementation; the other overrides extend Base behavior and chain up to it.

Member Function Documentation

◆ isStaleFrame()

template<class Base>
bool isStaleFrame ( const UserControlInfo * lteInfo)
inlineoverrideprotected

D2D/D2D_MULTI frames legitimately arrive from peers, not the serving cell.

◆ frameAccepted()

template<class Base>
void frameAccepted ( UserControlInfo * lteInfo)
inlineoverrideprotected

HACK: if this is a multicast connection, change the destId of the airframe so that upper layers can handle it

◆ isControlFrameType()

template<class Base>
bool isControlFrameType ( LtePhyFrameType type)
inlineoverrideprotected

D2D mode-switch notifications are control frames too.

◆ interceptIncomingFrame()

template<class Base>
bool interceptIncomingFrame ( LteAirFrame * frame,
UserControlInfo * lteInfo )
inlineoverrideprotected

D2D-multicast capture effect: store the frame and decode it at the end of the TTI.

◆ validateOutgoingFrame()

template<class Base>
void validateOutgoingFrame ( const UserControlInfo * info)
inlineoverrideprotected

the D2D UE PHY performs no serving-cell check on outgoing frames (D2D/D2D_MULTI frames legitimately target peers)

◆ recordExtraTxCqi()

template<class Base>
void recordExtraTxCqi ( double cqi,
const UserControlInfo * info )
inlineoverrideprotected

D2D CQI accounting for outgoing data packets.

◆ airFrameNameFor()

template<class Base>
const char * airFrameNameFor ( const UserControlInfo * info)
inlineoverrideprotected

keep the historical D2D frame naming (all control frames named "harqFeedback-grant")

◆ transmitFrame()

template<class Base>
void transmitFrame ( LteAirFrame * frame,
const UserControlInfo * info )
inlineoverrideprotected

one-to-many D2D transmissions go out via sendDirect to all group members

References sendMulticast().

◆ sendMulticast()

template<class Base>
void sendMulticast ( LteAirFrame * frame)
protected

Sends a frame to the UEs registered to the multicast group indicated in the frame (optionally skipping receivers beyond multicastD2DRange). Frames are sent with zero transmission delay. D2D-specific: only the D2D UE PHY originates one-to-many D2D transmissions.

References simu5g::NODEID_NONE.

Referenced by transmitFrame().