//
// Generated file, do not edit! Created by opp_msgc 4.1 from src/node/application/WiseApplicationPacket.msg.
//

#ifndef _WISEAPPLICATIONPACKET_M_H_
#define _WISEAPPLICATIONPACKET_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 "ApplicationPacket_m.h"
        #include "Node.h"
// }}



/**
 * Enum generated from <tt>src/node/application/WiseApplicationPacket.msg</tt> by opp_msgc.
 * <pre>
 * enum WiseApplicationPacketType {
 * 	WISE_APP_NORMAL = 0;
 * 	WISE_APP_DIRECT_COMMUNICATION = 10;
 * };
 * </pre>
 */
enum WiseApplicationPacketType {
    WISE_APP_NORMAL = 0,
    WISE_APP_DIRECT_COMMUNICATION = 10
};

/**
 * Class generated from <tt>src/node/application/WiseApplicationPacket.msg</tt> by opp_msgc.
 * <pre>
 * packet WiseApplicationPacket extends ApplicationPacket {
 * 	Node src;
 * 	unsigned char payload[];
 * 	unsigned int type = WISE_APP_NORMAL;
 * 	double sensedValue;
 * 	int source;
 * 	int byteLength;
 * 	int angle;
 * 	TraceInfo info;
 * }
 * </pre>
 */
class WiseApplicationPacket : public ::ApplicationPacket
{
  protected:
    ::Node src_var;
    unsigned char *payload_var; // array ptr
    unsigned int payload_arraysize;
    unsigned int type_var;
    double sensedValue_var;
    int source_var;
    int byteLength_var;
    int angle_var;
    ::TraceInfo info_var;

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

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

    // field getter/setter methods
    virtual Node& getSrc();
    virtual const Node& getSrc() const {return const_cast<WiseApplicationPacket*>(this)->getSrc();}
    virtual void setSrc(const Node& src_var);
    virtual void setPayloadArraySize(unsigned int size);
    virtual unsigned int getPayloadArraySize() const;
    virtual unsigned char getPayload(unsigned int k) const;
    virtual void setPayload(unsigned int k, unsigned char payload_var);
    virtual unsigned int getType() const;
    virtual void setType(unsigned int type_var);
    virtual double getSensedValue() const;
    virtual void setSensedValue(double sensedValue_var);
    virtual int getSource() const;
    virtual void setSource(int source_var);
    virtual int getByteLength() const;
    virtual void setByteLength(int byteLength_var);
    virtual int getAngle() const;
    virtual void setAngle(int angle_var);
    virtual TraceInfo& getInfo();
    virtual const TraceInfo& getInfo() const {return const_cast<WiseApplicationPacket*>(this)->getInfo();}
    virtual void setInfo(const TraceInfo& info_var);
};

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


#endif // _WISEAPPLICATIONPACKET_M_H_
