RINASim  October 2016
Documentation of framework for OMNeT++
CDAPMsgLogEntry.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 #ifndef MESSAGELOGENTRY_H_
24 #define MESSAGELOGENTRY_H_
25 
26 //Standard libraries
27 #include <omnetpp.h>
28 //RINASim libraries
29 #include "CDAPMessage_m.h"
30 #include "ExternConsts.h"
31 
33  public:
34 
35 
36  //(De)Constructor
37  CDAPMsgLogEntry(unsigned char opc, long invoke, bool srflag);
38  virtual ~CDAPMsgLogEntry();
39 
40  std::string info() const;
41  std::string getOpCodeString() const;
42 
43  //Getters and Setters
44  long getInvokeId() const;
45  void setInvokeId(long invokeId);
46 
47  const unsigned char getOpCode() const;
48  void setOpCode(const unsigned char opCode);
49 
50  const simtime_t& getProcessedAt() const;
51  void setProcessedAt(const simtime_t& requestedAt);
52 
53  private:
54  //FIXME: Vesely - Convert to enum
55  unsigned char opCode;
56  long invokeId;
57  simtime_t processedAt;
58  bool sndFlag;
59 
60 };
61 
62 //Free function
63 std::ostream& operator<< (std::ostream& os, const CDAPMsgLogEntry& mle);
64 
65 #endif /* MESSAGELOGENTRY_H_ */
void setProcessedAt(const simtime_t &requestedAt)
long invokeId
unsigned char opCode
const unsigned char getOpCode() const
const simtime_t & getProcessedAt() const
simtime_t processedAt
std::ostream & operator<<(std::ostream &os, const CDAPMsgLogEntry &mle)
bool sndFlag
virtual ~CDAPMsgLogEntry()
CDAPMsgLogEntry(unsigned char opc, long invoke, bool srflag)
void setOpCode(const unsigned char opCode)
long getInvokeId() const
std::string info() const
void setInvokeId(long invokeId)
std::string getOpCodeString() const