A Discrete-Event Network Simulator
API
cs-parameters.cc
Go to the documentation of this file.
1 /*
2  * Copyright (c) 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  * Mohamed Amine Ismail <amine.ismail@sophia.inria.fr>
18  *
19  */
20 #include "cs-parameters.h"
21 
22 #include "wimax-tlv.h"
23 
24 namespace ns3
25 {
27 {
29 }
30 
32 {
33 }
34 
36 {
39 
40  for (auto iter = param->Begin(); iter != param->End(); ++iter)
41  {
42  switch ((*iter)->GetType())
43  {
46  (CsParameters::Action)((U8TlvValue*)((*iter)->PeekValue()))->GetValue();
47  break;
48  }
51  break;
52  }
53  }
54  }
55 }
56 
58  IpcsClassifierRecord classifier)
59 {
60  m_classifierDscAction = classifierDscAction;
61  m_packetClassifierRule = classifier;
62 }
63 
64 void
66 {
68 }
69 
70 void
72 {
73  m_packetClassifierRule = packetClassifierRule;
74 }
75 
78 {
79  return m_classifierDscAction;
80 }
81 
84 {
86 }
87 
88 Tlv
90 {
92  tmp.Add(
96 }
97 } // namespace ns3
this class implements the convergence sub-layer descriptor as a tlv vector
Definition: wimax-tlv.h:385
void SetClassifierDscAction(Action action)
sets the dynamic service classifier action to ADD, Change or delete.
Action
Action enumeration.
Definition: cs-parameters.h:40
Tlv ToTlv() const
creates a tlv from the classifier record
Action GetClassifierDscAction() const
IpcsClassifierRecord GetPacketClassifierRule() const
Action m_classifierDscAction
classifier DSC action
Definition: cs-parameters.h:85
IpcsClassifierRecord m_packetClassifierRule
packet classifier rule
Definition: cs-parameters.h:86
void SetPacketClassifierRule(IpcsClassifierRecord packetClassifierRule)
sets the packet classifier rules
IpcsClassifierRecord class.
Tlv ToTlv() const
Creates a TLV from this classifier.
This class implements the Type-Len-Value structure channel encodings as described by "IEEE Standard f...
Definition: wimax-tlv.h:87
uint8_t GetType() const
Get type value.
Definition: wimax-tlv.cc:211
TlvValue * PeekValue()
Peek value.
Definition: wimax-tlv.cc:223
U8TlvValue class.
Definition: wimax-tlv.h:175
uint32_t GetSerializedSize() const override
Get serialized size in bytes.
Definition: wimax-tlv.cc:251
Iterator End() const
End iterator.
Definition: wimax-tlv.cc:278
Iterator Begin() const
Begin iterator.
Definition: wimax-tlv.cc:272
void Add(const Tlv &val)
Add a TLV.
Definition: wimax-tlv.cc:284
#define NS_ASSERT_MSG(condition, message)
At runtime, in debugging builds, if this condition is not true, the program prints the message to out...
Definition: assert.h:86
Every class exported by the ns3 library is enclosed in the ns3 namespace.