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
24namespace 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}
67void
69{
70 m_classifierDscAction = action;
71}
72void
74{
75 m_packetClassifierRule = packetClassifierRule;
76}
79{
81}
84{
86}
87Tlv
89{
94}
95}
this class implements the convergence sub-layer descriptor as a tlv vector
Definition: wimax-tlv.h:377
Action
Action enumeration.
Definition: cs-parameters.h:40
Tlv ToTlv(void) const
creates a tlv from the classifier record
void SetClassifierDscAction(enum Action action)
sets the dynamic service classifier action to ADD, Change or delete.
IpcsClassifierRecord m_packetClassifierRule
packet classifier rule
Definition: cs-parameters.h:84
IpcsClassifierRecord GetPacketClassifierRule(void) const
enum Action GetClassifierDscAction(void) const
enum Action m_classifierDscAction
classifier DSC action
Definition: cs-parameters.h:83
void SetPacketClassifierRule(IpcsClassifierRecord packetClassifierRule)
sets the packet classifier rules
IpcsClassifierRecord class.
Tlv ToTlv(void) 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:84
uint8_t GetType(void) const
Get type value.
Definition: wimax-tlv.cc:214
TlvValue * PeekValue(void)
Peek value.
Definition: wimax-tlv.cc:224
U8TlvValue class.
Definition: wimax-tlv.h:171
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
virtual uint32_t GetSerializedSize(void) const
Get serialized size in bytes.
Definition: wimax-tlv.cc:251
#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:88
Every class exported by the ns3 library is enclosed in the ns3 namespace.