A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
service-flow-manager.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2007,2008, 2009 INRIA, UDcast
3 *
4 * SPDX-License-Identifier: GPL-2.0-only
5 *
6 * Author: Jahanzeb Farooq <jahanzeb.farooq@sophia.inria.fr>
7 * Mohamed Amine Ismail <amine.ismail@sophia.inria.fr>
8 */
9
10#ifndef SERVICE_FLOW_MANAGER_H
11#define SERVICE_FLOW_MANAGER_H
12
13#include "mac-messages.h"
14
15#include "ns3/buffer.h"
16#include "ns3/event-id.h"
17
18#include <stdint.h>
19
20namespace ns3
21{
22
23class Packet;
24class ServiceFlow;
25class WimaxNetDevice;
26class SSRecord;
27class WimaxConnection;
28
29/**
30 * \ingroup wimax
31 * The same service flow manager class serves both for BS and SS though some functions are exclusive
32 * to only one of them.
33 */
35{
36 public:
37 /// confirmation code enumeration as per Table 384 (not all codes implemented)
43
44 /**
45 * \brief Get the type ID.
46 * \return the object TypeId
47 */
48 static TypeId GetTypeId();
49
51 ~ServiceFlowManager() override;
52 void DoDispose() override;
53
54 /**
55 * Add service flow function
56 * \param serviceFlow the service flow
57 */
58 void AddServiceFlow(ServiceFlow* serviceFlow);
59 /**
60 * Get service flow by flow id
61 * \param sfid the service flow id
62 * \returns pointer to the service flow object corresponding to the flow id
63 */
65 /**
66 * Get service flow by CID
67 * \param cid the CID
68 * \returns pointer to the service flow object corresponding to the CID
69 */
70 ServiceFlow* GetServiceFlow(Cid cid) const;
71 /**
72 * Get service flows function
73 * \param schedulingType the scheduling type
74 * \returns vector of pointers to service flows corresponding to the scheduling type
75 */
76 std::vector<ServiceFlow*> GetServiceFlows(ServiceFlow::SchedulingType schedulingType) const;
77
78 /**
79 * \return true if all service flows are allocated, false otherwise
80 */
82 /**
83 * \param serviceFlows vector of pointers to service flows to be checked
84 * \return true if all service flows are allocated, false otherwise
85 */
86 bool AreServiceFlowsAllocated(std::vector<ServiceFlow*>* serviceFlows);
87 /**
88 * \param serviceFlows vector of pointers to service flows to be checked
89 * \return true if all service flows are allocated, false otherwise
90 */
91 bool AreServiceFlowsAllocated(std::vector<ServiceFlow*> serviceFlows);
92 /**
93 * \return pointer to the next service flow to be allocated
94 */
96
97 /**
98 * \return the number of all service flows
99 */
101
102 /**
103 * \param SrcAddress the source ip address
104 * \param DstAddress the destination ip address
105 * \param SrcPort the source port
106 * \param DstPort the destination port
107 * \param Proto the protocol
108 * \param dir the direction of the service flow
109 * \return the service flow to which this ip flow is associated
110 */
112 Ipv4Address DstAddress,
113 uint16_t SrcPort,
114 uint16_t DstPort,
115 uint8_t Proto,
117
118 private:
119 std::vector<ServiceFlow*>* m_serviceFlows; ///< the service flows
120};
121
122} // namespace ns3
123
124#endif /* SERVICE_FLOW_MANAGER_H */
Cid class.
Definition cid.h:26
Ipv4 addresses are stored in host order in this class.
A base class which provides memory management and object aggregation.
Definition object.h:78
This class implements service flows as described by the IEEE-802.16 standard.
SchedulingType
section 11.13.11 Service flow scheduling type, page 701
Direction
Direction enumeration.
The same service flow manager class serves both for BS and SS though some functions are exclusive to ...
ServiceFlow * GetNextServiceFlowToAllocate()
ServiceFlow * DoClassify(Ipv4Address SrcAddress, Ipv4Address DstAddress, uint16_t SrcPort, uint16_t DstPort, uint8_t Proto, ServiceFlow::Direction dir) const
void AddServiceFlow(ServiceFlow *serviceFlow)
Add service flow function.
ConfirmationCode
confirmation code enumeration as per Table 384 (not all codes implemented)
ServiceFlow * GetServiceFlow(uint32_t sfid) const
Get service flow by flow id.
std::vector< ServiceFlow * > GetServiceFlows(ServiceFlow::SchedulingType schedulingType) const
Get service flows function.
static TypeId GetTypeId()
Get the type ID.
void DoDispose() override
Destructor implementation.
std::vector< ServiceFlow * > * m_serviceFlows
the service flows
a unique identifier for an interface.
Definition type-id.h:48
Every class exported by the ns3 library is enclosed in the ns3 namespace.
std::string dir