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 * SPDX-License-Identifier: GPL-2.0-only
5 *
6 * Authors: Jahanzeb Farooq <jahanzeb.farooq@sophia.inria.fr>
7 * Mohamed Amine Ismail <amine.ismail@sophia.inria.fr>
8 * <amine.ismail@UDcast.com>
9 */
10
11#ifndef SS_MANAGER_H
12#define SS_MANAGER_H
13
14#include "cid.h"
15#include "ss-record.h"
16
17#include <stdint.h>
18
19namespace ns3
20{
21
22/**
23 * \ingroup wimax
24 * \brief this class manages a list of SSrecords
25 * \see SSrecord
26 */
27class SSManager : public Object
28{
29 public:
30 /**
31 * \brief Get the type ID.
32 * \return the object TypeId
33 */
34 static TypeId GetTypeId();
35 SSManager();
36 ~SSManager() override;
37 /**
38 * Create SS record
39 * \param macAddress the MAC address
40 * \returns pointer to the SS record
41 */
42 SSRecord* CreateSSRecord(const Mac48Address& macAddress);
43 /**
44 * Get SS record
45 * \param macAddress the MAC address
46 * \returns pointer to the SS record
47 */
48 SSRecord* GetSSRecord(const Mac48Address& macAddress) const;
49 /**
50 * \brief returns the ssrecord which has been assigned this cid. Since
51 * different types of cids (basic, primary, transport) are assigned
52 * different values, all cids (basic, primary and transport) of the
53 * ssrecord are matched.
54 * \param cid the cid to be matched
55 * \return pointer to the ss record matching the cid
56 */
57 SSRecord* GetSSRecord(Cid cid) const;
58 /**
59 * Get SS records
60 * \returns a vector of pointers to the SS records
61 */
62 std::vector<SSRecord*>* GetSSRecords() const;
63 /**
64 * Check if address is in record
65 * \param macAddress the MAC address
66 * \returns whether the address is in the record
67 */
68 bool IsInRecord(const Mac48Address& macAddress) const;
69 /**
70 * Check if address is registered
71 * \param macAddress the MAC address
72 * \returns whether the address is registered
73 */
74 bool IsRegistered(const Mac48Address& macAddress) const;
75 /**
76 * Delete SS record
77 * \param cid the CID
78 */
79 void DeleteSSRecord(Cid cid);
80 /**
81 * Get MAC address by CID
82 * \param cid the CID
83 * \returns the MAC address
84 */
86 /**
87 * Get number of SSs
88 * \returns the number of SSs
89 */
90 uint32_t GetNSSs() const;
91 /**
92 * Get number of registered SSs
93 * \returns the number of registered SSs
94 */
96
97 private:
98 std::vector<SSRecord*>* m_ssRecords; ///< the SS records
99};
100
101} // namespace ns3
102
103#endif /* SS_MANAGER_H */
Cid class.
Definition cid.h:26
an EUI-48 address
A base class which provides memory management and object aggregation.
Definition object.h:78
this class manages a list of SSrecords
Definition ss-manager.h:28
static TypeId GetTypeId()
Get the type ID.
Definition ss-manager.cc:27
uint32_t GetNRegisteredSSs() const
Get number of registered SSs.
bool IsInRecord(const Mac48Address &macAddress) const
Check if address is in record.
SSRecord * GetSSRecord(const Mac48Address &macAddress) const
Get SS record.
Definition ss-manager.cc:57
std::vector< SSRecord * > * GetSSRecords() const
Get SS records.
Definition ss-manager.cc:99
SSRecord * CreateSSRecord(const Mac48Address &macAddress)
Create SS record.
Definition ss-manager.cc:49
bool IsRegistered(const Mac48Address &macAddress) const
Check if address is registered.
uint32_t GetNSSs() const
Get number of SSs.
void DeleteSSRecord(Cid cid)
Delete SS record.
Mac48Address GetMacAddress(Cid cid) const
Get MAC address by CID.
std::vector< SSRecord * > * m_ssRecords
the SS records
Definition ss-manager.h:98
~SSManager() override
Definition ss-manager.cc:38
This class is used by the base station to store some information related to subscriber station in the...
Definition ss-record.h:35
a unique identifier for an interface.
Definition type-id.h:48
Every class exported by the ns3 library is enclosed in the ns3 namespace.