/*
 * adhoc.h
 *
 *  Created on: 14 Sep 2015
 *      Author: john
 */

#ifndef INCLUDE_ADHOC_H_
#define INCLUDE_ADHOC_H_

#include <object.h>


class cObjectAdhocEvent : public cObject
{
public:
   cObjectAdhocEvent();
   cObjectAdhocEvent(cObjectAdhocEvent *obj);
   ~cObjectAdhocEvent();

   cTagList * getTags();
   bool parse(KourierObject *, std::vector<KTag*>* ct = NULL);
   bool parse(json_t *dataArray); //JSON

   //uses the append_new function for return arrays so that the json ref stays at 1
   //returns an array of all the values
   json_t * getJSONObj(); //for JSON


   bool compIndex(cObject *obj);
   bool operator <(cObject &rhs);
   char * printKey();
   cObject * clone();

   uint32_t getDeviceSerial() const;
   void setDeviceSerial(uint32_t deviceSerial);
   char* getEventLabel() const;
   void setEventLabel(const char* eventLabel);
   const char* getEventValue() const;
   void setEventValue(const char* eventValue);
   uint32_t getPortId() const;
   void setPortId(uint32_t portId);
   uint32_t getSequenceNumber() const;
   void setSequenceNumber(uint32_t sequenceNumber);
   uint32_t getTimeStamp() const;
   void setTimeStamp(uint32_t timeStamp);
   uint32_t getStartSeq() const;
   void setStartSeq(uint32_t startSeq);

private:
   void populate_tags(KTag *);

   uint32_t mSequenceNumber;
   uint32_t mTimeStamp;
   uint32_t mDeviceSerial;
   uint32_t mPortId;
   char * mEventLabel;
   char * mEventValue;
   uint32_t mStartSeq;
};



#endif /* INCLUDE_ADHOC_H_ */
