RINASim  October 2016
Documentation of framework for OMNeT++
UserDataField.h
Go to the documentation of this file.
1 // The MIT License (MIT)
2 //
3 // Copyright (c) 2014-2016 Brno University of Technology, PRISTINE project
4 //
5 // Permission is hereby granted, free of charge, to any person obtaining a copy
6 // of this software and associated documentation files (the "Software"), to deal
7 // in the Software without restriction, including without limitation the rights
8 // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 // copies of the Software, and to permit persons to whom the Software is
10 // furnished to do so, subject to the following conditions:
11 //
12 // The above copyright notice and this permission notice shall be included in
13 // all copies or substantial portions of the Software.
14 //
15 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 // THE SOFTWARE.
22 
23 /*
24  * @file UserDataField.h
25  * @author Marcel Marek (imarek@fit.vutbr.cz)
26  * @date Oct 19, 2014
27  * @brief
28  * @detail
29  */
30 
31 #ifndef USERDATAFIELD_H_
32 #define USERDATAFIELD_H_
33 #include <omnetpp.h>
34 #include <vector>
35 #include "SDU.h"
36 #include "UserDataField_m.h"
37 
38 
39 
40 //typedef std::vector<SDU*> PDUData;
41 /*
42  *
43  */
45 {
46  private:
47  unsigned int sduDelimitFlags;
48  /* SDU delimiter flags */
50 
51 
52  unsigned int sduSeqNum;
53 // PDUData pduData;
54  unsigned int size;
55 
56  void copy(const UserDataField& other);
57 
58  public:
59 // UserDataField();
60  UserDataField(const char *name=NULL, int kind=0);
61  UserDataField(const UserDataField& other);
62 // UserDataField(const UserDataField& other) : UserDataField_Base(other) {copy(other);}
63  virtual ~UserDataField();
64 // void addData(SDU* data);
70 // SDU* getData();
71 // UserDataField* dup() const {return new UserDataField();}
72  virtual UserDataField* dup() const {return new UserDataField(*this);}
73 
74 
75  unsigned int getSize();
76  unsigned int getSduDelimitFlags() const;
77  void setSduDelimitFlags(unsigned int sduDelimitFlags);
78  unsigned int getSduSeqNum() const;
79  void setSduSeqNum(unsigned int sduSeqNum);
80 
81 
82 
83  UserDataField& operator=(const UserDataField& other) {if (this==&other) return *this; UserDataField_Base::operator=(other); copy(other); return *this;}
84 // bool operator<(const UserDataField& other) const;
85 
86 
87 
88 
89 };
90 
91 #endif /* USERDATAFIELD_H_ */
unsigned int getSduDelimitFlags() const
unsigned int sduDelimitFlags
Definition: UserDataField.h:47
UserDataField_Base & operator=(const UserDataField_Base &other)
virtual UserDataField * dup() const
Definition: UserDataField.h:72
unsigned int sduSeqNum
Definition: UserDataField.h:52
bool sduSeqNumPresent
Definition: UserDataField.h:49
void setSduSeqNum(unsigned int sduSeqNum)
unsigned int getSize()
void copy(const UserDataField &other)
unsigned int size
Definition: UserDataField.h:54
UserDataField(const char *name=NULL, int kind=0)
UserDataField & operator=(const UserDataField &other)
Definition: UserDataField.h:83
unsigned int getSduSeqNum() const
void setSduDelimitFlags(unsigned int sduDelimitFlags)
virtual ~UserDataField()