//
// Generated file, do not edit! Created by opp_msgc 4.1 from src/node/communication/mac/tMac/TMacPacket.msg.
//

#ifndef _TMACPACKET_M_H_
#define _TMACPACKET_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 "MacPacket_m.h"
// }}



/**
 * Enum generated from <tt>src/node/communication/mac/tMac/TMacPacket.msg</tt> by opp_msgc.
 * <pre>
 * enum TmacPacket_type {
 * 	SYNC_TMAC_PACKET = 1;
 * 	RTS_TMAC_PACKET = 2;
 * 	CTS_TMAC_PACKET = 3;
 * 	DS_TMAC_PACKET = 4;
 * 	FRTS_TMAC_PACKET = 5;
 * 	DATA_TMAC_PACKET = 6;
 * 	ACK_TMAC_PACKET = 7;
 * }
 * </pre>
 */
enum TmacPacket_type {
    SYNC_TMAC_PACKET = 1,
    RTS_TMAC_PACKET = 2,
    CTS_TMAC_PACKET = 3,
    DS_TMAC_PACKET = 4,
    FRTS_TMAC_PACKET = 5,
    DATA_TMAC_PACKET = 6,
    ACK_TMAC_PACKET = 7
};

/**
 * Class generated from <tt>src/node/communication/mac/tMac/TMacPacket.msg</tt> by opp_msgc.
 * <pre>
 * packet TMacPacket extends MacPacket {
 * 	
 * 	
 * 	
 * 	int type enum (TmacPacket_type);	
 * 
 * 	
 * 	simtime_t nav = 0;					
 * 
 * 	
 * 	
 * 	
 * 	
 * 
 * 	
 * 	
 * 	
 * 	
 * 	
 * 	simtime_t sync = 0;					
 * 	int syncId = 0;						
 * }
 * </pre>
 */
class TMacPacket : public ::MacPacket
{
  protected:
    int type_var;
    simtime_t nav_var;
    simtime_t sync_var;
    int syncId_var;

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

  public:
    TMacPacket(const char *name=NULL, int kind=0);
    TMacPacket(const TMacPacket& other);
    virtual ~TMacPacket();
    TMacPacket& operator=(const TMacPacket& other);
    virtual TMacPacket *dup() const {return new TMacPacket(*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 simtime_t getNav() const;
    virtual void setNav(simtime_t nav_var);
    virtual simtime_t getSync() const;
    virtual void setSync(simtime_t sync_var);
    virtual int getSyncId() const;
    virtual void setSyncId(int syncId_var);
};

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


#endif // _TMACPACKET_M_H_
