Remove unneeded typedef in struct and enum

This commit is contained in:
Eduardo Almeida
2022-12-07 19:30:05 +00:00
parent 5bc9f60f7f
commit 5c8b820b7b
31 changed files with 172 additions and 172 deletions

View File

@@ -59,12 +59,12 @@ class BuildingsChannelConditionModelTestCase : public TestCase
/**
* Struct containing the parameters for each test
*/
typedef struct
struct TestVector
{
Vector m_positionA; //!< the position of the first node
Vector m_positionB; //!< the position of the second node
ChannelCondition::LosConditionValue m_losCond; //!< the correct channel condition
} TestVector;
};
TestVectors<TestVector> m_testVectors; //!< array containg all the test vectors
};

View File

@@ -68,13 +68,13 @@ class ThreeGppV2vBuildingsChCondModelTestCase : public TestCase
/**
* Struct containing the parameters for each test
*/
typedef struct
struct TestVector
{
Vector m_positionA; //!< the position of the first node
Vector m_positionB; //!< the position of the second node
ChannelCondition::LosConditionValue m_losCond; //!< the correct channel condition
TypeId m_typeId; //!< the type ID of the channel condition model to be used
} TestVector;
};
TestVectors<TestVector> m_testVectors; //!< array containg all the test vectors
};
@@ -221,13 +221,13 @@ class ThreeGppV2vUrbanLosNlosvChCondModelTestCase : public TestCase
/**
* Struct containing the parameters for each test
*/
typedef struct
struct TestVector
{
Vector m_positionA; //!< the position of the first node
Vector m_positionB; //!< the position of the second node
double m_pLos; //!< LOS probability
TypeId m_typeId; //!< the type ID of the channel condition model to be used
} TestVector;
};
TestVectors<TestVector> m_testVectors; //!< array containing all the test vectors
Ptr<ThreeGppV2vUrbanChannelConditionModel> m_condModel; //!< the channel condition model
@@ -386,13 +386,13 @@ class ThreeGppV2vHighwayLosNlosvChCondModelTestCase : public TestCase
/**
* Struct containing the parameters for each test
*/
typedef struct
struct TestVector
{
Vector m_positionA; //!< the position of the first node
Vector m_positionB; //!< the position of the second node
double m_pLos; //!< LOS probability
TypeId m_typeId; //!< the type ID of the channel condition model to be used
} TestVector;
};
TestVectors<TestVector> m_testVectors; //!< array containing all the test vectors
Ptr<ThreeGppV2vHighwayChannelConditionModel> m_condModel; //!< the channel condition model

View File

@@ -89,13 +89,13 @@ class BatteryLifetimeTest
Time expLifetime);
/// Load profile of the battery
typedef struct LoadProfile
struct LoadProfile
{
std::vector<double> loads; //!< Loads container
std::vector<Time> timeStamps; //!< Timestamps container
Time itsyLifetime; //!< Expected lifetime for an ITSY battery
Time dualFoilLifeTime; //!< Expected lifetime for a Dualfoil battery
} LoadProfile;
};
std::vector<LoadProfile> m_loadProfiles; //!< Load profiles
double m_alpha; //!< Alpha parameter of the battery model

View File

@@ -1460,13 +1460,13 @@ class Icmpv6OptionPrefixInformation : public Icmpv6OptionHeader
/**
* \brief Icmpv6 Option Prefix Information flag field values
*/
typedef enum
enum Flags_t
{
NONE = 0, //!< No flags
ROUTERADDR = 32, //!< Router Address
AUTADDRCONF = 64, //!< Autonomous Address Configuration
ONLINK = 128 //!< On-link
} Flags_t;
};
/**
* \brief Get the prefix length.

View File

@@ -170,12 +170,12 @@ class Ipv6RawSocketImpl : public Socket
/**
* \brief IPv6 raw data and additional information.
*/
typedef struct
struct Data
{
Ptr<Packet> packet; /**< Packet data */
Ipv6Address fromIp; /**< Source address */
uint16_t fromProtocol; /**< Protocol used */
} Data;
};
/**
* \brief Dispose object.
@@ -225,10 +225,10 @@ class Ipv6RawSocketImpl : public Socket
/**
* \brief Struct to hold the ICMPv6 filter
*/
typedef struct
struct Icmpv6Filter
{
uint32_t icmpv6Filt[8]; //!< ICMPv6 filter specification
} Icmpv6Filter;
};
/**
* \brief ICMPv6 filter.

View File

@@ -74,13 +74,13 @@ class TcpBbr : public TcpCongestionOps
/**
* \brief BBR has the following 4 modes for deciding how fast to send:
*/
typedef enum
enum BbrMode_t
{
BBR_STARTUP, /**< Ramp up sending rate rapidly to fill pipe */
BBR_DRAIN, /**< Drain any queue created during startup */
BBR_PROBE_BW, /**< Discover, share bw: pace around estimated bw */
BBR_PROBE_RTT, /**< Cut inflight to min to probe min_rtt */
} BbrMode_t;
};
typedef WindowedFilter<DataRate,
MaxFilter<DataRate>,

View File

@@ -275,7 +275,7 @@ class TcpHeader : public Header
/**
* \brief TCP flag field values
*/
typedef enum
enum Flags_t
{
NONE = 0, //!< No flags
FIN = 1, //!< FIN
@@ -286,7 +286,7 @@ class TcpHeader : public Header
URG = 32, //!< Urgent
ECE = 64, //!< ECE
CWR = 128 //!< CWR
} Flags_t;
};
/**
* \brief Get the type ID.

View File

@@ -64,11 +64,11 @@ class TcpPrrRecovery : public TcpClassicRecovery
/**
* \brief Reduction Bound variant (CRB or SSRB)
*/
typedef enum
enum ReductionBound_t
{
CRB, /**< Conservative Reduction Bound */
SSRB /**< Slow Start Reduction Bound */
} ReductionBound_t;
};
std::string GetName() const override;

View File

@@ -77,7 +77,7 @@ class TcpSocketState : public Object
* depending on the case.
*
*/
typedef enum
enum TcpCongState_t
{
CA_OPEN, //!< Normal state, no dubious events
CA_DISORDER, //!< In all the respects it is "Open",
@@ -88,13 +88,13 @@ class TcpSocketState : public Object
CA_RECOVERY, //!< CWND was reduced, we are fast-retransmitting.
CA_LOSS, //!< CWND was reduced due to RTO timeout or SACK reneging.
CA_LAST_STATE //!< Used only in debug messages
} TcpCongState_t;
};
// Note: "not triggered" events are currently not triggered by the code.
/**
* \brief Congestion avoidance events
*/
typedef enum
enum TcpCAEvent_t
{
CA_EVENT_TX_START, //!< first transmit when no packets in flight
CA_EVENT_CWND_RESTART, //!< congestion window restart. Not triggered
@@ -104,7 +104,7 @@ class TcpSocketState : public Object
CA_EVENT_ECN_IS_CE, //!< received CE marked IP packet. Not triggered
CA_EVENT_DELAYED_ACK, //!< Delayed ack is sent
CA_EVENT_NON_DELAYED_ACK, //!< Non-delayed ack is sent
} TcpCAEvent_t;
};
/**
* \brief Parameter value related to ECN enable/disable functionality
@@ -112,39 +112,39 @@ class TcpSocketState : public Object
* https://www.kernel.org/doc/Documentation/networking/ip-sysctl.txt
* is not implemented.
*/
typedef enum
enum UseEcn_t
{
Off = 0, //!< Disable
On = 1, //!< Enable
AcceptOnly = 2, //!< Enable only when the peer endpoint is ECN capable
} UseEcn_t;
};
/**
* \brief ECN code points
*/
typedef enum
enum EcnCodePoint_t
{
NotECT = 0, //!< Unmarkable
Ect1 = 1, //!< Markable
Ect0 = 2, //!< Markable
CongExp = 3, //!< Marked
} EcnCodePoint_t;
};
/**
* \brief ECN Modes
*/
typedef enum
enum EcnMode_t
{
ClassicEcn, //!< ECN functionality as described in RFC 3168.
DctcpEcn, //!< ECN functionality as described in RFC 8257. Note: this mode is specific to
//!< DCTCP.
} EcnMode_t;
};
/**
* \brief Definition of the Ecn state machine
*
*/
typedef enum
enum EcnState_t
{
ECN_DISABLED = 0, //!< ECN disabled traffic
ECN_IDLE, //!< ECN is enabled but currently there is no action pertaining to ECE or CWR to
@@ -154,7 +154,7 @@ class TcpSocketState : public Object
ECN_ECE_RCVD, //!< Last ACK received had ECE bit set in TCP header
ECN_CWR_SENT //!< Sender has reduced the congestion window, and sent a packet with CWR bit
//!< set in TCP header. This state is used for tracing.
} EcnState_t;
};
/**
* \brief Literal names of TCP states for use in log messages

View File

@@ -62,7 +62,7 @@ class TcpSocket : public Socket
* \brief Names of the 11 TCP states
*
*/
typedef enum
enum TcpStates_t
{
CLOSED = 0, /**< Socket is finished */
LISTEN, /**< Listening for a connection */
@@ -87,7 +87,7 @@ class TcpSocket : public Socket
* may not have gotten our last ACK causing it
* to retransmit the data packet (which we ignore) */
LAST_STATE /**< Last state, used only in debug messages */
} TcpStates_t;
};
/**
* \brief Literal names of TCP states for use in log messages

View File

@@ -56,20 +56,20 @@ class LrWpanCsmaCa;
*
* Tx options
*/
typedef enum
enum LrWpanTxOption
{
TX_OPTION_NONE = 0, //!< TX_OPTION_NONE
TX_OPTION_ACK = 1, //!< TX_OPTION_ACK
TX_OPTION_GTS = 2, //!< TX_OPTION_GTS
TX_OPTION_INDIRECT = 4 //!< TX_OPTION_INDIRECT
} LrWpanTxOption;
};
/**
* \ingroup lr-wpan
*
* MAC states
*/
typedef enum
enum LrWpanMacState
{
MAC_IDLE, //!< MAC_IDLE
MAC_CSMA, //!< MAC_CSMA
@@ -81,45 +81,45 @@ typedef enum
MAC_GTS, //!< MAC_GTS
MAC_INACTIVE, //!< MAC_INACTIVE
MAC_CSMA_DEFERRED //!< MAC_CSMA_DEFERRED
} LrWpanMacState;
};
/**
* \ingroup lr-wpan
*
* Superframe status
*/
typedef enum
enum SuperframeStatus
{
BEACON, //!< The Beacon transmission or reception Period
CAP, //!< Contention Access Period
CFP, //!< Contention Free Period
INACTIVE //!< Inactive Period or unslotted CSMA-CA
} SuperframeStatus;
};
/**
* \ingroup lr-wpan
*
* Superframe type
*/
typedef enum
enum SuperframeType
{
OUTGOING = 0, //!< Outgoing Superframe
INCOMING = 1 //!< Incoming Superframe
} SuperframeType;
};
/**
* \ingroup lr-wpan
*
* Indicates a pending MAC primitive
*/
typedef enum
enum PendingPrimitiveStatus
{
MLME_NONE = 0, //!< No pending primitive
MLME_START_REQ = 1, //!< Pending MLME-START.request primitive
MLME_SCAN_REQ = 2, //!< Pending MLME-SCAN.request primitive
MLME_ASSOC_REQ = 3, //!< Pending MLME-ASSOCIATION.request primitive
MLME_SYNC_REQ = 4 //!< Pending MLME-SYNC.request primitive
} PendingPrimitiveStatus;
};
namespace TracedValueCallback
{
@@ -149,47 +149,47 @@ typedef void (*SuperframeStatus)(SuperframeStatus oldValue, SuperframeStatus new
*
* table 80 of 802.15.4
*/
typedef enum
enum LrWpanAddressMode
{
NO_PANID_ADDR = 0,
ADDR_MODE_RESERVED = 1,
SHORT_ADDR = 2,
EXT_ADDR = 3
} LrWpanAddressMode;
};
/**
* \ingroup lr-wpan
*
* table 83 of 802.15.4
*/
typedef enum
enum LrWpanAssociationStatus
{
ASSOCIATED = 0,
PAN_AT_CAPACITY = 1,
PAN_ACCESS_DENIED = 2,
ASSOCIATED_WITHOUT_ADDRESS = 0xfe,
DISASSOCIATED = 0xff
} LrWpanAssociationStatus;
};
/**
* \ingroup lr-wpan
*
* Table 30 of IEEE 802.15.4-2011
*/
typedef enum
enum LrWpanMlmeScanType
{
MLMESCAN_ED = 0x00,
MLMESCAN_ACTIVE = 0x01,
MLMESCAN_PASSIVE = 0x02,
MLMESCAN_ORPHAN = 0x03
} LrWpanMlmeScanType;
};
/**
* \ingroup lr-wpan
*
* Table 42 of 802.15.4-2006
*/
typedef enum
enum LrWpanMcpsDataConfirmStatus
{
IEEE_802_15_4_SUCCESS = 0,
IEEE_802_15_4_TRANSACTION_OVERFLOW = 1,
@@ -203,14 +203,14 @@ typedef enum
IEEE_802_15_4_UNAVAILABLE_KEY = 9,
IEEE_802_15_4_UNSUPPORTED_SECURITY = 10,
IEEE_802_15_4_INVALID_PARAMETER = 11
} LrWpanMcpsDataConfirmStatus;
};
/**
* \ingroup lr-wpan
*
* Table 35 of IEEE 802.15.4-2011
*/
typedef enum
enum LrWpanMlmeStartConfirmStatus
{
MLMESTART_SUCCESS = 0,
MLMESTART_NO_SHORT_ADDRESS = 1,
@@ -222,14 +222,14 @@ typedef enum
MLMESTART_UNAVAILABLE_KEY = 7,
MLMESTART_UNSUPPORTED_SECURITY = 8,
MLMESTART_CHANNEL_ACCESS_FAILURE = 9
} LrWpanMlmeStartConfirmStatus;
};
/**
* \ingroup lr-wpan
*
* Table 31 of IEEE 802.15.4-2011
*/
typedef enum
enum LrWpanMlmeScanConfirmStatus
{
MLMESCAN_SUCCESS = 0,
MLMESCAN_LIMIT_REACHED = 1,
@@ -240,14 +240,14 @@ typedef enum
MLMESCAN_UNAVAILABLE_KEY = 6,
MLMESCAN_UNSUPPORTED_SECURITY = 7,
MLMESCAN_INVALID_PARAMETER = 8
} LrWpanMlmeScanConfirmStatus;
};
/**
* \ingroup lr-wpan
*
* Table 12 of IEEE 802.15.4-2011
*/
typedef enum
enum LrWpanMlmeAssociateConfirmStatus
{
MLMEASSOC_SUCCESS = 0,
MLMEASSOC_FULL_CAPACITY = 1,
@@ -259,27 +259,27 @@ typedef enum
MLMEASSOC_FRAME_TOO_LONG = 7,
MLMEASSOC_UNSUPPORTED_LEGACY = 8,
MLMEASSOC_INVALID_PARAMETER = 9
} LrWpanMlmeAssociateConfirmStatus;
};
/**
* \ingroup lr-wpan
*
* Table 37 of IEEE 802.15.4-2011
*/
typedef enum
enum LrWpanSyncLossReason
{
MLMESYNCLOSS_PAN_ID_CONFLICT = 0,
MLMESYNCLOSS_REALIGMENT = 1,
MLMESYNCLOSS_BEACON_LOST = 2,
MLMESYNCLOSS_SUPERFRAME_OVERLAP = 3
} LrWpanSyncLossReason;
};
/**
* \ingroup lr-wpan
*
* Table 18 of IEEE 802.15.4-2011
*/
typedef enum
enum LrWpanMlmeCommStatus
{
MLMECOMMSTATUS_SUCCESS = 0,
MLMECOMMSTATUS_TRANSACTION_OVERFLOW = 1,
@@ -289,14 +289,14 @@ typedef enum
MLMECOMMSTATUS_COUNTER_ERROR = 5,
MLMECOMMSTATUS_FRAME_TOO_LONG = 6,
MLMECOMMSTATUS_INVALID_PARAMETER = 7
} LrWpanMlmeCommStatus;
};
/**
* \ingroup lr-wpan
*
* Table 39 of IEEE 802.15.4-2011
*/
typedef enum
enum LrWpanMlmePollConfirmStatus
{
MLMEPOLL_SUCCESS = 0,
MLMEPOLL_CHANNEL_ACCESS_FAILURE = 2,
@@ -307,7 +307,7 @@ typedef enum
MLMEPOLL_UNAVAILABLE_KEY = 7,
MLMEPOLL_UNSUPPORTED_SECURITY = 8,
MLMEPOLL_INVALID_PARAMETER = 9
} LrWpanMlmePollConfirmStatus;
};
/**
* \ingroup lr-wpan

View File

@@ -48,12 +48,12 @@ class ErrorModel;
*
* Helper structure to manage the power measurement during ED.
*/
typedef struct
struct LrWpanEdPower
{
double averagePower; //!< Average measured power
Time lastUpdate; //!< Last update time
Time measurementLength; //!< Total measurement period
} LrWpanEdPower;
};
/**
* \ingroup lr-wpan
@@ -61,11 +61,11 @@ typedef struct
* This data structure provides the Bit rate and Symbol rate for a given channel
* See IEEE802.15.4-2006 Table 1 and 2 in section 6.1.1 and 6.1.2
*/
typedef struct
struct LrWpanPhyDataAndSymbolRates
{
double bitRate; //!< bit rate
double symbolRate; //!< symbol rate
} LrWpanPhyDataAndSymbolRates;
};
/**
* \ingroup lr-wpan
@@ -73,19 +73,19 @@ typedef struct
* This data structure provides number of symbols for the PPDU headers: SHR and PHR
* See IEEE802.15.4-2006 Figure 16, Table 19 and 20 in section 6.3
*/
typedef struct
struct LrWpanPhyPpduHeaderSymbolNumber
{
double shrPreamble; //!< Number of symbols for the SHR preamble
double shrSfd; //!< Number of symbols for the SHR SFD
double phr; //!< Number of symbols for the PHR
} LrWpanPhyPpduHeaderSymbolNumber;
};
/**
* \ingroup lr-wpan
*
* This Phy option will be used to index various Tables in IEEE802.15.4-2011
*/
typedef enum
enum LrWpanPhyOption
{
IEEE_802_15_4_868MHZ_BPSK,
IEEE_802_15_4_915MHZ_BPSK,
@@ -97,7 +97,7 @@ typedef enum
IEEE_802_15_4_915MHZ_OQPSK,
IEEE_802_15_4_2_4GHZ_OQPSK,
IEEE_802_15_4_INVALID_PHY_OPTION
} LrWpanPhyOption;
};
/**
* \ingroup lr-wpan
@@ -105,7 +105,7 @@ typedef enum
* IEEE802.15.4-2006 PHY Emumerations Table 18
* in section 6.2.3
*/
typedef enum
enum LrWpanPhyEnumeration
{
IEEE_802_15_4_PHY_BUSY = 0x00,
IEEE_802_15_4_PHY_BUSY_RX = 0x01,
@@ -120,7 +120,7 @@ typedef enum
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
} LrWpanPhyEnumeration;
};
namespace TracedValueCallback
{
@@ -139,7 +139,7 @@ typedef void (*LrWpanPhyEnumeration)(LrWpanPhyEnumeration oldValue, LrWpanPhyEnu
*
* IEEE802.15.4-2006 PHY PIB Attribute Identifiers Table 23 in section 6.4.2
*/
typedef enum
enum LrWpanPibAttributeIdentifier
{
phyCurrentChannel = 0x00,
phyChannelsSupported = 0x01,
@@ -149,14 +149,14 @@ typedef enum
phyMaxFrameDuration = 0x05,
phySHRDuration = 0x06,
phySymbolsPerOctet = 0x07
} LrWpanPibAttributeIdentifier;
};
/**
* \ingroup lr-wpan
*
* IEEE802.15.4-2006 PHY PIB Attributes Table 23 in section 6.4.2
*/
typedef struct
struct LrWpanPhyPibAttributes
{
uint8_t phyCurrentChannel; //!< The RF channel to use
uint32_t phyChannelsSupported[32]; //!< BitField representing the available channels supported
@@ -168,7 +168,7 @@ typedef struct
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
} LrWpanPhyPibAttributes;
};
/**
* \ingroup lr-wpan

View File

@@ -57,13 +57,13 @@ class LrWpanAckTestCase : public TestCase
/**
* Test modes
*/
typedef enum
enum TestMode_e
{
EXTENDED_ADDRESS_UNICAST, //!< extended addresses
SHORT_ADDRESS_UNICAST, //!< short addresses, unicast
SHORT_ADDRESS_MULTICAST, //!< short addresses, multicast
SHORT_ADDRESS_BROADCAST, //!< short addresses, broadcast
} TestMode_e;
};
/**
* Create test case

View File

@@ -67,17 +67,17 @@ class LteRlcAmHeader : public Header
bool IsControlPdu() const;
/// DataControlPdu_t enumeration
typedef enum
enum DataControlPdu_t
{
CONTROL_PDU = 0,
DATA_PDU = 1
} DataControlPdu_t; ///< DataControlPdu_t typedef
};
/// ControlPduType_t enumeration
typedef enum
enum ControPduType_t
{
STATUS_PDU = 000,
} ControPduType_t; ///< ControPduType_t typedef
};
//
// DATA PDU
@@ -110,18 +110,18 @@ class LteRlcAmHeader : public Header
uint8_t GetFramingInfo() const;
/// FramingInfoFirstByte_t enumeration
typedef enum
enum FramingInfoFirstByte_t
{
FIRST_BYTE = 0x00,
NO_FIRST_BYTE = 0x02
} FramingInfoFirstByte_t; ///< FramingInfoFirstByte_t typedef
};
/// FramingInfoLastByte_t enumeration
typedef enum
enum FramingInfoLastByte_t
{
LAST_BYTE = 0x00,
NO_LAST_BYTE = 0x01
} FramingInfoLastByte_t; ///< FramingInfoLastByte_t typedef
};
/**
* Push extension bit function
@@ -150,11 +150,11 @@ class LteRlcAmHeader : public Header
uint16_t PopLengthIndicator();
/// ExtensionBit_t typedef
typedef enum
enum ExtensionBit_t
{
DATA_FIELD_FOLLOWS = 0,
E_LI_FIELDS_FOLLOWS = 1
} ExtensionBit_t; ///< ExtensionBit_t typedef
};
/**
* Pop extension bit function
@@ -170,11 +170,11 @@ class LteRlcAmHeader : public Header
uint8_t GetResegmentationFlag() const;
/// ResegmentationFlag_t typedef
typedef enum
enum ResegmentationFlag_t
{
PDU = 0,
SEGMENT = 1
} ResegmentationFlag_t; ///< ResegmentationFlag_t typedef
};
/**
* Set polling bit function
@@ -190,11 +190,11 @@ class LteRlcAmHeader : public Header
uint8_t GetPollingBit() const;
/// PollingBit_t enumeration
typedef enum
enum PollingBit_t
{
STATUS_REPORT_NOT_REQUESTED = 0,
STATUS_REPORT_IS_REQUESTED = 1
} PollingBit_t; ///< PollingBit_t typedef
};
/**
* Set last segment flag function
@@ -210,11 +210,11 @@ class LteRlcAmHeader : public Header
uint8_t GetLastSegmentFlag() const;
/// LastSegmentFlag_t typedef
typedef enum
enum LastSegmentFlag_t
{
NO_LAST_PDU_SEGMENT = 0,
LAST_PDU_SEGMENT = 1
} LastSegmentFlag_t; ///< LastSegmentFlag_t enumeration
};
/**
* Set segment offset function

View File

@@ -222,12 +222,12 @@ class LteRlcAm : public LteRlc
/**
* SDU Reassembling state
*/
typedef enum
enum ReassemblingState_t
{
NONE = 0,
WAITING_S0_FULL = 1,
WAITING_SI_SF = 2
} ReassemblingState_t;
};
ReassemblingState_t m_reassemblingState; ///< reassembling state
Ptr<Packet> m_keepS0; ///< keep S0

View File

@@ -100,25 +100,25 @@ class LteRlcHeader : public Header
uint16_t PopLengthIndicator();
/// ExtensionBit_t typedef
typedef enum
enum ExtensionBit_t
{
DATA_FIELD_FOLLOWS = 0,
E_LI_FIELDS_FOLLOWS = 1
} ExtensionBit_t; ///< ExtensionBit_t enumeration
};
/// FramingInfoFirstByte_t typedef
typedef enum
enum FramingInfoFirstByte_t
{
FIRST_BYTE = 0x00,
NO_FIRST_BYTE = 0x02
} FramingInfoFirstByte_t; ///< FramingInfoFirstByte_t enumeration
};
/// FramingInfoLastByte_t tyedef
typedef enum
enum FramingInfoLastByte_t
{
LAST_BYTE = 0x00,
NO_LAST_BYTE = 0x01
} FramingInfoLastByte_t; ///< FramingInfoLastByte_t enumeration
};
/**
* \brief Get the type ID.

View File

@@ -59,15 +59,15 @@ class LteRlcSduStatusTag : public Tag
void Deserialize(TagBuffer i) override;
void Print(std::ostream& os) const override;
/// SduStatus_t typedef
typedef enum
/// SduStatus_t enumeration
enum SduStatus_t
{
FULL_SDU = 1,
FIRST_SEGMENT = 2,
MIDDLE_SEGMENT = 3,
LAST_SEGMENT = 4,
ANY_SEGMENT = 5
} SduStatus_t; ///< SduStatus_t enumeration
};
private:
uint8_t m_sduStatus; ///< SDU status

View File

@@ -150,12 +150,12 @@ class LteRlcUm : public LteRlc
/**
* Reassembling state
*/
typedef enum
enum ReassemblingState_t
{
NONE = 0,
WAITING_S0_FULL = 1,
WAITING_SI_SF = 2
} ReassemblingState_t;
};
ReassemblingState_t m_reassemblingState; ///< reassembling state
Ptr<Packet> m_keepS0; ///< keep S0

View File

@@ -311,11 +311,11 @@ class LteTestMac : public Object
void SetRlcHeaderType(uint8_t rlcHeaderType);
/// RCL Header Type enumeration
typedef enum
enum RlcHeaderType_t
{
UM_RLC_HEADER = 0,
AM_RLC_HEADER = 1,
} RlcHeaderType_t; ///< the RLC header type
};
/**
* Set transmit opportunity mode
@@ -324,12 +324,12 @@ class LteTestMac : public Object
void SetTxOpportunityMode(uint8_t mode);
/// Transmit opportunity mode enumeration
typedef enum
enum TxOpportunityMode_t
{
MANUAL_MODE = 0,
AUTOMATIC_MODE = 1,
RANDOM_MODE = 2
} TxOpportunityMode_t; ///< transmit opportunity mode
};
/**
* Set transmit opportunity time

View File

@@ -97,11 +97,11 @@ class AnimationInterface
/**
* Counter Types
*/
typedef enum
enum CounterType
{
UINT32_COUNTER,
DOUBLE_COUNTER
} CounterType;
};
/**
* \brief typedef for WriteCallBack used for listening to AnimationInterface
@@ -474,27 +474,27 @@ class AnimationInterface
};
/// RGB structure
typedef struct
struct Rgb
{
uint8_t r; ///< r
uint8_t g; ///< g
uint8_t b; ///< b
} Rgb; ///< RGB structure
}; ///< RGB structure
/// P2pLinkNodeIdPair structure
typedef struct
struct P2pLinkNodeIdPair
{
uint32_t fromNode; ///< from node
uint32_t toNode; ///< to node
} P2pLinkNodeIdPair; ///< P2P link node id pair
}; ///< P2P link node id pair
/// LinkProperties structure
typedef struct
struct LinkProperties
{
std::string fromNodeDescription; ///< from node description
std::string toNodeDescription; ///< to node description
std::string linkDescription; ///< link description
} LinkProperties; ///< link properties
}; ///< link properties
/// LinkPairCompare structure
struct LinkPairCompare
@@ -523,21 +523,21 @@ class AnimationInterface
};
/// Ipv4RouteTrackElement structure
typedef struct
struct Ipv4RouteTrackElement
{
std::string destination; ///< destination
uint32_t fromNodeId; ///< from node ID
} Ipv4RouteTrackElement; ///< IPv4 route track element
}; ///< IPv4 route track element
/// Ipv4RoutePathElement structure
typedef struct
struct Ipv4RoutePathElement
{
uint32_t nodeId; ///< node ID
std::string nextHop; ///< next hop
} Ipv4RoutePathElement; ///< IPv4 route path element
}; ///< IPv4 route path element
/// ProtocolType enumeration
typedef enum
enum ProtocolType
{
UAN,
LTE,
@@ -546,14 +546,14 @@ class AnimationInterface
CSMA,
LRWPAN,
WAVE
} ProtocolType;
};
/// NodeSize structure
typedef struct
struct NodeSize
{
double width; ///< width
double height; ///< height
} NodeSize; ///< node size
}; ///< node size
typedef std::map<P2pLinkNodeIdPair, LinkProperties, LinkPairCompare>
LinkPropertiesMap; ///< LinkPropertiesMap typedef

View File

@@ -1116,14 +1116,14 @@ static const uint32_t N_PACKET_BYTES = 16;
/**
* PCAP Packet structure
*/
typedef struct PACKET_ENTRY
struct PacketEntry
{
uint32_t tsSec; //!< Time (seconds part)
uint32_t tsUsec; //!< Time (micro seconds part)
uint32_t inclLen; //!< Length of the entry in the PCAP
uint32_t origLen; //!< length of the original packet
uint16_t data[N_PACKET_BYTES]; //!< Packet data
} PacketEntry;
};
static const PacketEntry knownPackets[] = {
{2,

View File

@@ -296,7 +296,7 @@ class PcapFile
/**
* \brief Pcap file header
*/
typedef struct
struct PcapFileHeader
{
uint32_t m_magicNumber; //!< Magic number identifying this as a pcap file
uint16_t
@@ -307,18 +307,18 @@ class PcapFile
uint32_t m_sigFigs; //!< Unused by pretty much everybody
uint32_t m_snapLen; //!< Maximum length of packet data stored in records
uint32_t m_type; //!< Data link type of packet data
} PcapFileHeader;
};
/**
* \brief Pcap record header
*/
typedef struct
struct PcapRecordHeader
{
uint32_t m_tsSec; //!< seconds part of timestamp
uint32_t m_tsUsec; //!< microseconds part of timestamp (nsecs for PCAP_NSEC_MAGIC)
uint32_t m_inclLen; //!< number of octets of packet saved in file
uint32_t m_origLen; //!< actual length of original packet
} PcapRecordHeader;
};
/**
* \brief Swap a value byte order

View File

@@ -69,13 +69,13 @@ class ThreeGppChannelConditionModelTestCase : public TestCase
/**
* Struct containing the parameters for each test
*/
typedef struct
struct TestVector
{
Vector m_positionA; //!< the position of the first node
Vector m_positionB; //!< the position of the second node
double m_pLos; //!< LOS probability
TypeId m_typeId; //!< the type ID of the channel condition model to be used
} TestVector;
};
TestVectors<TestVector> m_testVectors; //!< array containing all the test vectors
Ptr<ThreeGppChannelConditionModel> m_condModel; //!< the channel condition model

View File

@@ -53,13 +53,13 @@ class FriisPropagationLossModelTestCase : public TestCase
void DoRun() override;
/// Test vector
typedef struct
struct TestVector
{
Vector m_position; //!< Test node position
double m_pt; //!< Tx power [dBm]
double m_pr; //!< Rx power [W]
double m_tolerance; //!< Tolerance
} TestVector;
};
/// Test vectors
TestVectors<TestVector> m_testVectors;
@@ -164,13 +164,13 @@ class TwoRayGroundPropagationLossModelTestCase : public TestCase
void DoRun() override;
/// Test vector
typedef struct
struct TestVector
{
Vector m_position; //!< Test node position
double m_pt; //!< Tx power [dBm]
double m_pr; //!< Rx power [W]
double m_tolerance; //!< Tolerance
} TestVector;
};
/// Test vectors
TestVectors<TestVector> m_testVectors;
@@ -304,13 +304,13 @@ class LogDistancePropagationLossModelTestCase : public TestCase
void DoRun() override;
/// Test vector
typedef struct
struct TestVector
{
Vector m_position; //!< Test node position
double m_pt; //!< Tx power [dBm]
double m_pr; //!< Rx power [W]
double m_tolerance; //!< Tolerance
} TestVector;
};
/// Test vectors
TestVectors<TestVector> m_testVectors;

View File

@@ -63,14 +63,14 @@ class ThreeGppRmaPropagationLossModelTestCase : public TestCase
/**
* Struct containing the parameters for each test
*/
typedef struct
struct TestVector
{
double m_distance; //!< 2D distance between UT and BS in meters
bool m_isLos; //!< if true LOS, if false NLOS
double m_frequency; //!< carrier frequency in Hz
double m_pt; //!< transmitted power in dBm
double m_pr; //!< received power in dBm
} TestVector;
};
TestVectors<TestVector> m_testVectors; //!< array containing all the test vectors
double m_tolerance; //!< tolerance
@@ -226,14 +226,14 @@ class ThreeGppUmaPropagationLossModelTestCase : public TestCase
/**
* Struct containing the parameters for each test
*/
typedef struct
struct TestVector
{
double m_distance; //!< 2D distance between UT and BS in meters
bool m_isLos; //!< if true LOS, if false NLOS
double m_frequency; //!< carrier frequency in Hz
double m_pt; //!< transmitted power in dBm
double m_pr; //!< received power in dBm
} TestVector;
};
TestVectors<TestVector> m_testVectors; //!< array containing all the test vectors
double m_tolerance; //!< tolerance
@@ -389,14 +389,14 @@ class ThreeGppUmiPropagationLossModelTestCase : public TestCase
/**
* Struct containing the parameters for each test
*/
typedef struct
struct TestVector
{
double m_distance; //!< 2D distance between UT and BS in meters
bool m_isLos; //!< if true LOS, if false NLOS
double m_frequency; //!< carrier frequency in Hz
double m_pt; //!< transmitted power in dBm
double m_pr; //!< received power in dBm
} TestVector;
};
TestVectors<TestVector> m_testVectors; //!< array containing all the test vectors
double m_tolerance; //!< tolerance
@@ -546,14 +546,14 @@ class ThreeGppIndoorOfficePropagationLossModelTestCase : public TestCase
/**
* Struct containing the parameters for each test
*/
typedef struct
struct TestVector
{
double m_distance; //!< 2D distance between UT and BS in meters
bool m_isLos; //!< if true LOS, if false NLOS
double m_frequency; //!< carrier frequency in Hz
double m_pt; //!< transmitted power in dBm
double m_pr; //!< received power in dBm
} TestVector;
};
TestVectors<TestVector> m_testVectors; //!< array containing all the test vectors
double m_tolerance; //!< tolerance
@@ -720,14 +720,14 @@ class ThreeGppV2vUrbanPropagationLossModelTestCase : public TestCase
/**
* Struct containing the parameters for each test
*/
typedef struct
struct TestVector
{
double m_distance; //!< 2D distance between UT and BS in meters
bool m_isLos; //!< if true LOS/NLOSv, if false NLOS
double m_frequency; //!< carrier frequency in Hz
double m_pt; //!< transmitted power in dBm
double m_pr; //!< received power in dBm
} TestVector;
};
TestVectors<TestVector> m_testVectors; //!< array containing all the test vectors
double m_tolerance; //!< tolerance
@@ -879,14 +879,14 @@ class ThreeGppV2vHighwayPropagationLossModelTestCase : public TestCase
/**
* Struct containing the parameters for each test
*/
typedef struct
struct TestVector
{
double m_distance; //!< 2D distance between UT and BS in meters
bool m_isLos; //!< if true LOS/NLOSv, if false NLOS
double m_frequency; //!< carrier frequency in Hz
double m_pt; //!< transmitted power in dBm
double m_pr; //!< received power in dBm
} TestVector;
};
TestVectors<TestVector> m_testVectors; //!< array containing all the test vectors
double m_tolerance; //!< tolerance
@@ -1047,7 +1047,7 @@ class ThreeGppShadowingTestCase : public TestCase
/**
* Struct containing the parameters for each test
*/
typedef struct
struct TestVector
{
std::string m_propagationLossModelType; //!< the propagation loss model type id
double m_hBs; //!< the BS height in meters
@@ -1057,7 +1057,7 @@ class ThreeGppShadowingTestCase : public TestCase
//!< case in dB
double m_shadowingStdNlos; //!< the standard deviation of the shadowing component in the
//!< NLOS case in dB
} TestVector;
};
TestVectors<TestVector> m_testVectors; //!< array containing all the test vectors
Ptr<ThreeGppPropagationLossModel> m_lossModel; //!< the propagation loss model

View File

@@ -50,12 +50,12 @@ class SixlowpanIphcStatefulImplTest : public TestCase
/**
* \brief Structure to hold the Rx/Tx packets.
*/
typedef struct
struct Data
{
Ptr<Packet> packet; /**< Packet data */
Address src; /**< Source address */
Address dst; /**< Destination address */
} Data;
};
std::vector<Data> m_txPackets; //!< Transmitted packets
std::vector<Data> m_rxPackets; //!< Received packets

View File

@@ -107,13 +107,13 @@ class UanMacCw : public UanMac, public UanPhyListener
private:
/** Enum defining possible Phy states. */
typedef enum
enum State
{
IDLE, //!< Idle state.
CCABUSY, //!< Channel busy.
RUNNING, //!< Delay timer running.
TX //!< Transmitting.
} State;
};
/** Forwarding up callback. */
Callback<void, Ptr<Packet>, uint16_t, const Mac8Address&> m_forwardUpCb;

View File

@@ -48,13 +48,13 @@ class UanTxMode
/**
* Modulation type.
*/
typedef enum
enum ModulationType
{
PSK, //!< Phase shift keying.
QAM, //!< Quadrature amplitude modulation.
FSK, //!< Frequency shift keying.
OTHER //!< Unspecified/undefined.
} ModulationType;
};
/**
* Get the modulation type of the mode.

View File

@@ -448,14 +448,14 @@ class ApWifiMac : public WifiMac
Time m_bsrLifetime; //!< Lifetime of Buffer Status Reports
/// store value and timestamp for each Buffer Status Report
typedef struct
struct BsrType
{
uint8_t value; //!< value of BSR
Time timestamp; //!< timestamp of BSR
} bsrType;
};
/// Per (MAC address, TID) buffer status reports
std::unordered_map<WifiAddressTidPair, bsrType, WifiAddressTidHash> m_bufferStatus;
std::unordered_map<WifiAddressTidPair, BsrType, WifiAddressTidHash> m_bufferStatus;
/**
* TracedCallback signature for association/deassociation events.

View File

@@ -36,11 +36,11 @@ namespace ns3
/**
* Structure for integral function parameters
*/
typedef struct FunctionParameterType
struct FunctionParameters
{
double beta; ///< Beta parameter
double n; ///< n parameter
} FunctionParameters;
};
/**
* Integral function using GSL library

View File

@@ -1359,13 +1359,13 @@ PrintMakeChecker(std::ostream& os, const std::string& name, const std::string& h
} // PrintMakeChecker ()
/**Descriptor for an AttributeValue. */
typedef struct
struct AttributeDescriptor
{
const std::string m_name; //!< The base name of the resulting AttributeValue type.
const std::string m_type; //!< The name of the underlying type.
const bool m_seeBase; //!< Print a "see also" pointing to the base class.
const std::string m_header; //!< The header file name.
} AttributeDescriptor;
};
/**
* Print documentation corresponding to use of the