A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
ss-manager.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2007,2008,2009 INRIA, UDcast
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation;
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16 *
17 * Authors: Jahanzeb Farooq <jahanzeb.farooq@sophia.inria.fr>
18 * Mohamed Amine Ismail <amine.ismail@sophia.inria.fr>
19 * <amine.ismail@UDcast.com>
20 */
21
22#ifndef SS_MANAGER_H
23#define SS_MANAGER_H
24
25#include "cid.h"
26#include "ss-record.h"
27
28#include <stdint.h>
29
30namespace ns3
31{
32
33/**
34 * \ingroup wimax
35 * \brief this class manages a list of SSrecords
36 * \see SSrecord
37 */
38class SSManager : public Object
39{
40 public:
41 /**
42 * \brief Get the type ID.
43 * \return the object TypeId
44 */
45 static TypeId GetTypeId();
46 SSManager();
47 ~SSManager() override;
48 /**
49 * Create SS record
50 * \param macAddress the MAC address
51 * \returns pointer to the SS record
52 */
53 SSRecord* CreateSSRecord(const Mac48Address& macAddress);
54 /**
55 * Get SS record
56 * \param macAddress the MAC address
57 * \returns pointer to the SS record
58 */
59 SSRecord* GetSSRecord(const Mac48Address& macAddress) const;
60 /**
61 * \brief returns the ssrecord which has been assigned this cid. Since
62 * different types of cids (basic, primary, transport) are assigned
63 * different values, all cids (basic, primary and transport) of the
64 * ssrecord are matched.
65 * \param cid the cid to be matched
66 * \return pointer to the ss record matching the cid
67 */
68 SSRecord* GetSSRecord(Cid cid) const;
69 /**
70 * Get SS records
71 * \returns a vector of pointers to the SS records
72 */
73 std::vector<SSRecord*>* GetSSRecords() const;
74 /**
75 * Check if address is in record
76 * \param macAddress the MAC address
77 * \returns whether the address is in the record
78 */
79 bool IsInRecord(const Mac48Address& macAddress) const;
80 /**
81 * Check if address is registered
82 * \param macAddress the MAC address
83 * \returns whether the address is registered
84 */
85 bool IsRegistered(const Mac48Address& macAddress) const;
86 /**
87 * Delete SS record
88 * \param cid the CID
89 */
90 void DeleteSSRecord(Cid cid);
91 /**
92 * Get MAC address by CID
93 * \param cid the CID
94 * \returns the MAC address
95 */
97 /**
98 * Get number of SSs
99 * \returns the number of SSs
100 */
101 uint32_t GetNSSs() const;
102 /**
103 * Get number of registered SSs
104 * \returns the number of registered SSs
105 */
107
108 private:
109 std::vector<SSRecord*>* m_ssRecords; ///< the SS records
110};
111
112} // namespace ns3
113
114#endif /* SS_MANAGER_H */
Cid class.
Definition: cid.h:37
an EUI-48 address
Definition: mac48-address.h:46
A base class which provides memory management and object aggregation.
Definition: object.h:89
this class manages a list of SSrecords
Definition: ss-manager.h:39
static TypeId GetTypeId()
Get the type ID.
Definition: ss-manager.cc:38
uint32_t GetNRegisteredSSs() const
Get number of registered SSs.
Definition: ss-manager.cc:175
bool IsInRecord(const Mac48Address &macAddress) const
Check if address is in record.
Definition: ss-manager.cc:116
SSRecord * GetSSRecord(const Mac48Address &macAddress) const
Get SS record.
Definition: ss-manager.cc:68
std::vector< SSRecord * > * GetSSRecords() const
Get SS records.
Definition: ss-manager.cc:110
SSRecord * CreateSSRecord(const Mac48Address &macAddress)
Create SS record.
Definition: ss-manager.cc:60
bool IsRegistered(const Mac48Address &macAddress) const
Check if address is registered.
Definition: ss-manager.cc:129
uint32_t GetNSSs() const
Get number of SSs.
Definition: ss-manager.cc:169
void DeleteSSRecord(Cid cid)
Delete SS record.
Definition: ss-manager.cc:137
Mac48Address GetMacAddress(Cid cid) const
Get MAC address by CID.
Definition: ss-manager.cc:163
std::vector< SSRecord * > * m_ssRecords
the SS records
Definition: ss-manager.h:109
~SSManager() override
Definition: ss-manager.cc:49
This class is used by the base station to store some information related to subscriber station in the...
Definition: ss-record.h:46
a unique identifier for an interface.
Definition: type-id.h:59
Every class exported by the ns3 library is enclosed in the ns3 namespace.