/*
 * asample.h
 *
 *  Created on: 23 Oct 2013
 *      Author: john
 */

#ifndef ASAMPLE_H_
#define ASAMPLE_H_

#include <object.h>

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

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

   //potential problem with conversion as library returns double and we are casting to float.
   	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);
   uint32_t getPortNum() const;
   void setPortNum(uint32_t portNum);
   float getSample() const;
   void setSample(float sample);
   uint32_t getSeqNum() const;
   void setSeqNum(uint32_t seqNum);

private:
   void populate_tags(KTag *);

   uint32_t mDeviceSerial;
   uint32_t mPortNum;
   uint32_t mSeqNum;
   float    mSample;

};



#endif /* ASAMPLE_H_ */
