A Discrete-Event Network Simulator
API
cs-parameters.cc
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2009 INRIA, UDcast
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License version 2 as
7  * published by the Free Software Foundation;
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17  *
18  * Mohamed Amine Ismail <amine.ismail@sophia.inria.fr>
19  *
20  */
21 #include "wimax-tlv.h"
22 #include "cs-parameters.h"
23 
24 namespace ns3 {
26 {
28 }
30 {
31 
32 }
33 
35 {
37  "Invalid TLV");
39 
40  for (std::vector<Tlv*>::const_iterator iter = param->Begin (); iter
41  != param->End (); ++iter)
42  {
43  switch ((*iter)->GetType ())
44  {
46  {
48  = (enum CsParameters::Action)((U8TlvValue*)((*iter)->PeekValue ()))->GetValue ();
49  break;
50  }
52  {
54  = IpcsClassifierRecord (*(*iter));
55  break;
56  }
57  }
58  }
59 }
60 
62  IpcsClassifierRecord classifier)
63 {
64  m_classifierDscAction = classifierDscAction;
65  m_packetClassifierRule = classifier;
66 }
67 void
69 {
70  m_classifierDscAction = action;
71 }
72 void
74 {
75  m_packetClassifierRule = packetClassifierRule;
76 }
79 {
80  return m_classifierDscAction;
81 }
84 {
86 }
87 Tlv
88 CsParameters::ToTlv (void) const
89 {
94 }
95 }
enum Action m_classifierDscAction
classifier DSC action
Definition: cs-parameters.h:83
Tlv ToTlv(void) const
Creates a TLV from this classifier.
Action
Action enumeration.
Definition: cs-parameters.h:39
NS_ASSERT_MSG(false, "Ipv4AddressGenerator::MaskToIndex(): Impossible")
void SetClassifierDscAction(enum Action action)
sets the dynamic service classifier action to ADD, Change or delete.
this class implements the convergence sub-layer descriptor as a tlv vector
Definition: wimax-tlv.h:376
virtual uint32_t GetSerializedSize(void) const
Get serialized size in bytes.
Definition: wimax-tlv.cc:251
This class implements the Type-Len-Value structure channel encodings as described by "IEEE Standard f...
Definition: wimax-tlv.h:83
void SetPacketClassifierRule(IpcsClassifierRecord packetClassifierRule)
sets the packet classifier rules
IpcsClassifierRecord class.
void Add(const Tlv &val)
Add a TLV.
Definition: wimax-tlv.cc:284
IpcsClassifierRecord m_packetClassifierRule
packet classifier rule
Definition: cs-parameters.h:84
IpcsClassifierRecord GetPacketClassifierRule(void) const
U8TlvValue class.
Definition: wimax-tlv.h:170
uint8_t GetType(void) const
Get type value.
Definition: wimax-tlv.cc:214
Every class exported by the ns3 library is enclosed in the ns3 namespace.
TlvValue * PeekValue(void)
Peek value.
Definition: wimax-tlv.cc:224
enum Action GetClassifierDscAction(void) const
Tlv ToTlv(void) const
creates a tlv from the classifier record