Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(141)

Unified Diff: src/lr-wpan/model/lr-wpan-phy.h

Issue 194960043: Integrated 802.15.4e TSCH model
Patch Set: Created 9 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/lr-wpan/model/lr-wpan-mac-header.cc ('k') | src/lr-wpan/model/lr-wpan-phy.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/lr-wpan/model/lr-wpan-phy.h
===================================================================
--- a/src/lr-wpan/model/lr-wpan-phy.h
+++ b/src/lr-wpan/model/lr-wpan-phy.h
@@ -18,6 +18,8 @@
* Author:
* Gary Pei <guangyu.pei@boeing.com>
* Sascha Alexander Jopen <jopen@cs.uni-bonn.de>
+ * Peishuo Li <pressthunder@gmail.com>
+ * Pjotr Kourzanov <peter.kourzanov@xs4all.nl>
*/
#ifndef LR_WPAN_PHY_H
#define LR_WPAN_PHY_H
@@ -105,7 +107,11 @@
IEEE_802_15_4_PHY_TX_ON = 0x09,
IEEE_802_15_4_PHY_UNSUPPORTED_ATTRIBUTE = 0xa,
IEEE_802_15_4_PHY_READ_ONLY = 0xb,
- IEEE_802_15_4_PHY_UNSPECIFIED = 0xc // all cases not covered by ieee802.15.4
+ IEEE_802_15_4_PHY_UNSPECIFIED = 0xc,
+ // all cases not covered by ieee802.15.4
+
+ IEEE_802_15_4_PHY_TRX_START = 0xd,
+ IEEE_802_15_4_PHY_TRX_SWITCHING = 0xe
} LrWpanPhyEnumeration;
/**
@@ -123,6 +129,13 @@
phySymbolsPerOctet = 0x07
} LrWpanPibAttributeIdentifier;
+typedef enum
+{
+ IEEE_802_15_4_PPDU_PAYLOAD = 0,
+ IEEE_802_15_4_PPDU_SHR = 1,
+ IEEE_802_15_4_PPDU_PHR = 2,
+} LrWpanPPDU;
+
/**
* IEEE802.15.4-2006 PHY PIB Attributes Table 23 in section 6.4.2
*/
@@ -136,6 +149,7 @@
uint32_t phyMaxFrameDuration; //!< The maximum number of symbols in a frame
uint32_t phySHRDuration; //!< The duration of the synchronization header (SHR) in symbols
double phySymbolsPerOctet; //!< The number of symbols per octet
+ double phyLinkFadingBias;
} LrWpanPhyPibAttributes;
/**
@@ -434,6 +448,8 @@
*/
int64_t AssignStreams (int64_t stream);
+ void HandleEnergyDepletion ();
+
protected:
/**
* The data and symbol rates for the different PHY options.
@@ -486,8 +502,11 @@
/**
* Check if the interference destroys a frame currently received. Called
* whenever a change in interference is detected.
+ * param packetType: 0: SHR (preamble and SFD) is transmitting
+ * 1: PHR is transmitting
+ * 2: PHY Payload is transmitting
*/
- void CheckInterference (void);
+ void CheckInterference (LrWpanPPDU packetType, Ptr<LrWpanSpectrumSignalParameters> spectrumRxParams);
/**
* Finish the reception of a frame. This is called at the end of a frame
@@ -544,6 +563,12 @@
Time GetPpduHeaderTxTime (void);
/**
+ * Calculate the time required for sending the SHR of PPDU header, that is the
+ * preamble and SFD.
+ */
+ Time GetSHRTxTime(void);
+
+ /**
* Check if the given channel is supported by the PHY.
*
* \param channel the channel to check
@@ -614,6 +639,8 @@
*/
TracedCallback<Time, LrWpanPhyEnumeration, LrWpanPhyEnumeration> m_trxStateLogger;
+ TracedCallback<double> m_phyLinkInformation;
+
/**
* The mobility model used by the PHY.
*/
@@ -729,6 +756,8 @@
*/
double m_rxSensitivity;
+ double m_receivedPower;
+
/**
* The accumulated signals currently received by the transceiver, including
* the signal of a possibly received packet, as well as all signals
@@ -740,7 +769,7 @@
* Timestamp of the last calculation of the PER of a packet currently received.
*/
Time m_rxLastUpdate;
-
+ Time m_currentPacketRxStart;
/**
* Statusinformation of the currently received packet. The first parameter
* contains the frame, as well the signal power of the frame. The second
@@ -772,6 +801,8 @@
*/
EventId m_setTRXState;
+ EventId m_endRx;
+
/**
* Scheduler event of a currently running data transmission request.
*/
@@ -781,6 +812,8 @@
* Uniform random variable stream.
*/
Ptr<UniformRandomVariable> m_random;
+ Ptr<UniformRandomVariable> m_randomdatalength;
+
};
« no previous file with comments | « src/lr-wpan/model/lr-wpan-mac-header.cc ('k') | src/lr-wpan/model/lr-wpan-phy.cc » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b