A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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
Definition: cs-parameters.h:76
enum Action GetClassifierDscAction(void) const
virtual uint32_t GetSerializedSize(void) const
Definition: wimax-tlv.cc:239
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:235
This class implements the Type-Len-Value structure channel encodings as described by "IEEE Standard f...
Definition: wimax-tlv.h:64
void SetPacketClassifierRule(IpcsClassifierRecord packetClassifierRule)
sets the packet classifier rules
void Add(const Tlv &val)
Definition: wimax-tlv.cc:272
IpcsClassifierRecord m_packetClassifierRule
Definition: cs-parameters.h:77
Tlv ToTlv(void) const
creates a tlv from the classifier record
uint8_t GetType(void) const
Definition: wimax-tlv.cc:202
TlvValue * PeekValue(void)
Definition: wimax-tlv.cc:212
#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:84
Tlv ToTlv(void) const
Creates a TLV from this classifier.
IpcsClassifierRecord GetPacketClassifierRule(void) const