/*
 * dinput.h
 *
 *  Created on: 11 Jul 2013
 *      Author: john
 */

#ifndef DINPUT_H_
#define DINPUT_H_

#include <port.h>

class cObjectDInput: public cObjectPort
{
public:
   cObjectDInput();
   cObjectDInput(cObjectDInput *);
   ~cObjectDInput();
   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 *);
   bool operator <(cObject &);
   char * printKey();
   cObject * clone();
   eObjectIOState getDefaultState() const;
   void setDefaultState(eObjectIOState defaultState);
   eObjectIOState getInputState() const;
   void setInputState(eObjectIOState inputState);

private:
   void populate_tags(KTag* tag);
   eObjectIOState mInputState;
   eObjectIOState mDefaultState;
};

#endif /* DINPUT_H_ */
