ns-3
|
Public Types | |
enum | State { SS_STATE_IDLE, SS_STATE_SCANNING, SS_STATE_SYNCHRONIZING, SS_STATE_ACQUIRING_PARAMETERS, SS_STATE_WAITING_REG_RANG_INTRVL, SS_STATE_WAITING_INV_RANG_INTRVL, SS_STATE_WAITING_RNG_RSP, SS_STATE_ADJUSTING_PARAMETERS, SS_STATE_REGISTERED, SS_STATE_TRANSMITTING, SS_STATE_STOPPED } |
enum | EventType { EVENT_NONE, EVENT_WAIT_FOR_RNG_RSP, EVENT_DL_MAP_SYNC_TIMEOUT, EVENT_LOST_DL_MAP, EVENT_LOST_UL_MAP, EVENT_DCD_WAIT_TIMEOUT, EVENT_UCD_WAIT_TIMEOUT, EVENT_RANG_OPP_WAIT_TIMEOUT } |
![]() | |
enum | Direction { DIRECTION_DOWNLINK, DIRECTION_UPLINK } |
enum | RangingStatus { RANGING_STATUS_EXPIRED, RANGING_STATUS_CONTINUE, RANGING_STATUS_ABORT, RANGING_STATUS_SUCCESS } |
![]() | |
enum | PacketType { PACKET_HOST = 1, NS3_PACKET_HOST = PACKET_HOST, PACKET_BROADCAST, NS3_PACKET_BROADCAST = PACKET_BROADCAST, PACKET_MULTICAST, NS3_PACKET_MULTICAST = PACKET_MULTICAST, PACKET_OTHERHOST, NS3_PACKET_OTHERHOST = PACKET_OTHERHOST } |
typedef Callback< bool, Ptr < NetDevice >, Ptr< const Packet >, uint16_t, const Address & > | ReceiveCallback |
typedef Callback< bool, Ptr < NetDevice >, Ptr< const Packet >, uint16_t, const Address &, const Address &, enum PacketType > | PromiscReceiveCallback |
Public Member Functions | |
SubscriberStationNetDevice (Ptr< Node >, Ptr< WimaxPhy >) | |
void | InitSubscriberStationNetDevice (void) |
initializes the net device and sets the parameters to the default values | |
void | SetLostDlMapInterval (Time lostDlMapInterval) |
Time | GetLostDlMapInterval (void) const |
void | SetLostUlMapInterval (Time lostUlMapInterval) |
Time | GetLostUlMapInterval (void) const |
void | SetMaxDcdInterval (Time maxDcdInterval) |
Time | GetMaxDcdInterval (void) const |
void | SetMaxUcdInterval (Time maxUcdInterval) |
Time | GetMaxUcdInterval (void) const |
void | SetIntervalT1 (Time interval1) |
Time | GetIntervalT1 (void) const |
void | SetIntervalT2 (Time interval2) |
Time | GetIntervalT2 (void) const |
void | SetIntervalT3 (Time interval3) |
Time | GetIntervalT3 (void) const |
void | SetIntervalT7 (Time interval7) |
Time | GetIntervalT7 (void) const |
void | SetIntervalT12 (Time interval12) |
Time | GetIntervalT12 (void) const |
void | SetIntervalT20 (Time interval20) |
Time | GetIntervalT20 (void) const |
void | SetIntervalT21 (Time interval21) |
Time | GetIntervalT21 (void) const |
void | SetMaxContentionRangingRetries (uint8_t maxContentionRangingRetries) |
uint8_t | GetMaxContentionRangingRetries (void) const |
void | SetBasicConnection (Ptr< WimaxConnection > basicConnection) |
Ptr< WimaxConnection > | GetBasicConnection (void) const |
void | SetPrimaryConnection (Ptr< WimaxConnection > primaryConnection) |
Ptr< WimaxConnection > | GetPrimaryConnection (void) const |
Cid | GetBasicCid (void) const |
Cid | GetPrimaryCid (void) const |
void | SetModulationType (WimaxPhy::ModulationType modulationType) |
Set the most efficient modulation and coding scheme (MCS) supported by the device. | |
WimaxPhy::ModulationType | GetModulationType (void) const |
void | SetAreManagementConnectionsAllocated (bool areManagementConnectionsAllocated) |
bool | GetAreManagementConnectionsAllocated (void) const |
void | SetAreServiceFlowsAllocated (bool areServiceFlowsAllocated) |
bool | GetAreServiceFlowsAllocated (void) const |
Ptr< SSScheduler > | GetScheduler (void) const |
void | SetScheduler (Ptr< SSScheduler > ssScheduler) |
bool | HasServiceFlows (void) const |
bool | Enqueue (Ptr< Packet > packet, const MacHeaderType &hdrType, Ptr< WimaxConnection > connection) |
Enqueue a packet into a connection queue. | |
void | SendBurst (uint8_t uiuc, uint16_t nrSymbols, Ptr< WimaxConnection > connection, MacHeaderType::HeaderType packetType=MacHeaderType::HEADER_TYPE_GENERIC) |
Sends a burst on the uplink frame. | |
void | Start (void) |
void | Stop (void) |
void | AddServiceFlow (ServiceFlow *sf) |
adds a new service flow | |
void | AddServiceFlow (ServiceFlow sf) |
adds a new service flow | |
void | SetTimer (EventId eventId, EventId &event) |
bool | IsRegistered (void) const |
Time | GetTimeToAllocation (Time defferTime) |
Ptr< IpcsClassifier > | GetIpcsClassifier () const |
void | SetIpcsPacketClassifier (Ptr< IpcsClassifier >) |
Sets the packet classifier to be used. | |
Ptr< SSLinkManager > | GetLinkManager (void) const |
void | SetLinkManager (Ptr< SSLinkManager >) |
sets the link manager to be used | |
Ptr< SsServiceFlowManager > | GetServiceFlowManager (void) const |
void | SetServiceFlowManager (Ptr< SsServiceFlowManager >) |
Sets the service flow manager to be installed on the device. | |
![]() | |
void | SetTtg (uint16_t ttg) |
uint16_t | GetTtg (void) const |
void | SetRtg (uint16_t rtg) |
uint16_t | GetRtg (void) const |
void | Attach (Ptr< WimaxChannel > channel) |
void | SetPhy (Ptr< WimaxPhy > phy) |
Ptr< WimaxPhy > | GetPhy (void) const |
void | SetChannel (Ptr< WimaxChannel > wimaxChannel) |
uint64_t | GetChannel (uint8_t index) const |
void | SetNrFrames (uint32_t nrFrames) |
uint32_t | GetNrFrames (void) const |
void | SetMacAddress (Mac48Address address) |
Mac48Address | GetMacAddress (void) const |
void | SetState (uint8_t state) |
uint8_t | GetState (void) const |
Ptr< WimaxConnection > | GetInitialRangingConnection (void) const |
Ptr< WimaxConnection > | GetBroadcastConnection (void) const |
void | SetCurrentDcd (Dcd dcd) |
Dcd | GetCurrentDcd (void) const |
void | SetCurrentUcd (Ucd ucd) |
Ucd | GetCurrentUcd (void) const |
Ptr< ConnectionManager > | GetConnectionManager (void) const |
virtual void | SetConnectionManager (Ptr< ConnectionManager > connectionManager) |
Ptr< BurstProfileManager > | GetBurstProfileManager (void) const |
void | SetBurstProfileManager (Ptr< BurstProfileManager > burstProfileManager) |
Ptr< BandwidthManager > | GetBandwidthManager (void) const |
void | SetBandwidthManager (Ptr< BandwidthManager > bandwidthManager) |
void | CreateDefaultConnections (void) |
void | SetReceiveCallback (void) |
void | ForwardUp (Ptr< Packet > packet, const Mac48Address &source, const Mac48Address &dest) |
void | ForwardDown (Ptr< PacketBurst > burst, WimaxPhy::ModulationType modulationType) |
virtual void | SetName (const std::string name) |
virtual std::string | GetName (void) const |
virtual void | SetIfIndex (const uint32_t index) |
virtual uint32_t | GetIfIndex (void) const |
virtual Ptr< Channel > | GetPhyChannel (void) const |
virtual Ptr< Channel > | GetChannel (void) const |
virtual void | SetAddress (Address address) |
virtual Address | GetAddress (void) const |
virtual bool | SetMtu (const uint16_t mtu) |
virtual uint16_t | GetMtu (void) const |
virtual bool | IsLinkUp (void) const |
virtual void | SetLinkChangeCallback (Callback< void > callback) |
virtual bool | IsBroadcast (void) const |
virtual Address | GetBroadcast (void) const |
virtual bool | IsMulticast (void) const |
virtual Address | GetMulticast (void) const |
virtual Address | MakeMulticastAddress (Ipv4Address multicastGroup) const |
virtual bool | IsPointToPoint (void) const |
Return true if the net device is on a point-to-point link. | |
virtual bool | Send (Ptr< Packet > packet, const Address &dest, uint16_t protocolNumber) |
virtual void | SetNode (Ptr< Node > node) |
virtual Ptr< Node > | GetNode (void) const |
virtual bool | NeedsArp (void) const |
virtual void | SetReceiveCallback (NetDevice::ReceiveCallback cb) |
virtual void | AddLinkChangeCallback (Callback< void > callback) |
virtual bool | SendFrom (Ptr< Packet > packet, const Address &source, const Address &dest, uint16_t protocolNumber) |
virtual void | SetPromiscReceiveCallback (PromiscReceiveCallback cb) |
NetDevice::PromiscReceiveCallback | GetPromiscReceiveCallback (void) |
virtual bool | SupportsSendFrom (void) const |
virtual Address | GetMulticast (Ipv6Address addr) const |
Get the MAC multicast address corresponding to the IPv6 address provided. | |
virtual Address | GetMulticast (Ipv4Address multicastGroup) const |
Make and return a MAC multicast address using the provided multicast group. | |
virtual bool | IsBridge (void) const |
Return true if the net device is acting as a bridge. | |
bool | IsPromisc (void) |
void | NotifyPromiscTrace (Ptr< Packet > p) |
Static Public Member Functions | |
static TypeId | GetTypeId (void) |
This method returns the TypeId associated to ns3::SubscriberStationNetDevice. |
Public Attributes | |
Ptr< SSLinkManager > | m_linkManager |
![]() | |
TracedCallback< Ptr< const Packet >, const Mac48Address & > | m_traceRx |
TracedCallback< Ptr< const Packet >, const Mac48Address & > | m_traceTx |
Additional Inherited Members | |
![]() | |
static uint8_t | m_direction = ~0 |
static Time | m_frameStartTime = Seconds (0) |
|
virtual |
Enqueue a packet into a connection queue.
packet | the packet to be enqueued |
hdrType | the mac header type to be appended to the packet |
connection | the connection to be used |
Implements ns3::WimaxNetDevice.
References ns3::Packet::AddHeader(), ns3::WimaxConnection::Enqueue(), ns3::WimaxConnection::GetSchedulingType(), ns3::GenericMacHeader::GetSerializedSize(), ns3::Packet::GetSize(), NS_ASSERT_MSG, and NS_LOG_INFO.
bool ns3::SubscriberStationNetDevice::GetAreManagementConnectionsAllocated | ( | void | ) | const |
bool ns3::SubscriberStationNetDevice::GetAreServiceFlowsAllocated | ( | void | ) | const |
Cid ns3::SubscriberStationNetDevice::GetBasicCid | ( | void | ) | const |
Ptr< WimaxConnection > ns3::SubscriberStationNetDevice::GetBasicConnection | ( | void | ) | const |
Time ns3::SubscriberStationNetDevice::GetIntervalT1 | ( | void | ) | const |
returns the wait for DCD timeout
Referenced by GetTypeId().
Time ns3::SubscriberStationNetDevice::GetIntervalT12 | ( | void | ) | const |
returns the wait for UCD descriptor timeout
Referenced by GetTypeId().
Time ns3::SubscriberStationNetDevice::GetIntervalT2 | ( | void | ) | const |
returns the wait for broadcast ranging timeout, i.e., wait for initial ranging opportunity
Referenced by GetTypeId().
Time ns3::SubscriberStationNetDevice::GetIntervalT20 | ( | void | ) | const |
returns the Time the SS searches for preambles on a given channel
Referenced by GetTypeId().
Time ns3::SubscriberStationNetDevice::GetIntervalT21 | ( | void | ) | const |
returns the time the SS searches for (decodable) DL-MAP on a given channel
Referenced by GetTypeId().
Time ns3::SubscriberStationNetDevice::GetIntervalT3 | ( | void | ) | const |
returns the ranging Response reception timeout following the transmission of a ranging request
Referenced by GetTypeId().
Time ns3::SubscriberStationNetDevice::GetIntervalT7 | ( | void | ) | const |
returns the wait for DSA/DSC/DSD Response timeout
Referenced by GetTypeId().
Ptr< IpcsClassifier > ns3::SubscriberStationNetDevice::GetIpcsClassifier | ( | ) | const |
Referenced by GetTypeId().
Ptr< SSLinkManager > ns3::SubscriberStationNetDevice::GetLinkManager | ( | void | ) | const |
Referenced by GetTypeId().
Time ns3::SubscriberStationNetDevice::GetLostUlMapInterval | ( | void | ) | const |
returns the time since last received UL-MAP before uplink synchronization is considered lost
Referenced by GetTypeId().
uint8_t ns3::SubscriberStationNetDevice::GetMaxContentionRangingRetries | ( | void | ) | const |
Referenced by GetTypeId().
Time ns3::SubscriberStationNetDevice::GetMaxDcdInterval | ( | void | ) | const |
returns the maximum time between transmission of DCD messages
Referenced by GetTypeId().
Time ns3::SubscriberStationNetDevice::GetMaxUcdInterval | ( | void | ) | const |
returns the maximum time between transmission of UCD messages
Referenced by GetTypeId().
WimaxPhy::ModulationType ns3::SubscriberStationNetDevice::GetModulationType | ( | void | ) | const |
returns the most efficient modulation and coding scheme (MCS) supported by the device
Cid ns3::SubscriberStationNetDevice::GetPrimaryCid | ( | void | ) | const |
Ptr< WimaxConnection > ns3::SubscriberStationNetDevice::GetPrimaryConnection | ( | void | ) | const |
returns the primary connection currently usde
Ptr< SSScheduler > ns3::SubscriberStationNetDevice::GetScheduler | ( | void | ) | const |
Referenced by GetTypeId().
Ptr< SsServiceFlowManager > ns3::SubscriberStationNetDevice::GetServiceFlowManager | ( | void | ) | const |
Referenced by AddServiceFlow(), and HasServiceFlows().
|
static |
This method returns the TypeId associated to ns3::SubscriberStationNetDevice.
This object is accessible through the following paths with Config::Set and Config::Connect:
Attributes defined for this type:
Attributes defined in parent class ns3::WimaxNetDevice:
TraceSources defined for this type:
TraceSources defined in parent class ns3::WimaxNetDevice:
Reimplemented from ns3::WimaxNetDevice.
References GetIntervalT1(), GetIntervalT12(), GetIntervalT2(), GetIntervalT20(), GetIntervalT21(), GetIntervalT3(), GetIntervalT7(), GetIpcsClassifier(), GetLinkManager(), GetLostUlMapInterval(), GetMaxContentionRangingRetries(), GetMaxDcdInterval(), GetMaxUcdInterval(), GetScheduler(), ns3::MakeTraceSourceAccessor(), ns3::MilliSeconds(), ns3::Seconds(), SetIntervalT1(), SetIntervalT12(), SetIntervalT2(), SetIntervalT20(), SetIntervalT21(), SetIntervalT3(), SetIntervalT7(), SetIpcsPacketClassifier(), SetLinkManager(), SetLostDlMapInterval(), SetLostUlMapInterval(), SetMaxContentionRangingRetries(), SetMaxDcdInterval(), SetMaxUcdInterval(), ns3::TypeId::SetParent(), and SetScheduler().
bool ns3::SubscriberStationNetDevice::HasServiceFlows | ( | void | ) | const |
References GetServiceFlowManager().
bool ns3::SubscriberStationNetDevice::IsRegistered | ( | void | ) | const |
Referenced by SendBurst().
void ns3::SubscriberStationNetDevice::SetAreManagementConnectionsAllocated | ( | bool | areManagementConnectionsAllocated | ) |
areManagementConnectionsAllocated | true if the management connections are allocated, false otherwise |
void ns3::SubscriberStationNetDevice::SetAreServiceFlowsAllocated | ( | bool | areServiceFlowsAllocated | ) |
areServiceFlowsAllocated | true if the service flows are allocated, false otherwise |
void ns3::SubscriberStationNetDevice::SetBasicConnection | ( | Ptr< WimaxConnection > | basicConnection | ) |
basicConnection | the basic connection to be used |
void ns3::SubscriberStationNetDevice::SetIntervalT1 | ( | Time | interval1 | ) |
interval1 | Wait for DCD timeout |
Referenced by GetTypeId().
void ns3::SubscriberStationNetDevice::SetIntervalT12 | ( | Time | interval12 | ) |
interval12 | the Wait for UCD descriptor timeout |
Referenced by GetTypeId().
void ns3::SubscriberStationNetDevice::SetIntervalT2 | ( | Time | interval2 | ) |
interval2 | the wait for broadcast ranging timeout, i.e., wait for initial ranging opportunity |
Referenced by GetTypeId().
void ns3::SubscriberStationNetDevice::SetIntervalT20 | ( | Time | interval20 | ) |
interval20 | the Time the SS searches for preambles on a given channel |
Referenced by GetTypeId().
void ns3::SubscriberStationNetDevice::SetIntervalT21 | ( | Time | interval21 | ) |
interval21 | the time the SS searches for (decodable) DL-MAP on a given channel |
Referenced by GetTypeId().
void ns3::SubscriberStationNetDevice::SetIntervalT3 | ( | Time | interval3 | ) |
interval3 | the ranging Response reception timeout following the transmission of a ranging request |
Referenced by GetTypeId().
void ns3::SubscriberStationNetDevice::SetIntervalT7 | ( | Time | interval7 | ) |
interval7 | the wait for DSA/DSC/DSD Response timeout |
Referenced by GetTypeId().
void ns3::SubscriberStationNetDevice::SetLostDlMapInterval | ( | Time | lostDlMapInterval | ) |
lostDlMapInterval | time since last received DL-MAP message before downlink synchronization is considered lost |
Referenced by GetTypeId().
void ns3::SubscriberStationNetDevice::SetLostUlMapInterval | ( | Time | lostUlMapInterval | ) |
lostUlMapInterval | Time since last received UL-MAP before uplink synchronization is considered lost |
Referenced by GetTypeId().
void ns3::SubscriberStationNetDevice::SetMaxContentionRangingRetries | ( | uint8_t | maxContentionRangingRetries | ) |
maxContentionRangingRetries | the Number of retries on contention Ranging Requests |
Referenced by GetTypeId().
void ns3::SubscriberStationNetDevice::SetMaxDcdInterval | ( | Time | maxDcdInterval | ) |
maxDcdInterval | Maximum time between transmission of DCD messages |
Referenced by GetTypeId().
void ns3::SubscriberStationNetDevice::SetMaxUcdInterval | ( | Time | maxUcdInterval | ) |
maxUcdInterval | Maximum time between transmission of UCD messages |
Referenced by GetTypeId().
void ns3::SubscriberStationNetDevice::SetModulationType | ( | WimaxPhy::ModulationType | modulationType | ) |
Set the most efficient modulation and coding scheme (MCS) supported by the device.
modulationType | the most robust MCS supported |
void ns3::SubscriberStationNetDevice::SetPrimaryConnection | ( | Ptr< WimaxConnection > | primaryConnection | ) |
primaryConnection | the primary connection to be used |
void ns3::SubscriberStationNetDevice::SetScheduler | ( | Ptr< SSScheduler > | ssScheduler | ) |
ssScheduler | the scheduler to be installed on the device |
Referenced by GetTypeId().
|
virtual |
This method calls the virtual DoStart method on all the objects aggregated to this object. DoStart will be called only once over the lifetime of an object, just like DoDispose is called only once.
Note: the code here is a bit tricky because we need to protect ourselves from modifications in the aggregate array while DoStart is called. The user's implementation of the DoStart method could call GetObject (which could reorder the array) and it could call AggregateObject which would add an object at the end of the array. To be safe, we restart iteration over the array whenever we call some user code, just in case.
Implements ns3::WimaxNetDevice.
References ns3::WimaxNetDevice::GetPhy(), ns3::Simulator::ScheduleNow(), ns3::Seconds(), ns3::WimaxPhy::SetDataRates(), and ns3::WimaxPhy::SetPhyParameters().