//
// Generated file, do not edit! Created by opp_msgc 4.1 from applications/i3/i3Apps/I3SessionMessage.msg.
//

#ifndef _I3SESSIONMESSAGE_M_H_
#define _I3SESSIONMESSAGE_M_H_

#include <omnetpp.h>

// opp_msgc version check
#define MSGC_VERSION 0x0401
#if (MSGC_VERSION!=OMNETPP_VERSION)
#    error Version mismatch! Probably this file was generated by an earlier version of opp_msgc: 'make clean' should help.
#endif

// cplusplus {{
#include "I3Identifier.h"
// }}



/**
 * Enum generated from <tt>applications/i3/i3Apps/I3SessionMessage.msg</tt> by opp_msgc.
 * <pre>
 * enum SessionMsgType
 * {
 * 
 *      PAYLOAD = 0;
 *      CHANGE_SESSION = 1;
 *      TRIGGER_CONFIRMATION = 2;
 * }
 * </pre>
 */
enum SessionMsgType {
    PAYLOAD = 0,
    CHANGE_SESSION = 1,
    TRIGGER_CONFIRMATION = 2
};

/**
 * Class generated from <tt>applications/i3/i3Apps/I3SessionMessage.msg</tt> by opp_msgc.
 * <pre>
 * packet SessionMsg
 * {
 * 		int type enum(SessionMsgType);
 * 		double value;
 *                 I3Identifier source;
 * }
 * </pre>
 */
class SessionMsg : public ::cPacket
{
  protected:
    int type_var;
    double value_var;
    ::I3Identifier source_var;

    // protected and unimplemented operator==(), to prevent accidental usage
    bool operator==(const SessionMsg&);

  public:
    SessionMsg(const char *name=NULL, int kind=0);
    SessionMsg(const SessionMsg& other);
    virtual ~SessionMsg();
    SessionMsg& operator=(const SessionMsg& other);
    virtual SessionMsg *dup() const {return new SessionMsg(*this);}
    virtual void parsimPack(cCommBuffer *b);
    virtual void parsimUnpack(cCommBuffer *b);

    // field getter/setter methods
    virtual int getType() const;
    virtual void setType(int type_var);
    virtual double getValue() const;
    virtual void setValue(double value_var);
    virtual I3Identifier& getSource();
    virtual const I3Identifier& getSource() const {return const_cast<SessionMsg*>(this)->getSource();}
    virtual void setSource(const I3Identifier& source_var);
};

inline void doPacking(cCommBuffer *b, SessionMsg& obj) {obj.parsimPack(b);}
inline void doUnpacking(cCommBuffer *b, SessionMsg& obj) {obj.parsimUnpack(b);}


#endif // _I3SESSIONMESSAGE_M_H_
