RINASim  October 2016
Documentation of framework for OMNeT++
EnrollmentStateTableEntry.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 
32 #ifndef ENROLLMENTSTATETABLEENTRY_H_
33 #define ENROLLMENTSTATETABLEENTRY_H_
34 
35 #include <omnetpp.h>
36 #include <string>
37 #include "Flow.h"
38 
39 extern const int VAL_NOCONRETRY;
40 
42 public:
50 
61 
65  //EnrollmentStateTableEntry(Flow* flow);
66  //EnrollmentStateTableEntry(Flow* flow, EnrollmentStateTableEntry::CACEConnectionStatus status, bool isInitiator);
68 
69  //Flow* getFlow();
74 
75  void setIsImmediateEnrollment(bool immediate);
76 
80 
81  std::string info() const;
82  std::string getCACEConnectionStatusString() const;
83  std::string getEnrollmentStatusString() const;
84  const APNamingInfo& getLocal() const;
85  void setLocal(const APNamingInfo& local);
86  const APNamingInfo& getRemote() const;
87  void setRemote(const APNamingInfo& remote);
88 
89 private:
96  //Flow *flow;
97 
98 };
99 
100 //Free function
101 std::ostream& operator<< (std::ostream& os, const EnrollmentStateTableEntry& este);
102 
103 #endif /* ENROLLMENTSTATETABLEENTRY_H_ */
EnrollmentStatus enrollStatus
void setEnrollmentStatus(EnrollmentStateTableEntry::EnrollmentStatus status)
int getCurrentConnectRetries()
CACEConnectionStatus
void setRemote(const APNamingInfo &remote)
std::string getCACEConnectionStatusString() const
EnrollmentStatus
CACEConnectionStatus conStatus
virtual ~EnrollmentStateTableEntry()
int connectRetries
void increaseCurrentConnectRetries()
void setIsImmediateEnrollment(bool immediate)
const APNamingInfo & getLocal() const
std::string info() const
const int VAL_NOCONRETRY
APNamingInfo holds complete naming info for particular application process.
Definition: APNamingInfo.h:43
void setLocal(const APNamingInfo &local)
const APNamingInfo & getRemote() const
EnrollmentStateTableEntry()
void setCACEConStatus(EnrollmentStateTableEntry::CACEConnectionStatus status)
bool immediateEnrollment
APNamingInfo Destination
std::ostream & operator<<(std::ostream &os, const EnrollmentStateTableEntry &este)
bool getIsImmediateEnrollment()
EnrollmentStateTableEntry::CACEConnectionStatus getCACEConStatus() const
std::string getEnrollmentStatusString() const
APNamingInfo Source
EnrollmentStateTableEntry::EnrollmentStatus getEnrollmentStatus() const